[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix melpa installation
On Thu, 19 Sep 2019 00:23:47 +0200, Michael Heerdegen wrote:
> A negative point: apparently, when w3m created "w3m-load" after
> restarting my emacs here, it produced a warning (AFAIR something like
> "unknown var package-desc" or something like that).
I got no warning, hmm. What I did for testing it is:
$ rm -fr ~/pseudo-home
$ mkdir ~/pseudo-home
- Create ~/pseudo-home/.emacs file with minimum necessary contents.
$ export HOME=/home/$USER/pseudo-home
- Install w3m package (w3m-load.el is created at that time).
- Quit Emacs.
If it still happens, I'll appriciate if you could investigate it.
> And there was no
> indication where it came from so users might investigate and invest time
> uselessly. Either try to avoid that warning and/or print a message like
> "Creating file w3m-load.el for you..."
Added: (message "Created w3m-load.el in %s/" directory)
> Then I would like to discuss your suggested form for the users' init
>| (condition-case nil
>| (require 'w3m-load)
>| (file-error (require 'w3m)))
> I think I'll instead use
> (or (require 'w3m-load nil t)
> (require 'w3m nil t)))
> - use NOERROR arg of `require' to avoid co-case - can you use that too?
> - (important) Don't error in case w3m is not installed! Maybe the user
> wants to reinstall or temporarily uninstall it later etc - this
> shouldn't break Emacs startup.
I'm not quite sure if the second NOERROR flag is usefull. IMHO,
one should easily notice what's wrong if an error occurs, and
concealing it is none of our business.
> - nitpick: I use `eval-and-compile' because I compile my init file and
> so the compiler knows about w3m stuff when compiling.
Did you mean the w3m-load.el file to be created while compiling
the init file? Though I realized just before, it is created when
installing the w3m package because some .el module other than
w3m.el loads w3m.el and it does it while compiling the package.
So, now I'd like to revert the emacs-w3m home page so to show
only (require 'w3m-load). ;-)