From: Eli Zaretskii <eliz@gnu.org>
To: me@elken.dev
Cc: 65719@debbugs.gnu.org, stefankangas@gmail.com
Subject: bug#65719: [PATCH] Pass restart argument to 'kill-emacs-query-functions'
Date: Sat, 04 Jan 2025 16:14:17 +0200 [thread overview]
Message-ID: <86cyh2d5ty.fsf@gnu.org> (raw)
In-Reply-To: <9422f3bb7316d0fb3eba6dcc832e26c5@elken.dev> (me@elken.dev)
> Date: Sat, 04 Jan 2025 13:34:23 +0000
> From: me@elken.dev
> Cc: 65719@debbugs.gnu.org, stefankangas@gmail.com
>
> > 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.
It's a strange (and maybe even dangerous) distinction.
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.
next prev parent reply other threads:[~2025-01-04 14:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-03 19:28 bug#65719: [PATCH] Pass restart argument to 'kill-emacs-query-functions' me--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-04 1:01 ` Stefan Kangas
2023-09-04 5:04 ` Elken via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-04 5:26 ` me--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-08 11:37 ` Stefan Kangas
2023-10-15 14:32 ` Stefan Kangas
2024-02-12 14:54 ` Ellis Kenyo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-12 15:29 ` Ellis Kenyo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-12 16:53 ` Eli Zaretskii
[not found] ` <E50F6DD3-D4AA-4A51-B470-ABB496F6B113@elken.dev>
2024-02-12 17:35 ` Eli Zaretskii
2024-02-12 17:52 ` Elken via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-02 14:07 ` me--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 13:09 ` Eli Zaretskii
2025-01-04 13:34 ` me--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 14:14 ` Eli Zaretskii [this message]
2025-01-07 15:54 ` me--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-07 16:38 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86cyh2d5ty.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=65719@debbugs.gnu.org \
--cc=me@elken.dev \
--cc=stefankangas@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).