unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18725: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written.
@ 2014-10-14 22:04 ` Alan Mackenzie
  2014-10-15 10:45   ` bug#18725: [PATCH]: " Alan Mackenzie
  2014-10-15 12:55   ` Alan Mackenzie
  0 siblings, 2 replies; 11+ messages in thread
From: Alan Mackenzie @ 2014-10-14 22:04 UTC (permalink / raw)
  To: 18725

Hi, Emacs.

In Emacs 24.4, started with a .emacs which includes a customisation for
face show-paren-match, do

M-x customize-group <RET> paren-showing-faces <RET>

.  One of the widgets is "Revert ...".  Hit <RET> on this widget, then 2
for "Erase customizations".  Emacs prompts with "Really erase
customizations? (yes or no)".  Type  "no".

.emacs is then written.  It shouldn't be.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written.
  2014-10-14 22:04 ` bug#18725: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written Alan Mackenzie
@ 2014-10-15 10:45   ` Alan Mackenzie
  2014-10-15 11:37     ` Ivan Shmakov
  2014-10-15 14:39     ` Stefan Monnier
  2014-10-15 12:55   ` Alan Mackenzie
  1 sibling, 2 replies; 11+ messages in thread
From: Alan Mackenzie @ 2014-10-15 10:45 UTC (permalink / raw)
  To: gnu-emacs-bug

Alan Mackenzie <acm@muc.de> wrote:
> In Emacs 24.4, started with a .emacs which includes a customisation for
> face show-paren-match, do

> M-x customize-group <RET> paren-showing-faces <RET>

> .  One of the widgets is "Revert ...".  Hit <RET> on this widget, then 2
> for "Erase customizations".  Emacs prompts with "Really erase
> customizations? (yes or no)".  Type  "no".

> .emacs is then written.  It shouldn't be.

Here is a possible patch for the problem:


=== modified file 'lisp/cus-edit.el'
--- lisp/cus-edit.el    2014-06-29 02:33:50 +0000
+++ lisp/cus-edit.el    2014-10-15 10:11:00 +0000
@@ -779,7 +779,8 @@
   "Call function FUN on all widgets in `custom-options'.
 If there is more than one widget, ask user for confirmation using
 the query string QUERY, using `y-or-n-p' if STRONG-QUERY is nil,
-and `yes-or-no-p' otherwise."
+and `yes-or-no-p' otherwise.  Return t if the functionality has
+been executed, nil otherwise."
   (if (or (and (= 1 (length custom-options))
               (memq (widget-type (car custom-options))
                     '(custom-variable custom-face)))
@@ -892,16 +893,17 @@
   ;; Bind these temporarily.
   (let ((custom-reset-standard-variables-list '(t))
        (custom-reset-standard-faces-list '(t)))
-    (custom-command-apply
-     (lambda (widget)
-       (and (or (null (widget-get widget :custom-standard-value))
-               (widget-apply widget :custom-standard-value))
-           (memq (widget-get widget :custom-state)
-                 '(modified set changed saved rogue))
-           (widget-apply widget :custom-mark-to-reset-standard)))
-     "The settings will revert to their default values, in this
+    (if
+       (custom-command-apply
+        (lambda (widget)
+          (and (or (null (widget-get widget :custom-standard-value))
+                   (widget-apply widget :custom-standard-value))
+               (memq (widget-get widget :custom-state)
+                     '(modified set changed saved rogue))
+               (widget-apply widget :custom-mark-to-reset-standard)))
+        "The settings will revert to their default values, in this
 and future sessions.  Really erase customizations? " t)
-    (custom-reset-standard-save-and-update)))
+       (custom-reset-standard-save-and-update))))

 ;;; The Customize Commands


-- 
Alan Mackenzie (Nuremberg, Germany).






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written
  2014-10-15 10:45   ` bug#18725: [PATCH]: " Alan Mackenzie
@ 2014-10-15 11:37     ` Ivan Shmakov
  2014-10-15 14:39     ` Stefan Monnier
  1 sibling, 0 replies; 11+ messages in thread
From: Ivan Shmakov @ 2014-10-15 11:37 UTC (permalink / raw)
  To: 18725

>>>>> Alan Mackenzie <acm@muc.de> writes:

[…]

 > +    (if
 > +       (custom-command-apply
 > +        (lambda (widget)

	Could this please be a ‘when’?

	TIA.

[…]

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written
  2014-10-14 22:04 ` bug#18725: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written Alan Mackenzie
  2014-10-15 10:45   ` bug#18725: [PATCH]: " Alan Mackenzie
@ 2014-10-15 12:55   ` Alan Mackenzie
  1 sibling, 0 replies; 11+ messages in thread
From: Alan Mackenzie @ 2014-10-15 12:55 UTC (permalink / raw)
  To: gnu-emacs-bug

Hello, Ivan.

Ivan Shmakov <ivan@siamics.net> wrote:
>>>>>> Alan Mackenzie <acm@muc.de> writes:

> [?]

> > +    (if
> > +       (custom-command-apply
> > +        (lambda (widget)

>        Could this please be a ?when??

It could.  But why?  Any special reason?

>        TIA.

> [?]

-- 
Alan Mackenzie (Nuremberg, Germany).






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written.
  2014-10-15 10:45   ` bug#18725: [PATCH]: " Alan Mackenzie
  2014-10-15 11:37     ` Ivan Shmakov
@ 2014-10-15 14:39     ` Stefan Monnier
  2014-10-15 15:40       ` Alan Mackenzie
  2014-10-15 15:52       ` Glenn Morris
  1 sibling, 2 replies; 11+ messages in thread
From: Stefan Monnier @ 2014-10-15 14:39 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 18725

[ How did you end up with gnu-emacs-bug@moderators.isc.org in the "To:"
  field?  ]

> +and `yes-or-no-p' otherwise.  Return t if the functionality has
                                       ^^^
We prefer                            non-nil

Otherwise, looks good, please install,


        Stefan





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written.
  2014-10-15 14:39     ` Stefan Monnier
@ 2014-10-15 15:40       ` Alan Mackenzie
  2014-10-15 16:07         ` Glenn Morris
                           ` (2 more replies)
  2014-10-15 15:52       ` Glenn Morris
  1 sibling, 3 replies; 11+ messages in thread
From: Alan Mackenzie @ 2014-10-15 15:40 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 18725

Hello, Stefan.

On Wed, Oct 15, 2014 at 10:39:48AM -0400, Stefan Monnier wrote:

> > +and `yes-or-no-p' otherwise.  Return t if the functionality has
>                                        ^^^
> We prefer                            non-nil

> Otherwise, looks good, please install,

Done, with requested amendment, revision #117588.

> [ How did you end up with gnu-emacs-bug@moderators.isc.org in the "To:"
>   field?  ]

This is going to make Glenn unhappy.  I posted it via Usenet, for lack
of getting a CC of my original bug report to which I could've replied.
It seems the bug-gnu-emacs mail server has been reconfigured not to send
CCs to people involved by default, and I'm not subscribed to
bug-gnu-emacs at the moment.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written.
  2014-10-15 14:39     ` Stefan Monnier
  2014-10-15 15:40       ` Alan Mackenzie
@ 2014-10-15 15:52       ` Glenn Morris
  2014-10-15 18:09         ` Stefan Monnier
  1 sibling, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2014-10-15 15:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Alan Mackenzie, 18725

Stefan Monnier wrote:

> [ How did you end up with gnu-emacs-bug@moderators.isc.org in the "To:"
>   field?  ]

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16155#51

> Otherwise, looks good, please install,

Did you mean into emacs-24, because AFAIK this is not a new issue and is
only a minor thing. Are we sure this is safe?





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written.
  2014-10-15 15:40       ` Alan Mackenzie
@ 2014-10-15 16:07         ` Glenn Morris
  2014-10-15 16:58         ` Michael Albinus
  2014-10-15 18:04         ` Stefan Monnier
  2 siblings, 0 replies; 11+ messages in thread
From: Glenn Morris @ 2014-10-15 16:07 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 18725

Alan Mackenzie wrote:

> This is going to make Glenn unhappy.

There's no "going to" about it. I'm aware that you continue to do it.

> for lack of getting a CC of my original bug report to which I could've
> replied.

I checked just now and the automated bug acknowledgment emails are still
going out, just as they always have done, and they still contain
instructions on how to reply. If you did not get one, maybe check into
your email settings.

There's also M-x gnus-read-ephemeral-emacs-bug-group, which is great.

> It seems the bug-gnu-emacs mail server has been reconfigured not to
> send CCs to people involved by default, and I'm not subscribed to
> bug-gnu-emacs at the moment.

There's been no change of configuration on bug-gnu-emacs.
People who report bugs have never been expected to be subscribed to the
list, and never will be.

I've said everything I have to say on this before.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written.
  2014-10-15 15:40       ` Alan Mackenzie
  2014-10-15 16:07         ` Glenn Morris
@ 2014-10-15 16:58         ` Michael Albinus
  2014-10-15 18:04         ` Stefan Monnier
  2 siblings, 0 replies; 11+ messages in thread
From: Michael Albinus @ 2014-10-15 16:58 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 18725

Alan Mackenzie <acm@muc.de> writes:

>> [ How did you end up with gnu-emacs-bug@moderators.isc.org in the "To:"
>>   field?  ]
>
> This is going to make Glenn unhappy.  I posted it via Usenet, for lack
> of getting a CC of my original bug report to which I could've replied.
> It seems the bug-gnu-emacs mail server has been reconfigured not to send
> CCs to people involved by default, and I'm not subscribed to
> bug-gnu-emacs at the moment.

I do read all gnu-emacs MLs via gmane, which allows me to reply w/o such
problems. Maybe you give it a try.

(setq gnus-secondary-select-methods
        '((nnml "")
	  ...
	  (nntp "news" (nntp-address "news.gmane.org")))
      gnus-select-method '(nnnil))

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written.
  2014-10-15 15:40       ` Alan Mackenzie
  2014-10-15 16:07         ` Glenn Morris
  2014-10-15 16:58         ` Michael Albinus
@ 2014-10-15 18:04         ` Stefan Monnier
  2 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2014-10-15 18:04 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 18725

> This is going to make Glenn unhappy.  I posted it via Usenet, for lack
> of getting a CC of my original bug report to which I could've replied.

IIUC by default you don't get a Cc, indeed.
But you do receive a acknowledgment, instead, which should work fine
for replying.  Maybe the acknowledgment should contain the original
report as an attachment (or does it already?  I can't remember and
don't have one on hand).
I'd expect that many users would be confused if they received an
automatic Cc: for their bug-reports.


        Stefan





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written.
  2014-10-15 15:52       ` Glenn Morris
@ 2014-10-15 18:09         ` Stefan Monnier
  0 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2014-10-15 18:09 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Alan Mackenzie, 18725

> Are we sure this is safe?

It looks pretty safe to me, yes.
It looks more like an omission, really (it makes it work more like Custom-save).


        Stefan





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-10-15 18:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.11143.1413324683.1147.bug-gnu-emacs@gnu.org>
2014-10-14 22:04 ` bug#18725: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written Alan Mackenzie
2014-10-15 10:45   ` bug#18725: [PATCH]: " Alan Mackenzie
2014-10-15 11:37     ` Ivan Shmakov
2014-10-15 14:39     ` Stefan Monnier
2014-10-15 15:40       ` Alan Mackenzie
2014-10-15 16:07         ` Glenn Morris
2014-10-15 16:58         ` Michael Albinus
2014-10-15 18:04         ` Stefan Monnier
2014-10-15 15:52       ` Glenn Morris
2014-10-15 18:09         ` Stefan Monnier
2014-10-15 12:55   ` Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).