* bug#38696: "If you edit it by hand, you could mess it up" @ 2019-12-21 0:02 積丹尼 Dan Jacobson 2019-12-21 6:34 ` Phil Sainty ` (3 more replies) 0 siblings, 4 replies; 16+ messages in thread From: 積丹尼 Dan Jacobson @ 2019-12-21 0:02 UTC (permalink / raw) To: 38696; +Cc: rms Here's a problem that I think illustrates a departure from Dr. Stallman's original goals (which include to keep the user "in the know", "in control.") Let's say the user wants to make the font bigger. In emacs he goes into the menu bar and picks "Options" > "Set Default Font", makes it bigger, and then chooses "Save Options", which pastes some "custom-set" code into his .emacs file that even contains a warning "If you edit it by hand, you could mess it up", meaning for the rest of his life he should just play it safe and stick with the menus. It might as well just paste some compiled bytecode in there. There isn't even any good old fashioned setq versions the user could learn with and expand left around in any temporary buffer. Nor is there any decompiler command provided. ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-21 0:02 bug#38696: "If you edit it by hand, you could mess it up" 積丹尼 Dan Jacobson @ 2019-12-21 6:34 ` Phil Sainty 2019-12-21 8:12 ` 積丹尼 Dan Jacobson 2019-12-21 19:08 ` Richard Stallman ` (2 subsequent siblings) 3 siblings, 1 reply; 16+ messages in thread From: Phil Sainty @ 2019-12-21 6:34 UTC (permalink / raw) To: 積丹尼 Dan Jacobson, 38696; +Cc: rms On 21/12/19 1:02 PM, 積丹尼 Dan Jacobson wrote: > that even contains a warning "If you edit it by hand, you could mess > it up", meaning for the rest of his life he should just play it safe > and stick with the menus. It neither says (nor even hints) that this will be the case "for the rest of [your] life". I think it implies that it's possible to avoid messing it up, provided that you know what you're doing; which in turn suggests that you might learn how to do that. Like everything else in Emacs, you can use the documentation and code in order to gain that understanding, if you choose to. For those who choose not to, the warning serves a valuable purpose. -Phil ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-21 6:34 ` Phil Sainty @ 2019-12-21 8:12 ` 積丹尼 Dan Jacobson 0 siblings, 0 replies; 16+ messages in thread From: 積丹尼 Dan Jacobson @ 2019-12-21 8:12 UTC (permalink / raw) To: Phil Sainty; +Cc: 38696, rms No. It could offer: "Would you like instead some simple lisp that you can modify by hand later? Even if it might not be as efficient?" Or it could just add the simple lisp version in a comment below its "custom-set" version without asking the user. Or it could document a decompiler. ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-21 0:02 bug#38696: "If you edit it by hand, you could mess it up" 積丹尼 Dan Jacobson 2019-12-21 6:34 ` Phil Sainty @ 2019-12-21 19:08 ` Richard Stallman 2019-12-22 0:35 ` 積丹尼 Dan Jacobson 2019-12-22 3:35 ` arthur miller 2020-08-06 10:16 ` Lars Ingebrigtsen 3 siblings, 1 reply; 16+ messages in thread From: Richard Stallman @ 2019-12-21 19:08 UTC (permalink / raw) To: ç©ä¸¹å°¼ Dan Jacobson; +Cc: 38696 [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > Let's say the user wants to make the font bigger. > In emacs he goes into the menu bar and picks "Options" > "Set > Default Font", makes it bigger, and then chooses "Save Options", which > pastes some "custom-set" code into his .emacs file > that even contains a warning "If you edit it by hand, you could mess it up", > meaning for the rest of his life he should just play it safe and stick > with the menus. Would you please show us what this looks like? -- Dr Richard Stallman Founder, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-21 19:08 ` Richard Stallman @ 2019-12-22 0:35 ` 積丹尼 Dan Jacobson 2019-12-22 17:04 ` Eli Zaretskii 2019-12-23 2:58 ` Richard Stallman 0 siblings, 2 replies; 16+ messages in thread From: 積丹尼 Dan Jacobson @ 2019-12-22 0:35 UTC (permalink / raw) To: Richard Stallman; +Cc: 38696 >>>>> "RMS" == Richard Stallman <rms@gnu.org> writes: RMS> Would you please show us what this looks like? $ cat .emacs (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. ) (custom-set-faces ;; custom-set-faces 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. '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant normal :weight normal :height 218 :width normal))))) There is no way offered to "decompile" this into something that all those Emacs manuals talk about when introducing how to edit your .emacs file. The user is no longer in full control, but must maintain it via an interface (the menus.) ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-22 0:35 ` 積丹尼 Dan Jacobson @ 2019-12-22 17:04 ` Eli Zaretskii 2019-12-23 2:58 ` Richard Stallman 1 sibling, 0 replies; 16+ messages in thread From: Eli Zaretskii @ 2019-12-22 17:04 UTC (permalink / raw) To: 積丹尼 Dan Jacobson; +Cc: 38696, rms > From: 積丹尼 Dan Jacobson > <jidanni@jidanni.org> > Date: Sun, 22 Dec 2019 08:35:54 +0800 > Cc: 38696@debbugs.gnu.org > > >>>>> "RMS" == Richard Stallman <rms@gnu.org> writes: > > RMS> Would you please show us what this looks like? > > $ cat .emacs > (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. > ) > (custom-set-faces > ;; custom-set-faces 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. > '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant normal :weight normal :height 218 :width normal))))) > > There is no way offered to "decompile" this into something that all > those Emacs manuals talk about when introducing how to edit your .emacs > file. custom-set-variables and custom-set-faces are documented in the ELisp manual, so, while the note about caution is in order (because not every user knows Lisp), there's nothing magical about the above, no more than some use of setq. > The user is no longer in full control, but must maintain it via an > interface (the menus.) Only if the user chooses not to be in control. ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-22 0:35 ` 積丹尼 Dan Jacobson 2019-12-22 17:04 ` Eli Zaretskii @ 2019-12-23 2:58 ` Richard Stallman 2019-12-23 3:29 ` 積丹尼 Dan Jacobson 1 sibling, 1 reply; 16+ messages in thread From: Richard Stallman @ 2019-12-23 2:58 UTC (permalink / raw) To: ç©ä¸¹å°¼ Dan Jacobson; +Cc: 38696 [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > (custom-set-faces > ;; custom-set-faces 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. > '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant normal :weight normal :height 218 :width normal))))) > There is no way offered to "decompile" this into something that all > those Emacs manuals talk about when introducing how to edit your .emacs > file. It isn't Lisp code. It is just data, and the bulk of it is a plist that is pretty obvious to edit. It would be useful to explain the three outer levels of list structure. A couple of lines of comment can explain that. -- Dr Richard Stallman Founder, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-23 2:58 ` Richard Stallman @ 2019-12-23 3:29 ` 積丹尼 Dan Jacobson 0 siblings, 0 replies; 16+ messages in thread From: 積丹尼 Dan Jacobson @ 2019-12-23 3:29 UTC (permalink / raw) To: Richard Stallman; +Cc: 38696 You would also need to tell them how to clone it to a new variable that would be safe from competition the next time they use such menus. And emacs would need to know about this new variable, in order to run items attached to it. ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-21 0:02 bug#38696: "If you edit it by hand, you could mess it up" 積丹尼 Dan Jacobson 2019-12-21 6:34 ` Phil Sainty 2019-12-21 19:08 ` Richard Stallman @ 2019-12-22 3:35 ` arthur miller 2019-12-22 17:49 ` Drew Adams 2020-08-06 10:16 ` Lars Ingebrigtsen 3 siblings, 1 reply; 16+ messages in thread From: arthur miller @ 2019-12-22 3:35 UTC (permalink / raw) To: 積丹尼 Dan Jacobson, Richard Stallman Cc: 38696@debbugs.gnu.org [-- Attachment #1: Type: text/plain, Size: 1643 bytes --] > The user is no longer in full control, but must > maintain it via an > interface (the menus.) Actually it says "you should be careful". It does not says you should never edit it. I don't think you have reason to edit it by hand, especially if you redirect customize saves to different file then your init, but you certainly can if you wish (and know what you are doing). -------- Originalmeddelande -------- Från: 積丹尼 Dan Jacobson <jidanni@jidanni.org> Datum: 2019-12-22 01:37 (GMT+01:00) Till: Richard Stallman <rms@gnu.org> Kopia: 38696@debbugs.gnu.org Ämne: bug#38696: "If you edit it by hand, you could mess it up" >>>>> "RMS" == Richard Stallman <rms@gnu.org> writes: RMS> Would you please show us what this looks like? $ cat .emacs (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. ) (custom-set-faces ;; custom-set-faces 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. '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant normal :weight normal :height 218 :width normal))))) There is no way offered to "decompile" this into something that all those Emacs manuals talk about when introducing how to edit your .emacs file. The user is no longer in full control, but must maintain it via an interface (the menus.) [-- Attachment #2: Type: text/html, Size: 2575 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-22 3:35 ` arthur miller @ 2019-12-22 17:49 ` Drew Adams 2019-12-23 0:36 ` 積丹尼 Dan Jacobson 2019-12-24 4:13 ` Richard Stallman 0 siblings, 2 replies; 16+ messages in thread From: Drew Adams @ 2019-12-22 17:49 UTC (permalink / raw) To: arthur miller, 積丹尼 Dan Jacobson, Richard Stallman Cc: 38696 >> The user is no longer in full control, but must >> maintain it via an interface (the menus.) > > Actually it says "you should be careful". It does > not says you should never edit it. I don't think > you have reason to edit it by hand, especially if > you redirect customize saves to different file > then your init, but you certainly can if you wish > (and know what you are doing). The most important message about this, for users, is to let them know that this code is inserted and _updated (overwritten) automatically_. That's the _reason_ we warn users not to edit it. It's not so much because their edits might mess something up. It's that they need to be aware that editing it competes with automatic updating. If you edit it then you are fighting against Customize. If you edit it, and if you never use Customize (and no code you use ever uses Customize code), then, yes, the only potential problem is that you can mess things up for your future Emacs sessions. But that's not the likeliest scenario. The real, more likely problem is that you make a change to this code and later Customize overwrites your change - and you might not be aware of that. IMO, that's what this inserted comment is really about: letting you know that the code is updated automatically, and manual and automatic updating don't mix well - each can overwrite the other. -------- Originalmeddelande -------- Från: 積丹尼 Dan Jacobson <jidanni@jidanni.org> Datum: 2019-12-22 01:37 (GMT+01:00) Till: Richard Stallman <rms@gnu.org> Kopia: 38696@debbugs.gnu.org Ämne: bug#38696: "If you edit it by hand, you could mess it up" >>>>> "RMS" == Richard Stallman <rms@gnu.org> writes: RMS> Would you please show us what this looks like? $ cat .emacs (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. ) (custom-set-faces ;; custom-set-faces 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. '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant normal :weight normal :height 218 :width normal))))) There is no way offered to "decompile" this into something that all those Emacs manuals talk about when introducing how to edit your .emacs file. The user is no longer in full control, but must maintain it via an interface (the menus.) ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-22 17:49 ` Drew Adams @ 2019-12-23 0:36 ` 積丹尼 Dan Jacobson 2019-12-24 4:13 ` Richard Stallman 1 sibling, 0 replies; 16+ messages in thread From: 積丹尼 Dan Jacobson @ 2019-12-23 0:36 UTC (permalink / raw) To: Drew Adams; +Cc: 38696, Richard Stallman, arthur miller Warning or not, same .emacs file or not, the user still cannot touch it. Sure he can. But then for the rest of his life he had better not do any such saves from any menus. ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-22 17:49 ` Drew Adams 2019-12-23 0:36 ` 積丹尼 Dan Jacobson @ 2019-12-24 4:13 ` Richard Stallman 2019-12-24 16:08 ` Drew Adams 1 sibling, 1 reply; 16+ messages in thread From: Richard Stallman @ 2019-12-24 4:13 UTC (permalink / raw) To: Drew Adams; +Cc: 38696, arthur.miller, jidanni [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > But that's not the likeliest scenario. The real, > more likely problem is that you make a change to > this code and later Customize overwrites your > change - and you might not be aware of that. We could make Customize detect hand-editing by looking at the value in .emacs and determining that it doesn't have a format Customize could ever write? Or we could the comment say, "If you want to edit this value by hand, delete this comment." Customize could interpret the absence of that comment as meaning the value has been hand-edited. Either way, Customize could then report a problem and offer a choice of (1) deleting the value in the file, or (2) quitting. -- Dr Richard Stallman Founder, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-24 4:13 ` Richard Stallman @ 2019-12-24 16:08 ` Drew Adams 2019-12-25 2:37 ` Richard Stallman 0 siblings, 1 reply; 16+ messages in thread From: Drew Adams @ 2019-12-24 16:08 UTC (permalink / raw) To: rms; +Cc: 38696, arthur.miller, jidanni > > But that's not the likeliest scenario. The real, > > more likely problem is that you make a change to > > this code and later Customize overwrites your > > change - and you might not be aware of that. > > We could make Customize detect hand-editing by looking at the value > in .emacs and determining that it doesn't have a format Customize > could ever write? > > Or we could the comment say, "If you want to edit this value by hand, > delete this comment." Customize could interpret the absence of > that comment as meaning the value has been hand-edited. > > Either way, Customize could then report a problem and offer a choice > of (1) deleting the value in the file, or (2) quitting. I guess you're proposing that, if a user edits what Customize puts in a user file (`custom-file' or init file), then Customize could/should try to detect that that has occurred. And then Customize could/should ask the user how to handle that situation. A priori that sounds complicated, and maybe error prone, to me. But maybe it's worth considering. My suggestion would be to just change the comment wording a bit, to make clear that future use of Customize might overwrite any manual changes you make to that code. IOW, state that clearly as a major reason _why_ you're advised not to edit the code. And as others have pointed out, future Customize use might not always be obvious, interactive use of `M-x customize-*' commands. --- I'd also suggest that the inserted comment, and the Emacs docs more generally, would do well to suggest/advise that users use `custom-file', to keep Customize-generated code separate from their init files. That's a good idea in general, IMO, and it would go a long way toward avoiding the problem of users editing such code, i.e., of users and Customize stomping on each other. --- I'd even suggest that if `custom-file' is undefined then Customize should immediately ask a user to define it, instead of just silently writing to a user's init file. At least, that could be done if Customize could be sure there's not already any Customize code in the init file. But if an init file already has some Customize code, then such a dialog becomes more delicate. Customize might need to just advise moving such existing code to the new `custom-file'. Or if, as you suggest, it could detect its own code then it could offer to move any such that's in the init file to a `custom-file'. ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-24 16:08 ` Drew Adams @ 2019-12-25 2:37 ` Richard Stallman 2019-12-26 1:03 ` 積丹尼 Dan Jacobson 0 siblings, 1 reply; 16+ messages in thread From: Richard Stallman @ 2019-12-25 2:37 UTC (permalink / raw) To: Drew Adams; +Cc: 38696, arthur.miller, jidanni [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > A priori that sounds complicated, and maybe error > prone, to me. But maybe it's worth considering. I am not trying to insist. > My suggestion would be to just change the comment > wording a bit, to make clear that future use of > Customize might overwrite any manual changes you > make to that code. IOW, state that clearly as a > major reason _why_ you're advised not to edit the > code. I agree that would be an improvement. > I'd even suggest that if `custom-file' is > undefined then Customize should immediately ask > a user to define it, instead of just silently > writing to a user's init file. I think that would make Emacs usage a little more complicated for lots of users, and only a few would benefit. -- Dr Richard Stallman Founder, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-25 2:37 ` Richard Stallman @ 2019-12-26 1:03 ` 積丹尼 Dan Jacobson 0 siblings, 0 replies; 16+ messages in thread From: 積丹尼 Dan Jacobson @ 2019-12-26 1:03 UTC (permalink / raw) To: Richard Stallman; +Cc: 38696, arthur.miller Actually the comment should say ;; Like it? Well perhaps you might want a version of it that you can ;; maintain by hand! Just use "M-x customize-decustomize" on that region of ;; code to get a human-friendly-readable version that you can instead ;; enhance on your own without needing menus to maintain it! (Or customize-decompile, or customize-deobfuscate or whatever.) ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#38696: "If you edit it by hand, you could mess it up" 2019-12-21 0:02 bug#38696: "If you edit it by hand, you could mess it up" 積丹尼 Dan Jacobson ` (2 preceding siblings ...) 2019-12-22 3:35 ` arthur miller @ 2020-08-06 10:16 ` Lars Ingebrigtsen 3 siblings, 0 replies; 16+ messages in thread From: Lars Ingebrigtsen @ 2020-08-06 10:16 UTC (permalink / raw) To: 積丹尼 Dan Jacobson; +Cc: 38696, rms 積丹尼 Dan Jacobson <jidanni@jidanni.org> writes: > Let's say the user wants to make the font bigger. > In emacs he goes into the menu bar and picks "Options" > "Set > Default Font", makes it bigger, and then chooses "Save Options", which > pastes some "custom-set" code into his .emacs file > that even contains a warning "If you edit it by hand, you could mess it up", > meaning for the rest of his life he should just play it safe and stick > with the menus. I think the consensus here was that it's fine the way it is, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2020-08-06 10:16 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-12-21 0:02 bug#38696: "If you edit it by hand, you could mess it up" 積丹尼 Dan Jacobson 2019-12-21 6:34 ` Phil Sainty 2019-12-21 8:12 ` 積丹尼 Dan Jacobson 2019-12-21 19:08 ` Richard Stallman 2019-12-22 0:35 ` 積丹尼 Dan Jacobson 2019-12-22 17:04 ` Eli Zaretskii 2019-12-23 2:58 ` Richard Stallman 2019-12-23 3:29 ` 積丹尼 Dan Jacobson 2019-12-22 3:35 ` arthur miller 2019-12-22 17:49 ` Drew Adams 2019-12-23 0:36 ` 積丹尼 Dan Jacobson 2019-12-24 4:13 ` Richard Stallman 2019-12-24 16:08 ` Drew Adams 2019-12-25 2:37 ` Richard Stallman 2019-12-26 1:03 ` 積丹尼 Dan Jacobson 2020-08-06 10:16 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.