all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alexander Adolf <alexander.adolf@condition-alpha.com>
To: emacs-devel@gnu.org
Subject: Re: A proposal for a friendlier Emacs
Date: Mon, 21 Sep 2020 22:00:21 +0200	[thread overview]
Message-ID: <1e340d941b6fd0b21a477f39fc935468@condition-alpha.com> (raw)
In-Reply-To: <alpine.NEB.2.22.394.2009171142140453.31289@sdf.lonestar.org>

Hello,

I started using Emacs when I first installed Lucid Emacs on a
SPARCstation LX, must have been early 1990s, and I have gone through
quite a couple of Emacs configs since then (SunOS, Solaris, and now
macOS).

Since one of the topics on the Emacs 28/modern threads here was
"on-boarding" of new users, I thought I'd share a few experiences of
what some hard parts were while developing my configs.

----------------------------------------------------------------------

The first hurdle is that when developing a config (yes, its a
development task), is that you're essentially pulling yourself out if
the swamp by your own hair. I.e. you are using Emacs to edit its own
configuration files. Many settings have immediate effect, and that's
super cool. Some don't, however, (or maybe you forgot to eval-region)
and seem to be evaluated only once at start-up time.

Another aspect of this is that not every change I make is one I will
want to keep (I'm trying things out). So this is about "backing out"
changes and restoring state. Whatever I want to achieve, in order to be
able to revert things later, I'll have to make note of the values of
variables and hooks before I change them, so I'll be able to restore the
previous value. Lest I forgot to make note...

Both things together result in me restarting Emacs every now and then
when developing a config, so as to be able to start from a clean slate,
and make sure that all config changes have been applied. Restarting
brings with it a couple of inconveniences. Apart from the wait, it also
means that I will need to re-open all the files, custom buffers,
documentation, and what not I had open before.

Thus, in my ideal world I would like to be able to start a new Emacs
instance, that loads the new config, has debug-on-error set, verbose
logging, and perhaps some more things to help me debug my new config. In
the new Emacs instance, I can take my new config for a spin, and
terminate it when I'm done (or even kill it if I messed up badly). Then
I drop back into the initial Emacs instance (still all buffers open),
refine the config, and give it another round.

----------------------------------------------------------------------

As your config evolves, the next question everyone will be asking
themselves is "custom.el or init file?" While there is no one answer to
this, of course, but it hints to a wider issue. With flexibility (of
init files architecture), comes responsibility (to choose the right
architecture for my case).

Here is what I observed: when I start adding a new class of use-cases
(example: email), I start out with a single package, that does most of
what I want/need. In that phase, I tend to name the config file after
the package (because the use-case and the package are one and the same
in my mental model). As I keep refining, and adding features, other
packages will likely come into play. At this point I realise that the
config file name no longer fits, and rename it to reflect the use-case
class. Within this config file, I keep the setting for each package in a
different section (separated by comments).

Again, in my ideal world, each package would be classified into exactly
one main category (email, content completion, etc.). When I install
(package-list-packages) the first package from a category I haven't had
before, Emacs would create a new file in the init directory, named after
the category (example: email.el), with a (provide 'setup-category) at
the end, and a section for the new package that has a copy of the init
code proposed by the package's documentation, and would eval-region on
the init code. When I install the next package from that category, Emacs
would just drop a new section into the respective init file, and
eval-region that section. Oh, and of course a (require 'setup-category)
would also need to be automatically dropped into init.el.

Of course this will not make every experienced user happy, and people
with existing, sophisticated configs will want to switch this off. So
there should be a variable to turn the whole mechanism off. Maybe in
early-init.el? But I think it could be a subtle way of guiding new users
to starting with a structured approach to init files (searching for
"emacs.d" on GitHub as of this writing lists 10,521 repositories).

In the long run, this could also be a tool for doing away with
custom.el. Just have Custom insert a custom-set-variables with the
settings for that package in the section for that package in the
respective category config file. And the settings for Emacs itself would
live in init.el.

----------------------------------------------------------------------

The third area I'd like to touch on are faces. This is what certainly
everybody will want to customise at some point. The reality of
customising faces is: it's hard. Faces can inherit from one another, so
sometimes I end up changing a couple of faces, when it would have been
sufficient to customise one (the "parent"). An "inheritance tree" would
help here.

Also, 'C-u C-x =' (what-cursor-position; 10 points for choosing a
calling name, btw.) is your friend to find out which of the many many
faces to change (provided you discovered it). But then you'll have to
strike the key chord time again to discover the faces and overlays here
and there. Why couldn't what-cursor-position just split the window,
display its information in the other window, and let me move around in
my buffer, updating the face/overlay information in the other window as
I move the cursor around? And as most of us are on graphical desktops
these days, where's the option to hover with the mouse and get
face/overlay information for what's under the mouse?

One more thing on what-cursor-position: in the info buffer, there's a
link for the face that takes me to another info screen, which in turn
describes the face's attributes, and gives me a "you can configure this"
link. IMO, this is redundant. Just give me a direct link to the face's
customisation from the initial what-cursor-position infp screen. The
customisation buffer will also show me the current attributes, so the
"intermediate" face attributes info screen has no added value to me.

----------------------------------------------------------------------

Finally, a few thoughts on packages and curation. As of this writing,
the combined list of ELPA, MELPA, and builtin packages of my current
emacs lists 5,065 packages. Chances are, whatever topic you're looking
at, there's more than one package. Which one is the best for my
purposes?

The Comprehensive Perl Archive Network (CPAN), which as of this writing
offers 196,156 Perl modules, faces similar issues. It has a simple
mechanism, which I find very helpful for quickly narrowing down my
selection. Users can do "add to favourites" for a module. When one
browses the modules, the number of users who faved it is shown. Not
perfect, but a rule-of-thumb estimate for a module's popularity. In my
ideal world, such a favourite mechanism would be added to ELPA and
MELPA, too, and the favourite count be displayed in the package
details screen of package-list-packages.

----------------------------------------------------------------------


Looking forward to your thoughts,

  --alexander



  reply	other threads:[~2020-09-21 20:00 UTC|newest]

Thread overview: 129+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17  8:50 A proposal for a friendlier Emacs Nicola Manca
2020-09-17  9:04 ` Alfred M. Szmidt
2020-09-17  9:27   ` Nicola Manca
2020-09-17 12:24     ` Alfred M. Szmidt
2020-09-17 12:35       ` Thibaut Verron
2020-09-17 13:22         ` Alfred M. Szmidt
2020-09-17 13:26           ` Thibaut Verron
2020-09-17 13:31             ` Alfred M. Szmidt
2020-09-17 13:34               ` Thibaut Verron
2020-09-17 14:27                 ` Alfred M. Szmidt
2020-09-18 16:49                   ` Stefan Kangas
2020-09-18 18:25                     ` Alfred M. Szmidt
2020-09-18 18:59                       ` Thibaut Verron
2020-09-18 19:23                         ` Alfred M. Szmidt
2020-09-19  8:37                           ` Andrea Corallo via Emacs development discussions.
2020-09-19  9:21                             ` Alfred M. Szmidt
2020-09-19 11:25                           ` Stefan Kangas
2020-09-19 15:09                             ` Alfred M. Szmidt
2020-09-19 19:31                               ` Andrea Corallo via Emacs development discussions.
2020-09-19 19:59                                 ` Eli Zaretskii
2020-09-19 21:37                                   ` Andrea Corallo via Emacs development discussions.
2020-09-20  6:22                                     ` Alfred M. Szmidt
2020-09-20  7:45                                   ` Ergus via Emacs development discussions.
2020-09-20  8:13                                     ` Eli Zaretskii
2020-09-20  8:25                                       ` Ergus
2020-09-21 17:19                                     ` Jean Louis
2020-09-22 12:59                                       ` Ergus
2020-09-22 14:11                                         ` Jean Louis
2020-09-22 17:50                                           ` Colin Baxter
2020-09-22 18:08                                             ` Mingde (Matthew) Zeng
2020-09-22 19:12                                               ` Colin Baxter
2020-09-19 21:04                                 ` Alfred M. Szmidt
2020-09-19 21:26                                   ` Andrea Corallo via Emacs development discussions.
2020-09-20  6:21                                     ` Alfred M. Szmidt
2020-09-19  8:30                         ` Andrea Corallo via Emacs development discussions.
2020-09-19 15:50                         ` Philip K.
2020-09-20  3:53                     ` 황병희
2020-09-17 13:38             ` Alfred M. Szmidt
2020-09-17 12:40       ` Nicholas Savage
2020-09-17 13:22         ` Alfred M. Szmidt
2020-09-17 13:28         ` Thibaut Verron
2020-09-17 19:40         ` Mingde (Matthew) Zeng
2020-09-17  9:07 ` Gregory Heytings via Emacs development discussions.
2020-09-17  9:32   ` Nicola Manca
2020-09-17  9:44     ` Gregory Heytings via Emacs development discussions.
2020-09-21 20:00       ` Alexander Adolf [this message]
2020-09-22  3:38         ` Richard Stallman
2020-09-22 20:50           ` Alexander Adolf
2020-09-22 21:54             ` Drew Adams
2020-09-23 14:20               ` Eli Zaretskii
2020-09-23 14:16             ` Eli Zaretskii
2020-09-25 13:22               ` Alexander Adolf
2020-09-25 13:39                 ` Eli Zaretskii
2020-09-25 14:43                   ` Alexander Adolf
2020-09-25 15:05                     ` Eli Zaretskii
2020-09-26  4:35                       ` Richard Stallman
2020-09-29 17:08                         ` Alexander Adolf
2020-09-29 17:38                           ` Eli Zaretskii
2020-09-30 20:40                             ` Alexander Adolf
2020-10-01 12:55                               ` Eli Zaretskii
2020-10-01 16:13                                 ` Alexander Adolf
2020-10-01 16:18                                   ` Eli Zaretskii
2020-10-01 16:49                                     ` Stefan Monnier
2020-10-01 17:23                                       ` Eli Zaretskii
2020-10-01 17:57                                         ` Stefan Monnier
2020-10-02 16:10                                     ` Alexander Adolf
2020-10-02  3:51                                   ` Classifying packages Richard Stallman
2020-09-22  3:38         ` A proposal for a friendlier Emacs Richard Stallman
2020-09-22 20:57           ` Alexander Adolf
2020-09-23  3:44             ` Richard Stallman
2020-09-25 12:40               ` Alexander Adolf
2020-09-25 15:22                 ` Drew Adams
2020-09-26  4:33                   ` Richard Stallman
2020-09-26 14:29                     ` Drew Adams
2020-09-27  2:43                       ` Richard Stallman
2020-09-27 19:49                         ` Drew Adams
2020-09-28  3:49                           ` Richard Stallman
2020-09-28  4:50                             ` Drew Adams
2020-09-28 22:03                             ` Jean Louis
2020-09-29  2:32                               ` Eli Zaretskii
2020-09-29  2:35                                 ` Stefan Monnier
2020-09-29  4:16                                 ` Jean Louis
2020-09-29  5:35                                   ` Eli Zaretskii
2020-09-29  5:45                                     ` Jean Louis
2020-09-29 14:24                                       ` Eli Zaretskii
2020-09-29 15:21                                         ` Jean Louis
2020-10-20 13:07                                           ` Arthur Miller
2020-10-20 15:32                                             ` Jean Louis
2020-10-27  4:32                                               ` Arthur Miller
2020-10-27  7:50                                                 ` Jean Louis
2020-09-29  7:19                                   ` Alfred M. Szmidt
2020-09-29  7:55                                     ` Jean Louis
2020-09-29  8:23                                       ` Alfred M. Szmidt
2020-09-29  8:27                                         ` Jean Louis
2020-09-29 15:07                                         ` Jean Louis
2020-09-29 14:20                                   ` Eli Zaretskii
2020-09-30 18:36                                     ` Juri Linkov
2020-09-30 19:25                                       ` Eli Zaretskii
2020-09-30 19:50                                         ` Gregory Heytings via Emacs development discussions.
2020-10-01  7:27                                           ` Robert Pluim
2020-10-01 13:10                                             ` Eli Zaretskii
2020-10-01 14:10                                               ` Robert Pluim
2020-10-01 12:44                                           ` Eli Zaretskii
2020-10-01 14:19                                           ` Jean Louis
2020-10-02  3:51                                           ` Richard Stallman
2020-10-02  6:59                                             ` Eli Zaretskii
2020-10-01 14:13                                       ` Jean Louis
2020-10-01 14:48                                         ` Eli Zaretskii
2020-10-01 16:05                                           ` dictionary.el could be included in main stream Emacs - " Jean Louis
2020-10-02 11:40                                             ` Eli Zaretskii
2020-10-04 17:36                                               ` Torsten Hilbrich
2020-10-01 18:47                                         ` Juri Linkov
2020-09-28 22:05                             ` Jean Louis
2020-09-21 17:07 ` Jean Louis
2020-09-22  3:40   ` Richard Stallman
2020-09-22  6:22     ` Alfred M. Szmidt
2020-09-23  3:43       ` Richard Stallman
2020-09-22  6:24     ` Jean Louis
2020-09-22 14:10       ` Eli Zaretskii
2020-09-22 14:22         ` Jean Louis
2020-09-22 14:31           ` Eli Zaretskii
2020-09-22 14:52             ` Jean Louis
2020-09-22 15:34               ` Eli Zaretskii
2020-09-22 16:03                 ` Jean Louis
2020-09-22 16:33                   ` Eli Zaretskii
2020-09-23  3:41           ` Richard Stallman
2020-09-22 15:44         ` Jean Louis
2020-09-23  3:41         ` Richard Stallman
2020-09-23 14:21           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e340d941b6fd0b21a477f39fc935468@condition-alpha.com \
    --to=alexander.adolf@condition-alpha.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.