* bug#49330: Customization buffer should also offer printing code snippets @ 2021-07-02 14:16 積丹尼 Dan Jacobson 2021-07-02 17:24 ` Eli Zaretskii 0 siblings, 1 reply; 8+ messages in thread From: 積丹尼 Dan Jacobson @ 2021-07-02 14:16 UTC (permalink / raw) To: 49330 The *Customize Face* buffer looks like: For help using this buffer, see Easy Customization in the Emacs manual. Operate on all settings in this buffer: Revert... Apply Apply and Save 1^^^^^^^^^^^2^^^^^^^3^^^^^^^^^^^^^ OK, but add a fourth menu item: "Print code snippet" or "Just print code snippet" or just "Print"! Else currently one must 1. cp .emacs-custom.el /tmp 2. click "Apply and Save" 3. exit emacs #as we are about to replace a dot file it uses. 4. diff /tmp .emacs-custom.el #obtain the code snippet. 5. mv /tmp/.emacs-custom ~ 6. restart emacs Just to obtain the code snippet! Let's compare https://overpass-turbo.eu/s/177G As you see, just like RMS wants: code produced shown to the user, and not need six whole steps to "dig it back out and have a look". ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49330: Customization buffer should also offer printing code snippets 2021-07-02 14:16 bug#49330: Customization buffer should also offer printing code snippets 積丹尼 Dan Jacobson @ 2021-07-02 17:24 ` Eli Zaretskii 2021-07-03 6:08 ` 積丹尼 Dan Jacobson 0 siblings, 1 reply; 8+ messages in thread From: Eli Zaretskii @ 2021-07-02 17:24 UTC (permalink / raw) To: 積丹尼 Dan Jacobson; +Cc: 49330 > From: 積丹尼 Dan Jacobson > <jidanni@jidanni.org> > Date: Fri, 02 Jul 2021 22:16:02 +0800 > > The *Customize Face* buffer looks like: > > For help using this buffer, see Easy Customization in the Emacs manual. > > Operate on all settings in this buffer: > Revert... Apply Apply and Save > 1^^^^^^^^^^^2^^^^^^^3^^^^^^^^^^^^^ > > OK, but add a fourth menu item: > "Print code snippet" or > "Just print code snippet" or just > "Print"! > > Else currently one must > 1. cp .emacs-custom.el /tmp > 2. click "Apply and Save" > 3. exit emacs #as we are about to replace a dot file it uses. > 4. diff /tmp .emacs-custom.el #obtain the code snippet. > 5. mv /tmp/.emacs-custom ~ > 6. restart emacs > Just to obtain the code snippet! What is that "code snippet" that you'd like to see? If you want to see the effect of customizing the face, then the Customize Face buffer includes a "[sample]" part, which dynamically shows the results of your customizations. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49330: Customization buffer should also offer printing code snippets 2021-07-02 17:24 ` Eli Zaretskii @ 2021-07-03 6:08 ` 積丹尼 Dan Jacobson 2021-07-03 6:29 ` Eli Zaretskii 0 siblings, 1 reply; 8+ messages in thread From: 積丹尼 Dan Jacobson @ 2021-07-03 6:08 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 49330 >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes: EZ> What is that "code snippet" that you'd like to see? If you want to EZ> see the effect of customizing the face, then the Customize Face buffer EZ> includes a "[sample]" part, which dynamically shows the results of EZ> your customizations. Yes, but that "sample" is not code. Here is a standalone code snippet: (custom-set-faces '(hl-line ((t (:underline t))))) ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49330: Customization buffer should also offer printing code snippets 2021-07-03 6:08 ` 積丹尼 Dan Jacobson @ 2021-07-03 6:29 ` Eli Zaretskii 2021-07-03 6:38 ` 積丹尼 Dan Jacobson 0 siblings, 1 reply; 8+ messages in thread From: Eli Zaretskii @ 2021-07-03 6:29 UTC (permalink / raw) To: 積丹尼 Dan Jacobson; +Cc: 49330 > From: 積丹尼 Dan Jacobson <jidanni@jidanni.org> > Cc: 49330@debbugs.gnu.org > Date: Sat, 03 Jul 2021 14:08:28 +0800 > > >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes: > > EZ> What is that "code snippet" that you'd like to see? If you want to > EZ> see the effect of customizing the face, then the Customize Face buffer > EZ> includes a "[sample]" part, which dynamically shows the results of > EZ> your customizations. > > Yes, but that "sample" is not code. > > Here is a standalone code snippet: > (custom-set-faces > '(hl-line ((t (:underline t))))) You mean, what Emacs will write into the init file to save your customizations? Why is that needed? If you want to customize your faces in Lisp, the recommended way is to use set-face-attribute instead, not custom-set-faces. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49330: Customization buffer should also offer printing code snippets 2021-07-03 6:29 ` Eli Zaretskii @ 2021-07-03 6:38 ` 積丹尼 Dan Jacobson 2021-07-03 6:49 ` Eli Zaretskii 0 siblings, 1 reply; 8+ messages in thread From: 積丹尼 Dan Jacobson @ 2021-07-03 6:38 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 49330 >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes: EZ> You mean, what Emacs will write into the init file to save your EZ> customizations? Yes. EZ> Why is that needed? So the user can be in full control. RMS knows the feeling. The user wants a piece of code that he can stick into his .emacs, safe from having to fight with a robot on who can edit a file. The user wants to put it into a file that only he is editing. EZ> If you want to customize your EZ> faces in Lisp, the recommended way is to use set-face-attribute EZ> instead, not custom-set-faces. OK, good. then have the snippet be a set-face-attribute snippet. The documentation would be: "Here is a snippet you can paste into your .emacs file manually, if you don't feel comfortable allowing the robot maintain your customizations." ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49330: Customization buffer should also offer printing code snippets 2021-07-03 6:38 ` 積丹尼 Dan Jacobson @ 2021-07-03 6:49 ` Eli Zaretskii 2021-07-04 14:02 ` Lars Ingebrigtsen 2021-07-08 8:03 ` 積丹尼 Dan Jacobson 0 siblings, 2 replies; 8+ messages in thread From: Eli Zaretskii @ 2021-07-03 6:49 UTC (permalink / raw) To: 積丹尼 Dan Jacobson; +Cc: 49330 > From: 積丹尼 Dan Jacobson <jidanni@jidanni.org> > Cc: 49330@debbugs.gnu.org > Date: Sat, 03 Jul 2021 14:38:41 +0800 > > >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes: > EZ> You mean, what Emacs will write into the init file to save your > EZ> customizations? > > Yes. > > EZ> Why is that needed? > > So the user can be in full control. RMS knows the feeling. The user _is_ in control, you are just annoyed by the way this can be done now. > The user wants a piece of code that he can stick into his .emacs, > safe from having to fight with a robot on who can edit a file. > The user wants to put it into a file that only he is editing. See the variable custom-file, through which you can control into which file Emacs will write the customization form when you click Save. > EZ> If you want to customize your > EZ> faces in Lisp, the recommended way is to use set-face-attribute > EZ> instead, not custom-set-faces. > > OK, good. then have the snippet be a set-face-attribute snippet. > > The documentation would be: "Here is a snippet you can paste into your > .emacs file manually, if you don't feel comfortable allowing the robot > maintain your customizations." Sounds like too much effort for very little gain to me. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#49330: Customization buffer should also offer printing code snippets 2021-07-03 6:49 ` Eli Zaretskii @ 2021-07-04 14:02 ` Lars Ingebrigtsen 2021-07-08 8:03 ` 積丹尼 Dan Jacobson 1 sibling, 0 replies; 8+ messages in thread From: Lars Ingebrigtsen @ 2021-07-04 14:02 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 49330, 積丹尼 Dan Jacobson Eli Zaretskii <eliz@gnu.org> writes: > Sounds like too much effort for very little gain to me. Indeed, 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] 8+ messages in thread
* bug#49330: Customization buffer should also offer printing code snippets 2021-07-03 6:49 ` Eli Zaretskii 2021-07-04 14:02 ` Lars Ingebrigtsen @ 2021-07-08 8:03 ` 積丹尼 Dan Jacobson 1 sibling, 0 replies; 8+ messages in thread From: 積丹尼 Dan Jacobson @ 2021-07-08 8:03 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 49330 >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes: EZ> See the variable custom-file, through which you can control into which EZ> file Emacs will write the customization form when you click Save. Yes, and I then cut code out of .emacs-custom.el and paste it into .emacs, which I then can share with my several machines, safe from being overwritten by the robot. EZ> If you want to customize your EZ> faces in Lisp, the recommended way is to use set-face-attribute EZ> instead, not custom-set-faces. I will never know that, as all I do is make a customization, and then take what got written, and paste it into my .emacs file. The entire idea is: 1. A file that nobody writes to except me. 2. Lines of code that, although I don't know how to write, at least I can paste them into a file fully controlled by me, and then share it to my several machines. Anyway, fine, emacs' model is everybody owns only one computer or several computers and is happy with customizations on computer A being different that those on computer B, because he never wishes to sync his .emacs etc. For me, I want to maintain one .emacs file, *by hand*, and any differences (root vs. regular user, machine name, window system, I can simply use lisp "(if ...)" to branch with. Just like web sites' share buttons offer "embed code you can paste on a web page", emacs' customization page should also offer printing code snippets. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-07-08 8:03 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-07-02 14:16 bug#49330: Customization buffer should also offer printing code snippets 積丹尼 Dan Jacobson 2021-07-02 17:24 ` Eli Zaretskii 2021-07-03 6:08 ` 積丹尼 Dan Jacobson 2021-07-03 6:29 ` Eli Zaretskii 2021-07-03 6:38 ` 積丹尼 Dan Jacobson 2021-07-03 6:49 ` Eli Zaretskii 2021-07-04 14:02 ` Lars Ingebrigtsen 2021-07-08 8:03 ` 積丹尼 Dan Jacobson
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.