[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: use Emacs-w3m with non-installed Emacs

On 2018-10-25 23:12, andrés ramírez wrote:
> Hi There.
> ¿What I do on those cases?.

I can think of a few options, but each would depend on your particular
case and what you are comfortable with doing:

1) Do you absolutely need to byte-compile?

1.1) This is my preference - not to byte-compile.

2) Could you set a separate load path spec for using each version?

2.1) For instance, have your .emacs check variable `emacs-version', and
     set the `load-path' accordingly (similar to Andres' suggestion).

3) Are you comfortable using chroot?

4) If you are comfortable with git or a similar version control system,
can guarantee that you are only using a single version system-wide at a
single time by having a separate branch for each version, and compiling
separately for each branch.

4.1) Wasteful of disk space, if you ask me, but you may have emacs or
its components under version control anyway.

> Having to support emacs-23 and emacs-26 on the same device is
> installing it with M-x list-packages with emacs-23. Then emacs-26 works
> fine.
> if compiling with a later version of emacsen then the previous version
> fails. So Best shot is compiling with the older emacsen.
> If You plan to use the separate debian package emacs-w3m (which probably
> have been debianized).
> You would need something like this on emacs-26 YMMV
> --8<---------------cut here---------------start------------->8---
> (defun s-load-now/w3m ()
>   "load w3m mode from myemacs ."
>   (interactive)
>      ; your path should be according to your emacs-w3m package
>      (when (file-exists-p "~/.emacs.d/elpa/w3m")
>        (add-to-list 'load-path "~/.emacs.d/elpa/w3m")
>       ; below is my personal w3m setup
>        (load-file "~/.emacs.d/personal/configs/external/.emacs-rc-w3m.el"))
>      )
> --8<---------------cut here---------------end--------------->8---
> You could run above automatically if version major than 24
> --8<---------------cut here---------------start------------->8---
> (when (> 24 emacs-major-version)
>  (s-load-now/w3m)
> )
> --8<---------------cut here---------------end--------------->8---
> AR

CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0