emacs-devel
[Top][All Lists]
Advanced

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

Re: [External] : Re: Propose to add setup-wizard.el to ELPA


From: Lars Ingebrigtsen
Subject: Re: [External] : Re: Propose to add setup-wizard.el to ELPA
Date: Tue, 04 Jan 2022 16:04:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Yuan Fu <casouri@gmail.com> writes:

> Custom cannot save some of the results produced by the wizard, for
> example, key bindings and Unicode fonts. And I don’t know if
> package-selected-packages is enough for packages. Here is an example
> for the generated configuration:
>
> ;; Load modus-operandi theme
> (load-theme 'modus-operandi)
>
> ;; Set bindings for copy/cut/paste.
> (global-set-key
>  (kbd "s-c")
>  #'kill-ring-save)

By the way, if you're targeting Emacs 29 for this, you can use
`pp-emacs-lisp-code' to get more readable results, which would be a
priority if we want to move to a more code-based format for wizards and
customisations.

(And you can use `keymap-global-set'.)

>   (require 'package)

And that's not necessary, I think?

Anyway, I'm in favour of setup wizards...  but I don't think there
should be only one.  I think we should invite people to submit setup
wizards (like we do face themes), and then Emacs should list these (with
an explanation of what the use case for each wizard/configuration is).

I also think it's high time that we default to not having the Customize
stuff in the init file, but put it in a different file.  And if we do
that, I think we should discuss whether to change the format.  I think
it'd make sense to move to a more code-based format for the file.
Instead of

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(foo-var 'bar)
 '(zot-thing '("/tmp")))

which is doesn't teach the user anything about anything, and is
unnecessarily hard to edit by hand, we could have:

;; `foo-var' controls ow fooification happens.
(setopt foo-var 'bar)

;; `zot-thing' is the directory where the Zot package stores stuff.
(setopt zoo-thing '("/tmp/"))

I.e., have the first line from the doc string in the file, and use
setopt (an alias for `customize-set-variable').  Users would be able to
read this file, and understand what it does, and edit it by hand if they
want to.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]