GNU bug report logs - #65719
[PATCH] Pass restart argument to 'kill-emacs-query-functions'

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: me@HIDDEN; Keywords: patch; dated Sun, 3 Sep 2023 19:29:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 65719 <at> debbugs.gnu.org:


Received: (at 65719) by debbugs.gnu.org; 12 Feb 2024 14:55:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 12 09:55:10 2024
Received: from localhost ([127.0.0.1]:32955 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rZXi9-0005wr-2t
	for submit <at> debbugs.gnu.org; Mon, 12 Feb 2024 09:55:10 -0500
Received: from mail.elken.dev ([165.22.120.78]:54965)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1rZXi5-0005vI-HG
 for 65719 <at> debbugs.gnu.org; Mon, 12 Feb 2024 09:55:07 -0500
Received: from authenticated-user (mail.elken.dev [165.22.120.78])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.elken.dev (Postfix) with ESMTPSA id 6077A3F3A5;
 Mon, 12 Feb 2024 15:54:38 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elken.dev; s=mail;
 t=1707749680; bh=LqaD2AcLW0l1iKoB4pjXGNk9ddKK0NlpX06/jgVlaJA=;
 h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
 b=ee0auJrlmfsq/FEa12WAfqDfaMa/rxUhgYxo+Dwe0OV2ybSupYzvgMW3eKmLIIYVP
 8IHIxJJ5e3x+NT7dMmSOgqA2iUcuDR4s0hapZQ3ZSJpqIMCM7017/ADAbHYA2kcok+
 MCCJCp5YBy5fp/epfKO91a3rRk69qCfNAGMeaTeMOK7V0+GyfVKCE2AmBeSz+gpxiN
 efCsU96XnDxqrDPGte2O9efjqmoOInJAhSRAk5TAGA+6rcqPVVWTmcdHIAjJKXPRYw
 41lrzg1NHzu3LyfsSAJbkQGUr4DgVuQnwZ6TG1tn5sMxm7YTqbsTh3AnrtyWFxJn+3
 9GGF6yII/dpYQ==
Message-ID: <2aae66e7-f7e3-4da4-aee8-0ff9a8db1f0a@HIDDEN>
Date: Mon, 12 Feb 2024 14:54:37 +0000
MIME-Version: 1.0
Subject: Re: bug#65719: [PATCH] Pass restart argument to
 'kill-emacs-query-functions'
Content-Language: en-US
To: Stefan Kangas <stefankangas@HIDDEN>
References: <329566cab29d3bdd4cd7f2257ec9f92a@HIDDEN>
 <CADwFkmmEmxiu+gp5nE0dOswV+Pc0FArpP=emSpC7Wr8LGg85xw@HIDDEN>
 <0817cde8dd8dab055dafe2e8aa3d30d5@HIDDEN>
 <CADwFkm=cUbJLfPZzYvj68+fsnqm5fkFJAy6V49mcY4rZ+8RoTA@HIDDEN>
From: Ellis Kenyo <me@HIDDEN>
In-Reply-To: <CADwFkm=cUbJLfPZzYvj68+fsnqm5fkFJAy6V49mcY4rZ+8RoTA@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65719
Cc: 65719 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Apologies for letting this one slip, I must have forgotten to reply.

Some time has passed since so I'll create a new patch in the next few 
hours including that manual change and mail it in :)

Sorry for the delay!

Thanks,

Ellis





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65719; Package emacs. Full text available.

Message received at 65719 <at> debbugs.gnu.org:


Received: (at 65719) by debbugs.gnu.org; 15 Oct 2023 14:33:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 15 10:33:08 2023
Received: from localhost ([127.0.0.1]:53894 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qs2B1-0008Cz-WF
	for submit <at> debbugs.gnu.org; Sun, 15 Oct 2023 10:33:08 -0400
Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:48224)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qs2Az-0008CR-Fr
 for 65719 <at> debbugs.gnu.org; Sun, 15 Oct 2023 10:33:06 -0400
Received: by mail-lf1-x135.google.com with SMTP id
 2adb3069b0e04-507a62d4788so1312601e87.0
 for <65719 <at> debbugs.gnu.org>; Sun, 15 Oct 2023 07:32:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1697380355; x=1697985155; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=IKbJk8aE+2CfiAXEm2Qd+AQdbzt3eYbCX1nJJs2IGfM=;
 b=biHXtAnZX+SSjN3lNkIFIAxWj9Wpv9mHy/GApy+Vd4ntphJblBLJb8k6K5uI19ZbN3
 tGqCmzG/emWODaISSkpmR1o7Kl9yB5pWOaSO0PClEMM0D+ouGql5MR7aZ+KtTowFAllR
 nqpXZFWmtSuOkBfo/yZYAzDNobGSfjjnezOztiVq/2G5spVjltxqs7O9QyI5Oo+Pl4S+
 vjf42gpSBg34cn12NRV9oWU6erdIJrl+6pqFaDQKR35wKoy4ov/ZN4ISPtLdEb/quqao
 0W/bNS8nf6obBEIqRBrP6pXlKqLFipOIHHkoogYbWb7QST6pOFaW9qlOJqdMFNqUbF1G
 etXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1697380355; x=1697985155;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=IKbJk8aE+2CfiAXEm2Qd+AQdbzt3eYbCX1nJJs2IGfM=;
 b=r1856JFzxvQGQpVSYE2w148wAILwH++IikxrcvO5erBIo9DqJb4d8cpNpLjTsJGw9l
 zNEL3fSBAiqPjRh+6yaAZN5djPs7jg5S1HSxG2jfeZYkaiAlbBQPu/Z1T7Mh1pqmnkeS
 0vLzUDUYPMNtmYn0/6XLPzgsSzzuCWsjC46ewzg8BiBr3va5zNWfwhId3SUg8y7a/f17
 g8k48sseJm0Gcy4kxaeWv8v2Fwml5nCB965q8BTaCe+vZsAi4oNwty0rHXE5zvxmgSGr
 GQ53MC2P6qbdhvisyOYqBvcYqxypsKL73IwGALnqPkk9iNLWKAEd8RPJiDTUs7oaPJNW
 vXAA==
X-Gm-Message-State: AOJu0YzUh7kzdQInGfM7x+DaUmqeTgJUs9AZpB8RB+3VZ2wDDBYqVT92
 LDZZ2xtAV8u3/ji2/jffC9eaiwzhJ8V/ZY+fqtY9Ln8JSmbFCQ==
X-Google-Smtp-Source: AGHT+IFStsaYBCL+cx8WEHW7JxIALCf8ygE1Q3BrjPQKLFY3E/Gj84dmw2MMc03lCVEjacAb5nXJpSt8BI0cAIAb4SI=
X-Received: by 2002:a05:6512:32a3:b0:507:b099:749f with SMTP id
 q3-20020a05651232a300b00507b099749fmr663430lfe.15.1697380354901; Sun, 15 Oct
 2023 07:32:34 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sun, 15 Oct 2023 07:32:34 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <0817cde8dd8dab055dafe2e8aa3d30d5@HIDDEN>
References: <329566cab29d3bdd4cd7f2257ec9f92a@HIDDEN>
 <CADwFkmmEmxiu+gp5nE0dOswV+Pc0FArpP=emSpC7Wr8LGg85xw@HIDDEN>
 <0817cde8dd8dab055dafe2e8aa3d30d5@HIDDEN>
MIME-Version: 1.0
Date: Sun, 15 Oct 2023 07:32:34 -0700
Message-ID: <CADwFkm=cUbJLfPZzYvj68+fsnqm5fkFJAy6V49mcY4rZ+8RoTA@HIDDEN>
Subject: Re: bug#65719: [PATCH] Pass restart argument to
 'kill-emacs-query-functions'
To: me@HIDDEN
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65719
Cc: 65719 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

me@HIDDEN writes:

>> One idea would be to simply introduce a new variable that takes the
>> argument, while making the old one obsolete.  That would allow people
>> to
>> slowly migrate over to the new one, without everything suddenly
>> breaking
>> under their feet.
>
> How does this patch sound? I think it's the best of both worlds :)

Thanks, sounds good to me.

Before it can go in, I think it should also be added to the user manual,
next to where `kill-emacs-query-functions' is documented.  And add the
correct "+++" tag to the NEWS entry.

Thanks in advance.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65719; Package emacs. Full text available.

Message received at 65719 <at> debbugs.gnu.org:


Received: (at 65719) by debbugs.gnu.org; 8 Sep 2023 11:38:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 08 07:38:05 2023
Received: from localhost ([127.0.0.1]:42381 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qeZoL-0007ps-05
	for submit <at> debbugs.gnu.org; Fri, 08 Sep 2023 07:38:05 -0400
Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:53361)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qeZoI-0007pG-1G
 for 65719 <at> debbugs.gnu.org; Fri, 08 Sep 2023 07:38:03 -0400
Received: by mail-lj1-x235.google.com with SMTP id
 38308e7fff4ca-2bb9a063f26so34324671fa.2
 for <65719 <at> debbugs.gnu.org>; Fri, 08 Sep 2023 04:37:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1694173074; x=1694777874; darn=debbugs.gnu.org;
 h=content-transfer-encoding:cc:to:subject:message-id:date
 :mime-version:references:in-reply-to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=Spaj9moJ83N/lUuXJIU14mnjYzBvaEbc4XPTc4ZU2UI=;
 b=aHwTw/XCo9xvZ3MIeBZn0ksVaJ05RHZ9l9NWvDdiLQ4REb/lJOuvdnV3BXrq5RbHZ5
 o080pcnAFm2Th4JIQ8v5khtlXxztuFLGKsm6T9uqGatq7Pb5Vh/5NTLyOLy7VT7xGEME
 s5GOm0htfq303qdQ5Hj82vuwooQcotM2fIZFSxHzmaGLI2UBWB8RmhHkDFeZ4P4k3F8f
 3PKh6HBo1zTKbcng/t3B/HJhv6R2LctvTv86TH6Xhn1al5EzbqlnZ7f+Hn+BGYe6/5nC
 HbV+MTtwu2IT78MtlQQdE/jrTYm9Irc1ENPmgfZsmycieCWjEfq8yMau12UfkGr0UdT0
 MN7g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1694173074; x=1694777874;
 h=content-transfer-encoding:cc:to:subject:message-id:date
 :mime-version:references:in-reply-to:from:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=Spaj9moJ83N/lUuXJIU14mnjYzBvaEbc4XPTc4ZU2UI=;
 b=uwE7Mup52kiWqBcPjNqGx+FhBxAeXAqYiTB9GUlCtQqy4QoMxhls4GR5tnTV0UsdJL
 KIpJcyIEH0WQ5igLAQWvdcjZa4qWQLpOD/gWmUk/Z2+5bU+pHcJldZomJTCzKTo1KQ5x
 KQNVF13xF2SNqFhK3uBLqjJJOsJNZWTT0sVrBhkUptMDAB518Z4/Nnam0JIAtTb0q95D
 QjE5BPCrchWvB/SlpOHidu8ekBUxgjkiR8wouft5dmQmHlSgQyAynxg3ewpAyaG6b1Sy
 HMdmQo08cbDOEsGskDARjlvx0m5H8AQ+KoV5eQU7iAVdD4vIPgykd+YQJdvDRyNUF+NK
 HQVA==
X-Gm-Message-State: AOJu0YxN4h7gr2l+6hjPY8F/7mhwyg1kdChWXaWejOGouhc0RTvOxktU
 Z7gPZ5dtwXegVUwcdVAUY61xAZns6JpiWM9twoc=
X-Google-Smtp-Source: AGHT+IG4vb/tRKDD3WnSFNmv2zAYRO7/vX5TPm54a/legdAVbGM7Q64Wzy2wd8qWc0yQ6BL3fI+xSTzuOQDg5Yzc0No=
X-Received: by 2002:a2e:7813:0:b0:2be:541c:d06b with SMTP id
 t19-20020a2e7813000000b002be541cd06bmr1498975ljc.53.1694173073494; Fri, 08
 Sep 2023 04:37:53 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Fri, 8 Sep 2023 04:37:53 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <0817cde8dd8dab055dafe2e8aa3d30d5@HIDDEN>
References: <329566cab29d3bdd4cd7f2257ec9f92a@HIDDEN>
 <CADwFkmmEmxiu+gp5nE0dOswV+Pc0FArpP=emSpC7Wr8LGg85xw@HIDDEN>
 <0817cde8dd8dab055dafe2e8aa3d30d5@HIDDEN>
MIME-Version: 1.0
Date: Fri, 8 Sep 2023 04:37:53 -0700
Message-ID: <CADwFkmkuQWS=v=+SQ+GSdgqWRvBkkmX1HVJFX7j1Oaz4Oz68CQ@HIDDEN>
Subject: Re: bug#65719: [PATCH] Pass restart argument to
 'kill-emacs-query-functions'
To: me@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65719
Cc: 65719 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

me@HIDDEN writes:

>> One idea would be to simply introduce a new variable that takes the
>> argument, while making the old one obsolete.  That would allow people
>> to slowly migrate over to the new one, without everything suddenly
>> breaking under their feet.
>
> How does this patch sound? I think it's the best of both worlds :)

LGTM, but let's see if anyone else has any comments.

> From 7d6f5c259cefe65b5e021dacee18966acc6bc120 Mon Sep 17 00:00:00 2001
> From: Ellis Kenyo <me@HIDDEN>
> Date: Mon, 4 Sep 2023 06:20:33 +0100
> Subject: [PATCH] Introduce 'restart-emacs-query-functions'
>
> * etc/NEWS: Update NEWS file.
>
> * lisp/files.el (save-buffers-kill-emacs): Add new option
> 'restart-emacs-query-functions' for functions that should be called
> when 'restart' is passed.
> ---
>  etc/NEWS      |  7 +++++++
>  lisp/files.el | 13 +++++++++++++
>  2 files changed, 20 insertions(+)
>
> diff --git a/etc/NEWS b/etc/NEWS
> index bbf4b67fe34..95e6248c08a 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -776,6 +776,13 @@ the current project.
>  The look of the key prompt in the project switcher has been changed
>  slightly.  To get the previous one, set this option to 'brackets'.
>
> +** Files
> +
> +*** New user option 'restart-emacs-query-functions'.
> +Equivalent to 'kill-emacs-query-functions', this hook is called when
> +'save-buffers-kill-emacs' is called with the 'restart' flag; if
> +invoked from say 'M-x restart-emacs'.
> +
>  =0C
>  * Incompatible Lisp Changes in Emacs 30.1
>
> diff --git a/lisp/files.el b/lisp/files.el
> index 4188615e490..7849d6b7c81 100644
> --- a/lisp/files.el
> +++ b/lisp/files.el
> @@ -8142,6 +8142,15 @@ defcustom kill-emacs-query-functions
>    :version "26.1"
>    :group 'convenience)
>
> +(defcustom restart-emacs-query-functions nil
> +  "Functions to call with no arguments to query about restarting
> +Emacs. If any of these functions returns nil, restarting Emacs is
> +canceled. `save-buffers-kill-emacs' calls these functions when passed
> +`restart'.  See also `kill-emacs-hook'."
> +  :type 'hook
> +  :version "30.1"
> +  :group 'convenience)
> +
>  (defcustom confirm-kill-emacs nil
>    "How to ask for confirmation when leaving Emacs.
>  If nil, the default, don't ask at all.  If the value is non-nil, it shou=
ld
> @@ -8227,6 +8236,10 @@ defun save-buffers-kill-emacs
>                              (yes-or-no-p "Active processes exist; kill t=
hem and exit anyway? "))
>                          (when (window-live-p window)
>                            (quit-restore-window window 'kill)))))))))
> +     ;; Only call these when restarting
> +     (when restart
> +       (run-hook-with-args-until-failure 'restart-emacs-query-functions)=
)
> +
>       ;; Query the user for other things, perhaps.
>       (run-hook-with-args-until-failure 'kill-emacs-query-functions)
>       (or (null confirm)
> --
> 2.41.0




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65719; Package emacs. Full text available.

Message received at 65719 <at> debbugs.gnu.org:


Received: (at 65719) by debbugs.gnu.org; 4 Sep 2023 05:26:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 04 01:26:40 2023
Received: from localhost ([127.0.0.1]:48054 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qd26i-0008Qz-IG
	for submit <at> debbugs.gnu.org; Mon, 04 Sep 2023 01:26:40 -0400
Received: from mail.elken.dev ([165.22.120.78]:58977)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1qd26c-0008Qf-Mb
 for 65719 <at> debbugs.gnu.org; Mon, 04 Sep 2023 01:26:39 -0400
Received: from authenticated-user (mail.elken.dev [165.22.120.78])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.elken.dev (Postfix) with ESMTPSA id B34F945D52;
 Mon,  4 Sep 2023 07:26:28 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elken.dev; s=mail;
 t=1693805188; bh=T/DTNM8w+a0bVkd8iSjRt5dD7SujTzJlroAqf5HwVcA=;
 h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
 b=1GRvoDcga5VoxP8ynkGj4rcBgyCYT6jwtKYZ0oiDU6B6oeiaC8bIOXOM/YcF/ZgW7
 B/XmniKUbic2wi61bBvb5BPBcMK8vFOj0X4ilD5u2uR48d6SegfjMtqSm+dfShve33
 97hx1/2mKD7BZeWi73rPl7ky/AmxlbImdD+rUyqdW9IeEa1YnAVBZGA7epCOn9jkjM
 FPAX2n4qSbeTZ1E685srzh538/WUhL2CEbNKOZOZUotj2wOjH6Bwa6vIzO8mebegqt
 Qvx6tleo4UxMsb60Ve75gLOFzJdFYGDwtaNwpb/c/ZIV6RDD4oveNqljy5KRdc3nTQ
 V7aBWAos1GyxA==
MIME-Version: 1.0
Date: Mon, 04 Sep 2023 06:26:28 +0100
From: me@HIDDEN
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#65719: [PATCH] Pass restart argument to
 'kill-emacs-query-functions'
In-Reply-To: <CADwFkmmEmxiu+gp5nE0dOswV+Pc0FArpP=emSpC7Wr8LGg85xw@HIDDEN>
References: <329566cab29d3bdd4cd7f2257ec9f92a@HIDDEN>
 <CADwFkmmEmxiu+gp5nE0dOswV+Pc0FArpP=emSpC7Wr8LGg85xw@HIDDEN>
Message-ID: <0817cde8dd8dab055dafe2e8aa3d30d5@HIDDEN>
X-Sender: me@HIDDEN
Content-Type: multipart/mixed;
 boundary="=_10f08f0369320f673f07700601e3a5cf"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65719
Cc: 65719 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=_10f08f0369320f673f07700601e3a5cf
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII;
 format=flowed

> One idea would be to simply introduce a new variable that takes the
> argument, while making the old one obsolete.  That would allow people 
> to
> slowly migrate over to the new one, without everything suddenly 
> breaking
> under their feet.

How does this patch sound? I think it's the best of both worlds :)
--=_10f08f0369320f673f07700601e3a5cf
Content-Transfer-Encoding: base64
Content-Type: text/x-diff;
 name=0001-Introduce-restart-emacs-query-functions.patch
Content-Disposition: attachment;
 filename=0001-Introduce-restart-emacs-query-functions.patch;
 size=2369

RnJvbSA3ZDZmNWMyNTljZWZlNjViNWUwMjFkYWNlZTE4OTY2YWNjNmJjMTIwIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBFbGxpcyBLZW55byA8bWVAZWxrZW4uZGV2PgpEYXRlOiBNb24s
IDQgU2VwIDIwMjMgMDY6MjA6MzMgKzAxMDAKU3ViamVjdDogW1BBVENIXSBJbnRyb2R1Y2UgJ3Jl
c3RhcnQtZW1hY3MtcXVlcnktZnVuY3Rpb25zJwoKKiBldGMvTkVXUzogVXBkYXRlIE5FV1MgZmls
ZS4KCiogbGlzcC9maWxlcy5lbCAoc2F2ZS1idWZmZXJzLWtpbGwtZW1hY3MpOiBBZGQgbmV3IG9w
dGlvbgoncmVzdGFydC1lbWFj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1vci1uby1wICJBY3RpdmUgcHJvY2Vzc2VzIGV4aXN0OyBraWxsIHRoZW0gYW5kIGV4aXQg
YW55d2F5PyAiKSkKICAgICAgICAgICAgICAgICAgICAgICAgICh3aGVuICh3aW5kb3ctbGl2ZS1w
IHdpbmRvdykKICAgICAgICAgICAgICAgICAgICAgICAgICAgKHF1aXQtcmVzdG9yZS13aW5kb3cg
d2luZG93ICdraWxsKSkpKSkpKSkpCisgICAgIDs7IE9ubHkgY2FsbCB0aGVzZSB3aGVuIHJlc3Rh
cnRpbmcKKyAgICAgKHdoZW4gcmVzdGFydAorICAgICAgIChydW4taG9vay13aXRoLWFyZ3MtdW50
aWwtZmFpbHVyZSAncmVzdGFydC1lbWFjcy1xdWVyeS1mdW5jdGlvbnMpKQorCiAgICAgIDs7IFF1
ZXJ5IHRoZSB1c2VyIGZvciBvdGhlciB0aGluZ3MsIHBlcmhhcHMuCiAgICAgIChydW4taG9vay13
aXRoLWFyZ3MtdW50aWwtZmFpbHVyZSAna2lsbC1lbWFjcy1xdWVyeS1mdW5jdGlvbnMpCiAgICAg
IChvciAobnVsbCBjb25maXJtKQotLSAKMi40MS4wCgo=
--=_10f08f0369320f673f07700601e3a5cf--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65719; Package emacs. Full text available.

Message received at 65719 <at> debbugs.gnu.org:


Received: (at 65719) by debbugs.gnu.org; 4 Sep 2023 05:04:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 04 01:04:51 2023
Received: from localhost ([127.0.0.1]:48026 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qd1lb-0007dc-11
	for submit <at> debbugs.gnu.org; Mon, 04 Sep 2023 01:04:51 -0400
Received: from mail.elken.dev ([165.22.120.78]:38917)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1qd1lK-0007cu-MF
 for 65719 <at> debbugs.gnu.org; Mon, 04 Sep 2023 01:04:49 -0400
Received: from authenticated-user (mail.elken.dev [165.22.120.78])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.elken.dev (Postfix) with ESMTPSA id 4D5DB3F39F;
 Mon,  4 Sep 2023 07:04:27 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elken.dev; s=mail;
 t=1693803868; bh=C8FHMxUHiPbaxqAdmsZ1jHfytYKBLT7D5RL0pW3RlgY=;
 h=Date:From:To:Subject:In-Reply-To:References:From;
 b=oy05QhZpZrniGAsCn/c9faRuaZoabFCznXQe7TtwyFiZMl2jq3ViQUYehJ+9tktlU
 IcKetmRTRDPntMo16fQXhgZZN1HQ5gc10ZdvlqVT/h6t5eL8kjBSaT14gtVbUViRqq
 ucabM8qJ7voW9oEWFOK7pbTH4pgCReVwny7+rte6YWDFVAWAgzR0ReomgMrz0IwCC2
 kCXCQPKmM4b1uTlntxKMMWM+vtoAqjEwmUZzF6XaZctr/7dpCLgQjTBt1b4/ZzKMou
 73pW4o+ozAvOd8LByRWjBcP2zrHDgvcY033XPch12AXDM8ii4XnhwInbVd9l7pmWCD
 JBq6tA5a3gJEQ==
Date: Mon, 04 Sep 2023 06:04:25 +0100
From: Elken <me@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>, 65719 <at> debbugs.gnu.org
Subject: =?US-ASCII?Q?Re=3A_bug=2365719=3A_=5BPATCH=5D_Pass_restart_ar?=
 =?US-ASCII?Q?gument_to_=27kill-emacs-query-functions=27?=
In-Reply-To: <CADwFkmmEmxiu+gp5nE0dOswV+Pc0FArpP=emSpC7Wr8LGg85xw@HIDDEN>
References: <329566cab29d3bdd4cd7f2257ec9f92a@HIDDEN>
 <CADwFkmmEmxiu+gp5nE0dOswV+Pc0FArpP=emSpC7Wr8LGg85xw@HIDDEN>
Message-ID: <5F5E625D-2425-48DB-B1B4-CEE81496144F@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary=----5AWU35ZDGMM4O2TOT0BCPSO89FU8J8
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65719
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

------5AWU35ZDGMM4O2TOT0BCPSO89FU8J8
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Stefan,=20

Thanks for the positive feedback=2E=20

I'm not sure that's the case, I'll do more testing locally=2E If that is t=
he case, then I can introduce 'restart-emacs-query-functions' instead when =
'restart' is t for the same outcome, which may actually be a preferable cha=
nge anyway=2E=20

Thanks,=20

Ellis (@lkn)
------5AWU35ZDGMM4O2TOT0BCPSO89FU8J8
Content-Type: text/html;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><body><div dir=3D"auto">Hi Stefan, <br><br>Thanks for =
the positive feedback=2E <br><br>I'm not sure that's the case, I'll do more=
 testing locally=2E If that is the case, then I can introduce 'restart-emac=
s-query-functions' instead when 'restart' is t for the same outcome, which =
may actually be a preferable change anyway=2E <br><br>Thanks, <br><br>Ellis=
 (@lkn)</div></body></html>
------5AWU35ZDGMM4O2TOT0BCPSO89FU8J8--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65719; Package emacs. Full text available.

Message received at 65719 <at> debbugs.gnu.org:


Received: (at 65719) by debbugs.gnu.org; 4 Sep 2023 01:01:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 03 21:01:38 2023
Received: from localhost ([127.0.0.1]:47855 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qcxyD-0000G6-PU
	for submit <at> debbugs.gnu.org; Sun, 03 Sep 2023 21:01:38 -0400
Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:45131)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qcxyB-0000Fp-Cu
 for 65719 <at> debbugs.gnu.org; Sun, 03 Sep 2023 21:01:36 -0400
Received: by mail-lf1-x133.google.com with SMTP id
 2adb3069b0e04-500c37d479aso1400124e87.2
 for <65719 <at> debbugs.gnu.org>; Sun, 03 Sep 2023 18:01:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1693789289; x=1694394089; darn=debbugs.gnu.org;
 h=to:subject:message-id:date:mime-version:references:in-reply-to:from
 :from:to:cc:subject:date:message-id:reply-to;
 bh=tflNqeWQq9UJWYunW6pzd2F2Y9MSLaC2pm6kXUJOPEk=;
 b=TI5WVNy6t9C/wI7Yc8GeB5uzjuYOr5ggEK0iP8eqKht4NzN+CzArLf5/i2d+XNnnDs
 WDG7LzYdaqyRmcqnsRrRgUlaxqIe0eJxpQ0raj/Ro6lx8/KP8Nk+g4Mjm0SQRXumKI7/
 9ZtaUPFLZcs303Yr8zmnqX7PIgzy8Ht7I46VXpjtw5S8fxQoXhiH/iXLMljGMh3/8s1H
 Xf2sqltv0zWk3g9ZxdrEXGNFvsZp3cvgDdLEBm0StACAnTZY41bikhLBX/PL/daYqdlE
 X1NsOsBBtVFavQe4vfP5NuHPAEXq0+9YvEVm97yuspRnHUjj9kXZRwsq0t6uyYRj08TR
 yhew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1693789289; x=1694394089;
 h=to:subject:message-id:date:mime-version:references:in-reply-to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=tflNqeWQq9UJWYunW6pzd2F2Y9MSLaC2pm6kXUJOPEk=;
 b=AL22Wf3k2AOk8DtkzLFAsOHgVmF5G9sA8RL8H+meCzTZZVn1E3rPEeaij2CjmIQYlu
 KALqvnGfOyTJWztdHNybwkppcGvTllEbv/xPBOeO3jYU27qqquMKetFAx+5Jpx6R7wbm
 Jk4F4+XucnXvzBPTaLRH1ppkxx+GZvuUsKWU+kpklk9Vc6W5Tv2jkTYNexEt5lalBH53
 TzjRyaXDf3wtK6DOVdeIRR6gGUuPZSDRKUidXKWVwWPjLYshjTO1H/ox5ojaRGShhieY
 vS9FkboppT7tKjopQXrQtPg630D08t7ByRVbJLenKViesd0TaA6nRW6+vGzg8UZxpgMB
 kJwQ==
X-Gm-Message-State: AOJu0YzSJ0yYDXoj+VOpyQMEUb7Yli1z/Yd21i4s/bpsY0XMEvRZGSLq
 Uiay2gj/G4C9xzXVbCcTdZws6DKRXQGnKV0B0e3iS8/6YT0=
X-Google-Smtp-Source: AGHT+IHMHdbDxYdf54Y4PXKsJwYfQhcpEoAghGvy7/vUaXXUOv8Cemohyr10/RrVZyL0NpQWK3x0YL8MbeuVeKsHqFI=
X-Received: by 2002:a05:6512:398e:b0:500:be66:e014 with SMTP id
 j14-20020a056512398e00b00500be66e014mr5927928lfu.53.1693789289265; Sun, 03
 Sep 2023 18:01:29 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sun, 3 Sep 2023 18:01:28 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <329566cab29d3bdd4cd7f2257ec9f92a@HIDDEN>
References: <329566cab29d3bdd4cd7f2257ec9f92a@HIDDEN>
MIME-Version: 1.0
Date: Sun, 3 Sep 2023 18:01:28 -0700
Message-ID: <CADwFkmmEmxiu+gp5nE0dOswV+Pc0FArpP=emSpC7Wr8LGg85xw@HIDDEN>
Subject: Re: bug#65719: [PATCH] Pass restart argument to
 'kill-emacs-query-functions'
To: me@HIDDEN, 65719 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65719
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

me--- via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@HIDDEN> writes:

> Small change here to pass the restart status to
> 'kill-emacs-query-functions' in 'save-buffers-kill-emacs' so any
> functions there can react to being restarted, sample use-case this may
> be useful is if one is using a package like perspective.el to handle
> buffer/window management and when calling `M-x restart-emacs` you WANT
> your last session to be persisted, but just starting Emacs normally you
> don't.
>
> There are other potential use-cases for this too, so hopefully this
> patch is well-received.

Thanks.  The feature sounds useful, and the use-case makes sense.  But
isn't the change backwards-incompatible?  Can we find a way to do this
without any breaking changes?

One idea would be to simply introduce a new variable that takes the
argument, while making the old one obsolete.  That would allow people to
slowly migrate over to the new one, without everything suddenly breaking
under their feet.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65719; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Sep 2023 19:28:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 03 15:28:52 2023
Received: from localhost ([127.0.0.1]:46959 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qcsmB-0005xt-Tr
	for submit <at> debbugs.gnu.org; Sun, 03 Sep 2023 15:28:52 -0400
Received: from lists.gnu.org ([2001:470:142::17]:56690)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1qcsmA-0005xh-7X
 for submit <at> debbugs.gnu.org; Sun, 03 Sep 2023 15:28:50 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1qcsm4-0003SF-Qd
 for bug-gnu-emacs@HIDDEN; Sun, 03 Sep 2023 15:28:45 -0400
Received: from mail.elken.dev ([165.22.120.78])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1qcsm1-0008A5-Qm
 for bug-gnu-emacs@HIDDEN; Sun, 03 Sep 2023 15:28:44 -0400
Received: from authenticated-user (mail.elken.dev [165.22.120.78])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.elken.dev (Postfix) with ESMTPSA id D834E45D52
 for <bug-gnu-emacs@HIDDEN>; Sun,  3 Sep 2023 21:28:34 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elken.dev; s=mail;
 t=1693769314; bh=VPe8aYrLge9ApuDynvwvY9YEXObu1+TjlbqtB4BJkDQ=;
 h=Date:From:To:Subject:From;
 b=jJhnrMRPJbzlCvm0M6kG/HTgZZc9Ed1awC7bfBlTDQJR1OsTaXJmolX3WYd47EVGN
 clhqw5BEiGnVzTSJyR5JxhgT5OGxKE8BasbuUTpZwb5Ue/JM3KN4fHsFZpGyOgh7Ye
 3T29oazic0Otb1iKbMOENZ7rRrx61DzAkPWCitQMsbX5yf3Pt8Vo2lpfg4iYm0QqL4
 bfNJlkHLa4LW/4yPqZdSX7ESLsYZPa6PFPziMy8+lgghkP7IdSTaqCG9qysRSTau7x
 4HXCisDvAF0p5ikVBL71ATLVU9g2tJjqNIxgng2hgWNqxlBlKhK8w/EEXw5ePxSdOQ
 Ar/LKCqXHvnFQ==
MIME-Version: 1.0
Date: Sun, 03 Sep 2023 20:28:34 +0100
From: me@HIDDEN
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Pass restart argument to 'kill-emacs-query-functions'
Message-ID: <329566cab29d3bdd4cd7f2257ec9f92a@HIDDEN>
X-Sender: me@HIDDEN
Content-Type: multipart/mixed;
 boundary="=_69c6835b0749f6a7ab6541f194863d1c"
Received-SPF: pass client-ip=165.22.120.78; envelope-from=me@HIDDEN;
 helo=mail.elken.dev
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=_69c6835b0749f6a7ab6541f194863d1c
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII;
 format=flowed

Hi all,

Small change here to pass the restart status to 
'kill-emacs-query-functions' in 'save-buffers-kill-emacs' so any 
functions there can react to being restarted, sample use-case this may 
be useful is if one is using a package like perspective.el to handle 
buffer/window management and when calling `M-x restart-emacs` you WANT 
your last session to be persisted, but just starting Emacs normally you 
don't.

There are other potential use-cases for this too, so hopefully this 
patch is well-received.

Thanks all,

Ellis (@lkn)
--=_69c6835b0749f6a7ab6541f194863d1c
Content-Transfer-Encoding: base64
Content-Type: text/x-diff;
 name=0001-Add-restart-argument-to-kill-emacs-query-functions.patch
Content-Disposition: attachment;
 filename=0001-Add-restart-argument-to-kill-emacs-query-functions.patch;
 size=2423

RnJvbSAyNTBjMGM0Zjg4ZjFkMTY5NDE1ZDRmNmM2NjM0ZTE3ODI5MDY0NzQ2IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBFbGxpcyBLZW55byA8bWVAZWxrZW4uZGV2PgpEYXRlOiBTdW4s
IDMgU2VwIDIwMjMgMj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b25zIHJldHVybnMgbmlsLCBr
aWxsaW5nIEVtYWNzIGlzCitjYW5jZWxlZC4gYHNhdmUtYnVmZmVycy1raWxsLWVtYWNzJyBjYWxs
cyB0aGVzZSBmdW5jdGlvbnMsIGJ1dAorYGtpbGwtZW1hY3MnLHRoZSBsb3cgbGV2ZWwgcHJpbWl0
aXZlLCBkb2VzIG5vdC4gIFNlZSBhbHNvCitga2lsbC1lbWFjcy1ob29rJy4iCiAgIDp0eXBlICdo
b29rCiAgIDp2ZXJzaW9uICIyNi4xIgogICA6Z3JvdXAgJ2NvbnZlbmllbmNlKQpAQCAtODIyOCw3
ICs4MjI5LDcgQEAgZGVmdW4gc2F2ZS1idWZmZXJzLWtpbGwtZW1hY3MKICAgICAgICAgICAgICAg
ICAgICAgICAgICh3aGVuICh3aW5kb3ctbGl2ZS1wIHdpbmRvdykKICAgICAgICAgICAgICAgICAg
ICAgICAgICAgKHF1aXQtcmVzdG9yZS13aW5kb3cgd2luZG93ICdraWxsKSkpKSkpKSkpCiAgICAg
IDs7IFF1ZXJ5IHRoZSB1c2VyIGZvciBvdGhlciB0aGluZ3MsIHBlcmhhcHMuCi0gICAgIChydW4t
aG9vay13aXRoLWFyZ3MtdW50aWwtZmFpbHVyZSAna2lsbC1lbWFjcy1xdWVyeS1mdW5jdGlvbnMp
CisgICAgIChydW4taG9vay13aXRoLWFyZ3MtdW50aWwtZmFpbHVyZSAna2lsbC1lbWFjcy1xdWVy
eS1mdW5jdGlvbnMgcmVzdGFydCkKICAgICAgKG9yIChudWxsIGNvbmZpcm0pCiAgICAgICAgICAo
ZnVuY2FsbCBjb25maXJtICJSZWFsbHkgZXhpdCBFbWFjcz8gIikpCiAgICAgIChraWxsLWVtYWNz
IG5pbCByZXN0YXJ0KSkpKQotLSAKMi40MS4wCgo=
--=_69c6835b0749f6a7ab6541f194863d1c--




Acknowledgement sent to me@HIDDEN:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#65719; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 12 Feb 2024 15:00:03 UTC

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