From: Drew Adams <drew.adams@oracle.com>
To: Cameron Desautels <camdez@gmail.com>
Cc: 19328@debbugs.gnu.org
Subject: bug#19328: [PATCH] Add mechanism to prompt about unsaved customizations
Date: Tue, 9 Dec 2014 08:24:31 -0800 (PST) [thread overview]
Message-ID: <22ed7d40-17aa-4f93-85fc-565b659fd43f@default> (raw)
In-Reply-To: <8DD29730-77B2-49C6-9FB4-8ABF0D73C2E4@gmail.com>
> > Why is this in etc/TODO?
>
> If you're asking me in particular, I don't know. I just found it
> there and thought I'd help out.
Thanks for helping out! The question is for Emacs Dev in general,
i.e., for this bug thread.
> > This already exists, no? I've been using this for years:
> >
> > (add-hook 'kill-emacs-query-functions
> > (lambda ()
> > (condition-case nil
> > (customize-unsaved)
> > (error t))))
>
> A named function is probably more suitable for an end user than an
> arbitrary lambda, no? Plus using error handling for control flow is
> generally not considered a best practice, especially when it's as
> broad in scope as `(condition-case nil ...)`.
That's what *I* use. I'm not saying that everyone should use it.
My .emacs is used for multiple Emacs versions. You might prefer
`ignore-errors', which does not exist in older versions. Or you
might prefer not to ignore errors...
If you want a named function and no error handling, then, well,
try `customize-unsaved'.
My point was that `customized-unsaved' already exists. It is
precisely a "mechanism to prompt about unsaved customizations".
Unless I'm missing something. AFAICT, it is exactly what is
described in that TODO item:
A function to check for customizable options that have been
set but not saved, and ask the user whether to save them.
This could go in kill-emacs-query-functions, to remind people
to save their changes. If the user says yes, show them
in a Custom buffer using customize-customized.
next prev parent reply other threads:[~2014-12-09 16:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 15:46 bug#19328: [PATCH] Add mechanism to prompt about unsaved customizations Cameron Desautels
2014-12-09 15:54 ` Drew Adams
2014-12-09 16:16 ` Cameron Desautels
2014-12-09 16:24 ` Drew Adams [this message]
2014-12-09 17:05 ` Cameron Desautels
2014-12-09 17:46 ` Drew Adams
2014-12-09 19:47 ` Cameron Desautels
2014-12-09 20:10 ` Drew Adams
2014-12-10 15:32 ` Ted Zlatanov
2014-12-12 1:04 ` Cameron Desautels
2014-12-12 1:40 ` Stefan Monnier
2014-12-12 1:56 ` Cameron Desautels
2014-12-12 2:36 ` Stefan Monnier
2014-12-12 2:39 ` Cameron Desautels
2014-12-13 1:17 ` Ted Zlatanov
2014-12-13 5:55 ` Stefan Monnier
2014-12-13 13:06 ` Ted Zlatanov
2014-12-13 23:23 ` Cameron Desautels
2014-12-14 11:54 ` Ted Zlatanov
2014-12-14 14:02 ` Stefan Monnier
2014-12-14 16:31 ` Ted Zlatanov
2016-02-23 11:36 ` Lars Ingebrigtsen
2014-12-12 2:48 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22ed7d40-17aa-4f93-85fc-565b659fd43f@default \
--to=drew.adams@oracle.com \
--cc=19328@debbugs.gnu.org \
--cc=camdez@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.