From: Michael Heerdegen <michael_heerdegen@web.de>
To: 11017@debbugs.gnu.org
Cc: Juanma Barranquero <lekktu@gmail.com>
Subject: bug#11017: 24.0.94; emacs-lock--kill-emacs-query-functions should ding
Date: Sat, 14 Apr 2012 02:36:38 +0200 [thread overview]
Message-ID: <86fwc740a1.fsf@web.de> (raw)
In-Reply-To: <CAAeL0SSsox7R2SHv0htJqw+gZ=ip9_7bbcnRD+htWtOXiMH4xg@mail.gmail.com> (Juanma Barranquero's message of "Tue, 10 Apr 2012 16:33:47 +0200")
Hello Juanma,
> Michael, this patch adds the hook described above. Could you please
> test it and see whether it works for you use case?
Yes, this looks really good. With
(add-hook 'emacs-lock-locked-buffer-hook
(lambda (buffer) (ding) (pop-to-buffer buffer)))
I get all I want. So, I'm happy with your patch.
However, should `emacs-lock-locked-buffer-hook' not better be named
`...-functions' or so? Because, from the manual:
| By convention, abnormal hook names end in `-functions' or `-hooks'.
| If the variable's name ends in `-function', then its value is just a
| single function, not a list of functions.
> As for the note option, I'm thinking about unobtrusive ways to add it.
Mmh, the prefix arg of `emacs-lock-mode' is already used for the locking
mode. So we'll probably need a separate command that reads the note
text and saves it to a buffer local variable, and maybe a user option
that controls if this command is run automatically by emacs-lock-mode.
Then I would just change the standard messages:
(message "Emacs cannot exit because buffer %S is locked"
(buffer-name locked))
(message "Buffer %S is locked and cannot be killed" (buffer-name))
to include the note - Just a proposal.
Anyway, if you have a patch, please send it to the bug's address again.
Regards,
Michael.
next prev parent reply other threads:[~2012-04-14 0:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 4:48 bug#11017: 24.0.94; emacs-lock--kill-emacs-query-functions should ding Michael Heerdegen
2012-03-15 12:54 ` Juanma Barranquero
2012-03-16 1:11 ` Michael Heerdegen
2012-03-16 2:26 ` Juanma Barranquero
2012-03-16 2:26 ` Stefan Monnier
2012-03-16 2:30 ` Juanma Barranquero
2012-03-19 2:20 ` Stefan Monnier
2012-03-19 9:04 ` Juanma Barranquero
2012-04-10 14:33 ` Juanma Barranquero
2012-04-14 0:36 ` Michael Heerdegen [this message]
2012-04-14 1:48 ` Juanma Barranquero
2020-09-19 15:00 ` Lars Ingebrigtsen
2020-09-19 22:36 ` Michael Heerdegen
2020-09-20 9:38 ` Lars Ingebrigtsen
2022-03-21 21:47 ` Lars Ingebrigtsen
2022-03-21 23:02 ` Michael Heerdegen
2022-03-22 14:07 ` Lars Ingebrigtsen
2022-03-22 23:37 ` Michael Heerdegen
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=86fwc740a1.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=11017@debbugs.gnu.org \
--cc=lekktu@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).