GNU bug report logs -
#11017
24.0.94; emacs-lock--kill-emacs-query-functions should ding
Previous Next
Full log
Message #36 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
This bug report was last modified 3 years and 62 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.