unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#66702: Add easy customization for .dir-locals.el files
@ 2023-10-23 14:21 Mauro Aranda
  2023-10-23 14:24 ` Mauro Aranda
  0 siblings, 1 reply; 9+ messages in thread
From: Mauro Aranda @ 2023-10-23 14:21 UTC (permalink / raw)
  To: 66702

Severity: wishlist

This is a feature request.  The idea is to provide an Easy Customization
interface to editing .dir-locals.el files:
https://lists.gnu.org/archive/html/emacs-devel/2023-09/msg01306.html

Currently, there are two ways of handling .dir-locals.el: either by
hand or by using the *-dir-locals commands.  Using the Customize
interface has, IMO, the following non-exhaustive advantages:
- It's useful for beginners or for people that are used to using the
interface for customizing the init file.
- Validation for defcustom :type, unlike the commands in files-x.el
- Ability to edit multiple settings and then save just once.
- Ability to quickly select the .dir-locals file to edit.

I'll attach a patch once I get assigned a Bug#.  The patch adds a new
command, customize-dirlocals to pop up a buffer with the dirlocals
settings in a .dir-locals.el file.  The file can be changed later on in
the buffer.  Saving, reverting and validating customizations is
supported.  There is also support for the menubar and the toolbar.

There are some differences with the usual Customize buffer.  One is
that, since these customizations don't go to the custom-file, I didn't
reuse all of the functions for creating the Custom buffer, neither I
reuse Custom-mode.  Other one is that there's no "magic" widget, no
information about the STATE of the variable, or the widget.

The most important difference, I think, is that the buffer needs to
update upon each option the user wants to edit.  This is similar to the
situation for the customize-create-theme buffer, but my code follows a
different approach.  It lets the user enter any symbol, and upon hitting
RET or TAB it updates the widget that will hold the value.  The *Custom
Theme* buffer prompts for the variable to edit, so it can add the right
editing widget.







^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-28 17:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-23 14:21 bug#66702: Add easy customization for .dir-locals.el files Mauro Aranda
2023-10-23 14:24 ` Mauro Aranda
2023-10-23 17:16   ` Juri Linkov
2023-10-23 20:43     ` Mauro Aranda
2023-10-24  6:58       ` Juri Linkov
2023-10-24  9:45         ` Mauro Aranda
2023-10-25  6:48           ` Juri Linkov
2023-10-27 11:06             ` Mauro Aranda
2023-10-28 17:02   ` Juri Linkov

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).