From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: me--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65719: [PATCH] Pass restart argument to 'kill-emacs-query-functions' Date: Sat, 04 Jan 2025 13:34:23 +0000 Message-ID: <9422f3bb7316d0fb3eba6dcc832e26c5@elken.dev> References: <329566cab29d3bdd4cd7f2257ec9f92a@elken.dev> <0817cde8dd8dab055dafe2e8aa3d30d5@elken.dev> <2aae66e7-f7e3-4da4-aee8-0ff9a8db1f0a@elken.dev> <0d97a409-b9c4-4204-b5d0-1bb386056c56@elken.dev> <86v86tr5dj.fsf@gnu.org> <86sf1xr3ep.fsf@gnu.org> <60592464472415a836939db15e38a8cf@elken.dev> <86v7uud8ua.fsf@gnu.org> Reply-To: me@elken.dev Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34517"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65719@debbugs.gnu.org, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 04 14:35:14 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tU4J8-0008nj-7m for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 14:35:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tU4J0-0002gM-0v; Sat, 04 Jan 2025 08:35:06 -0500 Original-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 ) id 1tU4Iy-0002g0-EK for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 08:35:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tU4Iw-0002jb-Ay for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 08:35:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:MIME-Version:To:Subject; bh=tzd+DsleMYV7bLLR463RyxhhDM330dtV4g5uYo7PkXQ=; b=jpzUz9Q610z7tUTZpJ0EWwlesdA28jrNn2oqf6jqFo7FJZqV3tN15XUvZgcLIe2yY0fJFveFucBCyQxOkBr7pPAkXf6Wvy57n8wbNMizQPkAVR+a4pXFk62lfEOdt5xTqRcQEcUQo5uvwVpA4pL9MEwPtj6I0JVmVeCEqQooHr1muSqiqfIP4uLoCKv+8tanfWWoVl449eOlWSDf4OgcRM+h0AK90blKWQGQc8ZAxPdV6fPLLC1vpvqWdtTs1IXc/drNUSuiOcD277YgzYK/wWHyQeK+AA2O9+48JnvBGfVRxy/OzRd5WokpWFC3SsmlPV6i5G+ZY2E8SX27fIyrYQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tU4Iw-0008Np-5p for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 08:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: me@elken.dev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2025 13:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65719 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65719-submit@debbugs.gnu.org id=B65719.173599767232183 (code B ref 65719); Sat, 04 Jan 2025 13:35:02 +0000 Original-Received: (at 65719) by debbugs.gnu.org; 4 Jan 2025 13:34:32 +0000 Original-Received: from localhost ([127.0.0.1]:53924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU4IS-0008N1-1y for submit@debbugs.gnu.org; Sat, 04 Jan 2025 08:34:32 -0500 Original-Received: from mail.elken.dev ([165.22.120.78]:55215) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tU4IQ-0008Mn-5x for 65719@debbugs.gnu.org; Sat, 04 Jan 2025 08:34:31 -0500 Original-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 9573946330; Sat, 4 Jan 2025 14:34:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elken.dev; s=mail; t=1735997663; bh=7c3hIuSt6ZdsZkAIrXTpzK8bzH1aqVtiJingsJHjf4k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NQANo4lfPQn2xFIdYoG8wcxNpFNNK508lNAQU2wFIdIPtv4Rf7iNzseGYqer/XfwT wmP0zbVbFgOeSWrNzjcwzxoRj/0IQ0AQXmz8zEuJ6/a7rub1Zodm94zOTCQ0v4KXPY g0FhyB9N0lYHAiSRmt7iU8oSU2ZY6o0DNKQR3EeyddRM5V6NiHCQ0zASab3dIG+YJd 6VyIZiP4CztB2Lvdo4osl+lDlgY6a5mjH6oijtx03XPWa1abFLnXIAVPTRpLqwz9Fp wYlHEwGWPHvo5qC7/fV5AquEmdNBjbof7TZkkrHjhWTs/emK+tKpE8/WKeFqQxhMP2 mUGbyX1ndelvg== In-Reply-To: <86v7uud8ua.fsf@gnu.org> X-Sender: me@elken.dev X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298400 Archived-At: > Sorry, I still don't follow. What does your > kill-emacs-query-functions hook do when passed the RESTART argument > that is different from RESTART being nil (i.e. killing Emacs without > restarting it)? The point is differentiating between a quick "Oh I just need to clear out some memory or reset the state of my Emacs, but I want to carry on working as I was" and "I'm done with Emacs now, next time I start it I want it to be a clean slate". Adding another hook was the cleanest option I could come up with. > And what does "loading workspaces" mean in this context? Maybe I should refer to them as perspectives instead, but this package: https://github.com/nex3/perspective-el. An arrangement of buffers and frames categorised by some condition (in my case project.el project) so each perspective has its own "tab" with all the buffers that belong to the perspective and a specific window arrangement. Basically, I want all the open buffers and window arrangement remembered. When I close down Emacs proper, I don't want it to load the exact arrangement when I then re-open it next time. However, when I call `restart-emacs`, I DO want it to load the previous arrangement of buffers, windows and tabs. > In any case, the prefix argument is available via current-prefix-arg. Yes you're right, I realised after I sent it....