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: Tue, 07 Jan 2025 15:54:42 +0000 Message-ID: <681a879f34e51bf76bea93a65822b572@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> <9422f3bb7316d0fb3eba6dcc832e26c5@elken.dev> <86cyh2d5ty.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="29106"; 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 Tue Jan 07 16:55:16 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 1tVBvH-0007LX-ST for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Jan 2025 16:55:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVBv7-00088e-T6; Tue, 07 Jan 2025 10:55:05 -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 1tVBv5-000868-GB for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2025 10:55:03 -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 1tVBv5-0007U0-0B for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2025 10:55:03 -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=YTv9ZwnVLG7j7xQBYJ3NB0SWtM7Vfs05RFvujJo9S5c=; b=gIbj1Y6+Q4RS86o8uYh7TX4GnIg/ciqvLQnJNXj5AsSRnKooAwikp2Nfomb351xRffDcNppwdpz49yN53rtoLZCNbs2S8jb+5kpQuYVJ3ypft/rUZp/sDIUL3JsjMpJmz85Js4bi9j15cwt/+V3aSDcY3RYUHVS0cnTfJhuCQOPsXZ+PlHbRi9xja1c69IUSQZmRl85B37sMivi8yWhUo996CdVysjB8MeyO9K/OadAztGmnCGiI8df4NHBY+7ZRvKb6eLmX2eK2WLHjGrvJgrEvAnwVB/ByhUyj9p3qMncJBc9poPbJOzSo4S6OKs3dLdOh5kHoeynnJ9d+mN/prg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVBv4-0006YP-Dc for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2025 10:55: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: Tue, 07 Jan 2025 15:55: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.173626529125164 (code B ref 65719); Tue, 07 Jan 2025 15:55:02 +0000 Original-Received: (at 65719) by debbugs.gnu.org; 7 Jan 2025 15:54:51 +0000 Original-Received: from localhost ([127.0.0.1]:44276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVBus-0006Xo-U5 for submit@debbugs.gnu.org; Tue, 07 Jan 2025 10:54:51 -0500 Original-Received: from mail.elken.dev ([165.22.120.78]:47737) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tVBur-0006XV-05 for 65719@debbugs.gnu.org; Tue, 07 Jan 2025 10:54:49 -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 6083C46327; Tue, 7 Jan 2025 16:54:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elken.dev; s=mail; t=1736265282; bh=HYVZCzikBRCMdMHtGcPzWJ6HrIm2UBbByc7Z4e/nkkU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Bl47H0ZDt9D/tEGAyVxZJ9vflVINpI7toKtAjdvOm6jl7i1ZWb+3engY1XPzbc9Nc PrSR6x8MPuctWqFcizFmQ8UMBVUgdQ8iTY7Vr3tQEnL8q85t7A+3KQNCgYZgGi0mCn 1q1aPPQRsOJwDUK0fk8Y/ZUH29TBUwHIwFHwGhQhiMTxiiQz4TP1n5BXJDojb8S2de FqFj1sSmqkdjEOJN9grIwtqLs3RNYFnwX+9RfgCoNSp7IefAIDVp0Dda+OdWgMkSN9 0ajf63/xqZTa0vIsHDLL5yWNpIxAOAiX7kS70baZp0Umf85qMj1EuB4lNVxS6xmxHz nnLlNGNkN27iA== In-Reply-To: <86cyh2d5ty.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:298728 Archived-At: > It's a strange (and maybe even dangerous) distinction. I'm afraid I don't see this, could you elaborate? > But in any case, I think a cleaner solution would be to bind a > variable inside restart-emacs, and then your hook could examine it. > Alternatively, ... > >> > In any case, the prefix argument is available via current-prefix-arg. >> >> Yes you're right, I realised after I sent it.... > > ...you could invoke restart-emacs with a prefix argument, and examine > that in your kill-emacs-query-functions hook. AFAICT, this should > work without any changes. I'm afraid I also don't follow here, how is that cleaner than introducing a specific hook? Rather than needing to specifically modify a function to work with the prefix argument, you can just add it to the hook.