* emacs-lock enhancements
@ 2009-09-22 10:54 Juanma Barranquero
2009-09-22 15:02 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2009-09-22 10:54 UTC (permalink / raw)
To: Emacs developers
I'm interested in incorporating into Emacs some of the functionality
(not code) of Noah Friedman's protbuf.el, i.e., the ability to protect
a buffer against killing.
Currently, emacs-lock.el does something similar, though it has some problems:
- It's not a proper minor-mode, so the locked status doesn't show in
the modeline.
- It conflates two meanings of "locked": it protects against killing,
and it avoids Emacs exiting while a buffer is locked.
- It deals with telnet and shell buffers as special cases, instead of
handling all buffers with live processes.
I'm planning on enhancing emacs-lock's functionality to make possible
separating the dont-kill and dont-exit-emacs flags (so a buffer can be
non-kill, but does not stop Emacs from exiting, for example).
What is the best interface for that: having two different minor modes
(let's say "emacs-lock-dont-kill-mode' and
`emacs-lock-dont-exit-mode'), or just one and somehow setting a flag
to indicate the desired level of protection, sort of like
overwrite-mode distinguishes between "normal" and "binary" modes?
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs-lock enhancements
2009-09-22 10:54 emacs-lock enhancements Juanma Barranquero
@ 2009-09-22 15:02 ` Stefan Monnier
2009-09-22 15:08 ` Juanma Barranquero
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2009-09-22 15:02 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Emacs developers
> I'm interested in incorporating into Emacs some of the functionality
> (not code) of Noah Friedman's protbuf.el, i.e., the ability to protect
> a buffer against killing.
We already have a fair bit of Noah's code, so at least from a copyright
point of view, copying code shouldn't be a problem (we'd still need Noah
to agreed, of course, but the prognosis is pretty good).
Of course, reimplementing might actually be simpler from a technical
point of view.
> Currently, emacs-lock.el does something similar, though it has some problems:
> - It's not a proper minor-mode, so the locked status doesn't show in
> the modeline.
It would be good to fix it so it uses define-minor-mode.
> - It deals with telnet and shell buffers as special cases, instead of
> handling all buffers with live processes.
Sounds like it would be good to improve that as well.
> What is the best interface for that: having two different minor modes
> (let's say "emacs-lock-dont-kill-mode' and
> `emacs-lock-dont-exit-mode'), or just one and somehow setting a flag
> to indicate the desired level of protection, sort of like
> overwrite-mode distinguishes between "normal" and "binary" modes?
I single major mode sounds sufficient. The distinction between the two
cases could even be done with a global variable, rather than being
per-buffer.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs-lock enhancements
2009-09-22 15:02 ` Stefan Monnier
@ 2009-09-22 15:08 ` Juanma Barranquero
2009-09-22 16:27 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2009-09-22 15:08 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Emacs developers
On Tue, Sep 22, 2009 at 17:02, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> We already have a fair bit of Noah's code, so at least from a copyright
> point of view, copying code shouldn't be a problem (we'd still need Noah
> to agreed, of course, but the prognosis is pretty good).
>
> Of course, reimplementing might actually be simpler from a technical
> point of view.
I'll take a look. I'm not sure whether it's easier to incorporate
emacs-lock into protbuf, or vice versa.
> I single major mode sounds sufficient. The distinction between the two
> cases could even be done with a global variable, rather than being
> per-buffer.
OK (assuming you mean "single minor mode" :-)
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-22 16:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-22 10:54 emacs-lock enhancements Juanma Barranquero
2009-09-22 15:02 ` Stefan Monnier
2009-09-22 15:08 ` Juanma Barranquero
2009-09-22 16:27 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.