unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Infrastructure for packages to suggest customizations
Date: Tue, 16 Feb 2021 12:18:37 +0100	[thread overview]
Message-ID: <8735xwb6r6.fsf@posteo.net> (raw)
In-Reply-To: <jwvim6s218x.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 15 Feb 2021 21:37:06 -0500")

[-- Attachment #1: Type: text/plain, Size: 1986 bytes --]

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> in the recent discussion on reserving a keymap for packages, I proposed
>> extending package.el to support a sort of formal specification of what a
>> user should or could customize. As there were some supportive comments,
>> I attempted to improve on an earlier proof-of-concept[0], resulting in
>> the attached patch.
>
> Thanks.  Could we "simply" make it a Custom group?
> For keys I'd imagine something like
>
>     (defcustom avy-global-goto-key nil
>       :group 'suggestions
>       :type 'key-sequence
>       :options '("C-:")
>       :set (lambda (symbol value)
>              (if value (global-set-key value 'avy-goto-char))))
>
>> Part of my intention was to generate code that can easily be changed
>> and adapted by the user (unlike custom-set-variables), so I don't
>> analyse the files themselves. This might not look nice in some cases,
>> but then again, these people are probably not the ones using this
>> feature
>
> I don't understand what you mean to say here, sorry.

No, it's my mistake, I'll try to rephrase it:

The suggestion you've made above was also something I considered:
Relying on the customize system makes it easier to implement the
functionality but it at the same time hides it behind the complexity of
customize. So while the absolute beginner wouldn't notice or care, the
next step of a beginner might be confused how the keys were bound, and
how to change it.

That is why the patch generates "real" configuration code, not "hiding"
what is going on, but demonstrating what and how changing your Emacs is
done.

The downside to this is that because there is no interface like
customize, it can't just find and replace a previous global-set-key,
because that would require modifying regular code in a user
configuration, that might not even be in .emacs or init.el.

Hope that clarifies the intention.

>         Stefan
>

-- 
	Philip K.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 686 bytes --]

  reply	other threads:[~2021-02-16 11:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16  1:12 Infrastructure for packages to suggest customizations Philip Kaludercic
2021-02-16  2:37 ` Stefan Monnier
2021-02-16 11:18   ` Philip Kaludercic [this message]
2021-02-16  6:09 ` Jean Louis

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=8735xwb6r6.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).