emacs-devel
[Top][All Lists]
Advanced

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

Re: An easier way to edit variables


From: Ted Zlatanov
Subject: Re: An easier way to edit variables
Date: Wed, 14 Jan 2015 14:10:25 -0500
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (darwin)

On Wed, 14 Jan 2015 16:09:10 +0000 (UTC) Tom <address@hidden> wrote: 

T> Ted Zlatanov <tzz <at> lifelogs.com> writes:
>> 
>> Perhaps, but I think it's significantly less useful to users if you just
>> drop them into a "enter a Lisp form" interface.  It could actually be
>> harmful and lose their data.

T> Users already have customize. Just a put a customize button 
T> into the Help buffer for those variables which are customizable
T> and users can click on that.

I suggested that, hidden by an accordion-style interface so it doesn't
take up space unnecessarily. Would you consider adding that to your
patch?

T> The in place lisp editing is useful for advanced users. Why not help
T> them if it's not hard to implement?

I didn't say it's not nice and convenient, just that it's not as useful
as I thought because you're talking about in-place editing of arbitrary
Lisp code.  It serves a smaller audience.  See below for some
suggestions, but please don't consider me opposed even to a rudimentary
implementation as long as it's something better than the current state.

Regarding your current UI proposal, I think hitting a special key is a
barrier for users. At least for the Customize link, the UI should be in
the help buffer. Joe New User should be able to say `C-h v
the-variable-name' and start customizing it right away, not learn new
keystrokes and click on links.

On Wed, 14 Jan 2015 23:56:34 +0700 Yuri Khan <address@hidden> wrote: 

YK> On Wed, Jan 14, 2015 at 10:09 PM, Tom <address@hidden> wrote:

>> Yes, I also know about these, but still if I want to change the
>> value of some variable then I have to copy its name and value into
>> scratch the change and evaluate it there, etc.
>> 
>> It would be much more convenient to simply press 'e', edit the value in
>> place and apply it.

YK> It might be even more convenient if pressing the key prepared a nicely
YK> formatted (setq VARIABLE-NAME CURRENT-VALUE) form and presented *that*
YK> in a lisp-interaction-mode buffer. Then it could be edited and
YK> evaluated right there, and/or copy-pasted into an .emacs.d/init.el.

I'd find that better than trying to edit a Lisp form directly.  The
problem with the form is that it can get very complex, and you need the
tools that go with Emacs Lisp editing in a `lisp-mode' buffer
(font-lock, navigation, plus the countless customizations power users
do).  So if that can be done, I'm 100% in favor.  If not, I'm not
against it, just not excited by it :)

(I also wonder if the above UI wouldn't be nice as an addition to
Customize itself. I often play with the widgets but want to see the
result as a Lisp form quickly, jumping back and forth. We have the menu
item "show saved state as a Lisp expression" but that shows the *saved*
data and not in `lisp-mode'.)

Ted




reply via email to

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