unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "rms@gnu.org" <rms@gnu.org>, "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Systematic implicit aliases for option variables
Date: Tue, 1 Mar 2022 17:43:13 +0000	[thread overview]
Message-ID: <SJ0PR10MB54884EB50BEBD1F02B88A69EF3029@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <E1nOu49-0003S0-Gi@fencepost.gnu.org>

> `occur' is an alias for the command `list-matching-lines'.
> `occur' may be used by more people than `list-matching-lines'.

Definitely.  Just as more users might think
of `flush-lines' and `keep-lines' than
`delete-matching-lines' and
`delete-non-matching-lines'.

> There are options named `list-matching-lines-*', but people who know
> the command as `occur' may not think to look for options with those
> names.
> 
> Does it make sense to define a command `customize-command' which takes
> a command name as argument and shows you the options that are
> pertinent to customizing that command?

Not sure.  The options relevant for some
commands can be diverse.

Also, is this only relevance for "customizing
that command", by which I guess you mean
options that change its behavior?  Or does it
include relevance in other senses?

> If you give it `occur', it would recognize that that is an alias
> for `list-matching-lines', and show you the options pertinent to
> `list-matching-lines'.  You wouldn't need to know that `occur'
> is an alias.

That would come for free, I think, if we just
aliased those options (like we do the commands),
to let users see them also/alternatively as
"occur" options: use prefix `occur-' for aliases
of options that have prefix `list-matching-lines'.

This would help users find and access such things.
It leverages existing search, apropos, completion,
and other help aids (ways to "ask Emacs").

See also: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54157

> I think the hard part of this would be adding a data base to find the
> custom groups that are pertinent to any particular command.

Dunno.  If this is (only) about options that
change the behavior of a command then the option
doc strings will often mention the command(s)
they affect.

In that case, `apropos-doc' tells us which
options affect which commands.

And it can sometimes provide info about
potential aliasing.  For example,
`M-x apropos-doc list-matching-lines' shows
that the doc of command `occur' mentions option
`list-matching-lines-default-context-lines'.

  parent reply	other threads:[~2022-03-01 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01  4:24 Systematic implicit aliases for option variables Richard Stallman
2022-03-01  8:08 ` Eli Zaretskii
2022-03-02  4:46   ` Richard Stallman
2022-03-02 11:01     ` Eli Zaretskii
2022-03-03  5:08       ` Richard Stallman
2022-03-01 17:43 ` Drew Adams [this message]
2022-03-03  5:05   ` [External] : " Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=SJ0PR10MB54884EB50BEBD1F02B88A69EF3029@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).