[bug#47661,00/33] Improve Emacs UX.

Message ID 20210408174616.13112-1-leo.prikler@student.tugraz.at
Headers show
Series Improve Emacs UX. | expand

Message

Leo Prikler April 8, 2021, 5:46 p.m. UTC
This patch set supersedes the wip-emacs branch.  It can be deleted,
once it's merged.

Hi Guix,

as you all recall, I recently put in some efforts into improving the
Emacs user experience in Guix.  There are three bugs addressed by this
patch set:

1. Emacs libraries may inadvertently overwrite files in other libraries
   (solved by using ELPA-style subdirectories)
2. Emacs cannot find its own load-path after an update.  (Solved with a
   wrapper).
3. Emacs can't find core programs, such as "ls" or "gzip".

Below are some git statistics, have fun with them while I'm waiting for
a bug number to send the patches :)

Regards,
Leo

Leo Prikler (27):
  profiles: Add hook for Emacs subdirs.
  gnu: emacs: Wrap EMACSLOADPATH.
  gnu: emacs: Patch more program file names.
  build-system: emacs: Use subdirectories again.
  gnu: emacs-libgit: Adjust to changes in emacs-build-system.
  gnu: emacs-guix: Adjust to changes in emacs-build-system.
  gnu: emacs-telega: Adjust to changes in emacs-build-system.
  gnu: Add emacs-telega-contrib.
  gnu: emacs-emacsql: Adjust to changes in emacs-build-system.
  gnu: emacs-howm: Adjust to changes in emacs-build-system.
  gnu: emacs-ert-runner: Adjust to changes in emacs-build-system.
  gnu: emacs-shroud: Adjust to changes in emacs-build-system.
  gnu: emacs-sly-stepper: Adjust to changes in emacs-build-system.
  gnu: emacs-sly-stepper: Remove generated sources.
  gnu: emacs-org-contrib: Adjust to changes in emacs-build-system.
  gnu: emacs-edbi: Adjust to changes in emacs-build-system.
  gnu: emacs-scel: Adjust to changes in emacs-build-system.
  gnu: emacs-vterm: Adjust to changes in emacs-build-system.
  gnu: notmuch: Adjust to changes in emacs-build-system.
  gnu: emacs-pyim: Update to 3.6.
  gnu: emacs-realgud: Adjust to changes in emacs-build-system.
  gnu: geiser-gauche: Adjust to changes in emacs-build-system.
  gnu: emacs-dvc: Adjust to changes in emacs-build-system.
  gnu: emacs-w3m: Adjust to changes in emacs-build-system.
  gnu: emacs-wget: Port to emacs-build-system.
  gnu: emacs-haskell-mode: Adjust to changes in emacs-build-system.
  gnu: emacs-julia-snail: Adjust to changes in emacs-build-system.

Morgan Smith (5):
  gnu: emacs-geiser: Update to 0.13.
  gnu: Add emacs-geiser-guile.
  gnu: emacs-guix: Update to 0.5.2-4.8ce6d21.
  gnu: emacs-flycheck-guile: Add missing input.
  gnu: guile-studio: Add missing input.

Xinglu Chen (1):
  gnu: emacs-pdf-tools: Adjust to changes in emacs-build-system.

 gnu/local.mk                                  |   2 +
 gnu/packages/emacs-xyz.scm                    | 369 ++++++++++--------
 gnu/packages/emacs.scm                        |  52 ++-
 gnu/packages/guile-xyz.scm                    |   1 +
 gnu/packages/mail.scm                         |   3 +-
 ...ser-autoload-activate-implementation.patch |  26 ++
 .../emacs-geiser-guile-auto-activate.patch    |  34 ++
 guix/build/emacs-build-system.scm             |  70 ++--
 guix/profiles.scm                             |  41 ++
 guix/status.scm                               |   2 +
 10 files changed, 391 insertions(+), 209 deletions(-)
 create mode 100644 gnu/packages/patches/emacs-geiser-autoload-activate-implementation.patch
 create mode 100644 gnu/packages/patches/emacs-geiser-guile-auto-activate.patch

--
2.31.1

Comments

Xinglu Chen April 29, 2021, 12:16 p.m. UTC | #1
Hi,

On Thu, Apr 08 2021, Leo Prikler wrote:

> Hi Guix,
>
> as you all recall, I recently put in some efforts into improving the
> Emacs user experience in Guix.  There are three bugs addressed by this
> patch set:
>
> 1. Emacs libraries may inadvertently overwrite files in other libraries
>    (solved by using ELPA-style subdirectories)
> 2. Emacs cannot find its own load-path after an update.  (Solved with a
>    wrapper).
> 3. Emacs can't find core programs, such as "ls" or "gzip".

I just wanted to let you know that I have been using these patches with
Emacs for a few days, and things have been working fine so far :)  I
haven’t tested all the updated packages, though.

Out of curiosity, what are the differences between v2 and v1 of the
series?  It would be nice to include a cover letter for v2 to give an
overview of the changes since v1.

Thanks for working on this!
Leo Prikler April 29, 2021, 2:58 p.m. UTC | #2
Am Donnerstag, den 29.04.2021, 14:16 +0200 schrieb Xinglu Chen:
> Hi,
> 
> On Thu, Apr 08 2021, Leo Prikler wrote:
> 
> > Hi Guix,
> > 
> > as you all recall, I recently put in some efforts into improving
> > the
> > Emacs user experience in Guix.  There are three bugs addressed by
> > this
> > patch set:
> > 
> > 1. Emacs libraries may inadvertently overwrite files in other
> > libraries
> >    (solved by using ELPA-style subdirectories)
> > 2. Emacs cannot find its own load-path after an update.  (Solved
> > with a
> >    wrapper).
> > 3. Emacs can't find core programs, such as "ls" or "gzip".
> 
> I just wanted to let you know that I have been using these patches
> with
> Emacs for a few days, and things have been working fine so far :)  I
> haven’t tested all the updated packages, though.
> 
> Out of curiosity, what are the differences between v2 and v1 of the
> series?  It would be nice to include a cover letter for v2 to give an
> overview of the changes since v1.
The difference of v2 w.r.t. v1 lies in how Emacs finds core binaries
([03/33] in the respective series).  v1 hardcodes them, but as I
feared, that won't work with tramp, so I changed it to adjusting PATH
in v2.  You can test that this has a visible effect by checking some
variant of emacs-next both with v1 and v2.

Regards,
Leo
Xinglu Chen April 30, 2021, 8:25 a.m. UTC | #3
On Thu, Apr 29 2021, Leo Prikler wrote:

>> Out of curiosity, what are the differences between v2 and v1 of the
>> series?  It would be nice to include a cover letter for v2 to give an
>> overview of the changes since v1.
> The difference of v2 w.r.t. v1 lies in how Emacs finds core binaries
> ([03/33] in the respective series).  v1 hardcodes them, but as I
> feared, that won't work with tramp, so I changed it to adjusting PATH
> in v2.  You can test that this has a visible effect by checking some
> variant of emacs-next both with v1 and v2.

Ok, thanks for explaining.
Leo Prikler May 1, 2021, 6:45 p.m. UTC | #4
I've now pushed this patch set.  Thanks, everyone who contributed
packages.  Thanks, everyone who submitted bugs.  And thanks to Xinglu
Chen for helping me test.

I apologize in advance for all the bugs, that we didn't catch in the
last fourteen days.  Please yell at me as loud as you can if you find
one.  I wish you all enjoy a wonderful Labour Day.

Leo
Arun Isaac May 4, 2021, 5:13 a.m. UTC | #5
Hi Leo,

Thanks for your work on the emacs-build-system!

In guix/build/emacs-build-system.scm, is the comment before %install-dir
still consistent with your changes? It seems to describe the old system
when all files were installed into site-lisp.

--8<---------------cut here---------------start------------->8---
;;; All the packages are installed directly under site-lisp, which means that
;;; having that directory in the EMACSLOADPATH is enough to have them found by
;;; Emacs.
(define %install-dir "/share/emacs/site-lisp")
--8<---------------cut here---------------end--------------->8---

Could you fix this?

Thank you for your time! :-)
Arun
Leo Prikler May 4, 2021, 6:38 a.m. UTC | #6
Hi Arun,

Am Dienstag, den 04.05.2021, 10:43 +0530 schrieb Arun Isaac:
> In guix/build/emacs-build-system.scm, is the comment before %install-
> dir
> still consistent with your changes? It seems to describe the old
> system
> when all files were installed into site-lisp.
> 
> --8<---------------cut here---------------start------------->8---
> ;;; All the packages are installed directly under site-lisp, which
> means that
> ;;; having that directory in the EMACSLOADPATH is enough to have them
> found by
> ;;; Emacs.
> (define %install-dir "/share/emacs/site-lisp")
> --8<---------------cut here---------------end--------------->8---

Thanks for pointing this out.  How would

--8<---------------cut here---------------start------------->8---
;;; The location in which Emacs looks for packages.  Emacs Lisp code,
that is
;;; installed there directly will be found when that directory is added
to
;;; EMACSLOADPATH.  To avoid clashes between packages (particularly
considering
;;; auxiliary files), we install them one directory level below,
however.
;;; This indirection is handled by ‘expand-load-path’ during build and
a
;;; profile hook otherwise.
(define %install-dir "/share/emacs/site-lisp")
--8<---------------cut here---------------end--------------->8---

sound?
Arun Isaac May 4, 2021, 9:02 p.m. UTC | #7
Hi Leo,

> --8<---------------cut here---------------start------------->8---
> The location in which Emacs looks for packages.  Emacs Lisp code, that
> is installed there directly will be found when that directory is added
> to EMACSLOADPATH.  To avoid clashes between packages (particularly
> considering auxiliary files), we install them one directory level
> below, however.  This indirection is handled by ‘expand-load-path’
> during build and a profile hook otherwise.
> --8<---------------cut here---------------end--------------->8---

Are there still packages that directly install into
/share/emacs/site-lisp as mentioned in sentence 2? Apart from that one
sentence, this looks good to me.

Thanks!
Leo Prikler May 4, 2021, 9:22 p.m. UTC | #8
Am Mittwoch, den 05.05.2021, 02:32 +0530 schrieb Arun Isaac:
> Hi Leo,
> 
> > --8<---------------cut here---------------start------------->8---
> > The location in which Emacs looks for packages.  Emacs Lisp code,
> > that
> > is installed there directly will be found when that directory is
> > added
> > to EMACSLOADPATH.  To avoid clashes between packages (particularly
> > considering auxiliary files), we install them one directory level
> > below, however.  This indirection is handled by ‘expand-load-path’
> > during build and a profile hook otherwise.
> > --8<---------------cut here---------------end--------------->8---
> 
> Are there still packages that directly install into
> /share/emacs/site-lisp as mentioned in sentence 2? Apart from that
> one
> sentence, this looks good to me.
I haven't done an exhaustive check, so there might be some odd
packages, that don't fit into sentence 3.  The profile hook counts as
"Emacs lisp code installed there directly" imo as well.

Regards,
Leo
Arun Isaac May 5, 2021, 7:47 a.m. UTC | #9
Ok, that makes sense. Do proceed with the fix.

Thanks!
Arun