GNU bug report logs - #49330
Customization buffer should also offer printing code snippets

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Fri, 2 Jul 2021 15:55:01 UTC

Severity: wishlist

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49330 in the body.
You can then email your comments to 49330 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#49330; Package emacs. (Fri, 02 Jul 2021 15:55:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 02 Jul 2021 15:55:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Customization buffer should also offer printing code snippets
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!

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49330; Package emacs. (Fri, 02 Jul 2021 17:25:01 GMT) Full text and rfc822 format available.

Message #8 received at 49330 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 49330 <at> debbugs.gnu.org
Subject: Re: bug#49330: Customization buffer should also offer printing code
 snippets
Date: Fri, 02 Jul 2021 20:24:32 +0300
> From: 積丹尼 Dan Jacobson
>  <jidanni <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49330; Package emacs. (Sat, 03 Jul 2021 06:09:02 GMT) Full text and rfc822 format available.

Message #11 received at 49330 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49330 <at> debbugs.gnu.org
Subject: Re: bug#49330: Customization buffer should also offer printing code
 snippets
Date: Sat, 03 Jul 2021 14:08:28 +0800
>>>>> "EZ" == Eli Zaretskii <eliz <at> 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)))))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49330; Package emacs. (Sat, 03 Jul 2021 06:30:02 GMT) Full text and rfc822 format available.

Message #14 received at 49330 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 49330 <at> debbugs.gnu.org
Subject: Re: bug#49330: Customization buffer should also offer printing code
 snippets
Date: Sat, 03 Jul 2021 09:29:14 +0300
> From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
> Cc: 49330 <at> debbugs.gnu.org
> Date: Sat, 03 Jul 2021 14:08:28 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49330; Package emacs. (Sat, 03 Jul 2021 06:39:01 GMT) Full text and rfc822 format available.

Message #17 received at 49330 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49330 <at> debbugs.gnu.org
Subject: Re: bug#49330: Customization buffer should also offer printing code
 snippets
Date: Sat, 03 Jul 2021 14:38:41 +0800
>>>>> "EZ" == Eli Zaretskii <eliz <at> 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."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49330; Package emacs. (Sat, 03 Jul 2021 06:50:01 GMT) Full text and rfc822 format available.

Message #20 received at 49330 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 49330 <at> debbugs.gnu.org
Subject: Re: bug#49330: Customization buffer should also offer printing code
 snippets
Date: Sat, 03 Jul 2021 09:49:18 +0300
> From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
> Cc: 49330 <at> debbugs.gnu.org
> Date: Sat, 03 Jul 2021 14:38:41 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49330; Package emacs. (Sun, 04 Jul 2021 14:03:02 GMT) Full text and rfc822 format available.

Message #23 received at 49330 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49330 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#49330: Customization buffer should also offer printing code
 snippets
Date: Sun, 04 Jul 2021 16:02:14 +0200
Eli Zaretskii <eliz <at> 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




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 04 Jul 2021 14:03:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 49330 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 04 Jul 2021 14:03:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49330; Package emacs. (Thu, 08 Jul 2021 12:29:01 GMT) Full text and rfc822 format available.

Message #30 received at 49330 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49330 <at> debbugs.gnu.org
Subject: Re: bug#49330: Customization buffer should also offer printing code
 snippets
Date: Thu, 08 Jul 2021 16:03:51 +0800
>>>>> "EZ" == Eli Zaretskii <eliz <at> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 06 Aug 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 262 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.