From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#19328: [PATCH] Add mechanism to prompt about unsaved customizations Date: Tue, 9 Dec 2014 08:24:31 -0800 (PST) Message-ID: <22ed7d40-17aa-4f93-85fc-565b659fd43f@default> References: <745fafd0-6bc9-40f7-830f-32a916dd898e@default> <8DD29730-77B2-49C6-9FB4-8ABF0D73C2E4@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1418142336 364 80.91.229.3 (9 Dec 2014 16:25:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Dec 2014 16:25:36 +0000 (UTC) Cc: 19328@debbugs.gnu.org To: Cameron Desautels Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 09 17:25:24 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XyNbI-0002kg-3S for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Dec 2014 17:25:24 +0100 Original-Received: from localhost ([::1]:41252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyNbH-00014A-Ho for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Dec 2014 11:25:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyNb5-000142-JG for bug-gnu-emacs@gnu.org; Tue, 09 Dec 2014 11:25:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XyNaw-0005Z0-Sp for bug-gnu-emacs@gnu.org; Tue, 09 Dec 2014 11:25:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyNaw-0005YB-K8 for bug-gnu-emacs@gnu.org; Tue, 09 Dec 2014 11:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XyNaw-0006eE-8X for bug-gnu-emacs@gnu.org; Tue, 09 Dec 2014 11:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Dec 2014 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19328 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19328-submit@debbugs.gnu.org id=B19328.141814227525517 (code B ref 19328); Tue, 09 Dec 2014 16:25:02 +0000 Original-Received: (at 19328) by debbugs.gnu.org; 9 Dec 2014 16:24:35 +0000 Original-Received: from localhost ([127.0.0.1]:59857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyNaV-0006dV-II for submit@debbugs.gnu.org; Tue, 09 Dec 2014 11:24:35 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:43805) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyNaU-0006dM-C0 for 19328@debbugs.gnu.org; Tue, 09 Dec 2014 11:24:35 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sB9GOWOW013315 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 9 Dec 2014 16:24:33 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id sB9GOVZY009790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 9 Dec 2014 16:24:32 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sB9GOV4h022436; Tue, 9 Dec 2014 16:24:31 GMT In-Reply-To: <8DD29730-77B2-49C6-9FB4-8ABF0D73C2E4@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97087 Archived-At: > > Why is this in etc/TODO? >=20 > 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)))) >=20 > 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.