[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: button-buffer-map should inherit from special-mode-map
From: |
Drew Adams |
Subject: |
RE: button-buffer-map should inherit from special-mode-map |
Date: |
Thu, 21 Feb 2013 13:13:22 -0800 |
> The vehemence of your objection is stunning.
What vehemence? Another unwarranted assumption.
I just disagree with the assumptions you made and the proposal based on them. I
am not vehement about that disagreement. And I mean nothing personal by my
disagreement. You explicitly solicited objections (good), and I objected.
And the first thing I said was that I am no expert on this, which is the case.
AFAICT, there is no necessary reason for such a change, and not even any good
reason for it. And there is every reason to keep independent things uncoupled.
But I am open to being convinced otherwise. And I'm only one voice.
> I am no longer arguing in favor of my proposal,
Why not? Don't stop just because it met one objection.
> but out of curiosity:
>
> 1. can you give an example of a non-self-insert buffer where
> any of the special-mode-map bindings are not appropriate?
Don't have to. Can you show that no such buffer can exist?
But yes - Dired. Perhaps you recall this thread that you started?
http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00015.html
See also: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12311.
Some keys in s-m-map, past, current, or future, might not necessarily be
appropriate for some particular non-self-insert buffer.
In the case of that thread, the argument was over whether `z' was appropriate.
It is irrelevant to the current discussion whether it is still part of s-m-map
or whether Dired uses s-m-map.
Dired mode (not Wdired) has a non-self-insert buffer, and s-m-map is not
appropriate for it (see the second URL above).
The point is that there is no necessary dependence of non-self-insert buffers
upon s-m-map.
In this case, BTW, the doc string is no help. The s-m-map doc string just punts
to "special mode", and that just punts nowhere (not good).
A user needs to consult (elisp) `Basic Major Modes' to find out anything of
substance about what a "special mode" is.
It is a mode whose buffer text is "produced specially by Emacs, rather than
directly from a file". That's pretty broad. The explanation adds that the
buffer is set by `special-mode' to read-only (which is different from
non-self-insertion, BTW).
Whether all read-only or (your question) all non-self-insertion buffers must or
should also be special could be debated.
I would argue no. For one thing, the criterion of being "produced specially by
Emacs, rather than directly from a file" is important. But though necessary,
neither criterion is sufficient to _require_ special mode. You can use special
mode for such a buffer, but nothing requires you to.
> 2. can you give an example of a button-buffer-map usage in a
> self-insert buffer?
Ditto.
Things should not be coupled unless they need to be. Occam.
Stating this is not an expression of vehemence.
> PS. my practical rationale was that I bound a key in special-mode-map
> and was surprised that the binding was not present in *Buffer List*.
That's easily remedied, no?