From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: An easier way to edit variables Date: Wed, 14 Jan 2015 14:10:25 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: References: Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1421262663 6836 80.91.229.3 (14 Jan 2015 19:11:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2015 19:11:03 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 14 20:10:58 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YBTLG-0000dR-Ak for ged-emacs-devel@m.gmane.org; Wed, 14 Jan 2015 20:10:58 +0100 Original-Received: from localhost ([::1]:47784 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBTLF-0005mR-Gy for ged-emacs-devel@m.gmane.org; Wed, 14 Jan 2015 14:10:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBTL0-0005mL-P4 for emacs-devel@gnu.org; Wed, 14 Jan 2015 14:10:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBTKw-00008B-63 for emacs-devel@gnu.org; Wed, 14 Jan 2015 14:10:42 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:54263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBTKv-00006q-V5 for emacs-devel@gnu.org; Wed, 14 Jan 2015 14:10:38 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YBTKt-0000Tl-Sg for emacs-devel@gnu.org; Wed, 14 Jan 2015 20:10:36 +0100 Original-Received: from 198.0.146.153 ([198.0.146.153]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Jan 2015 20:10:35 +0100 Original-Received: from tzz by 198.0.146.153 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Jan 2015 20:10:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 61 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 198.0.146.153 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (darwin) Cancel-Lock: sha1:EWh5IojPtSef/Dpd/pqtbWndwbg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181263 Archived-At: On Wed, 14 Jan 2015 16:09:10 +0000 (UTC) Tom wrote: T> Ted Zlatanov 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 wrote: YK> On Wed, Jan 14, 2015 at 10:09 PM, Tom 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