[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 28 Oct 2003 22:50:11 -0600 (CST)
Kevin Rodgers wrote:
How about `C-h .', with "dot" being a mnemonic for point?
(Meant is: as a keybinding for 'help-at-pt-print, instead of the
originally proposed C-h C-b.)
That might indeed be a better alternative.
Shouldn't they be named help-at-pt-next-region and
help-at-pt-previous-region, and bound to keys with the `C-h'
These are two questions. In as far as the keybinding is concerned,
then for motion commands that can get repeated several times in a row,
it usually is more convenient to have them executed with a single
keystroke. That usually means a modified <tab> or a modified arrow
key, but since tab is also used for completion and since everybody and
everything (including window managers) defining a motion or cycling
command, wants to use a modified <tab> or a modified arrow key for
exactly the same reasons I want to, it gets, of course, difficult to
find unused modifiers for them. We could actually use C-h <right> and
C-h <left> which seem to be undefined. (Here, C-f could not be used
as a synonym for <right> because C-h C-f runs `view-emacs-FAQ'). One
could then do C-x z z z... if one wants to scan a large piece of the
buffer this way.
The names for the commands derive from the fact that I have a second
file scan-buf.el in preparation. All functions and variables
currently in help-at-pt.el would stay there, except the variable
`scan-buf-move-hook', which would move to scan-buf.el. The
`help-echo' in the two commands would be replaced by a variable, whose
normal value is 'help-echo, so the commands would normally keep doing
what they do know, except that if one wanted to study some other text
property than 'help-echo, one could just temporarily reset the
variable. One will also be able to customize `scan-buf-move-hook' to
print information adapted to the text property one is studying. If
that is 'help-echo, it just prints what it prints now. There also
will be a command that highlights all regions with a non-nil value for
the property one is studying, so one can see where one will move to
and what the exact extent of the region one moved to is.
Using exclusively the machinery currently already in help-at-pt.el
will not require loading scan-buf.el.
I named everything that is really help-echo specific and is really
local, namely related to where point is right now with the prefix
`help-at-point', whereas I named everything that will work later for
arbitrary text properties and that can be used to scan the entire
buffer with the prefix `scan-buf'. These will also be the two Custom
groups. In as far as splitting functions over files is concerned, I
did this in such a way that people who would never use the more
general machinery would not need to load it anyway to be able to use
the more specialized one. Also, people only needing the specialized
functionality will not have their customization buffer cluttered with
the more sophisticated general stuff. Trying to reconcile different
concerns lead to some functions in `help-at-pt' being named with the
scan-buf prefix, named after scan-buf.el. I do not believe that this
is really bad, but, of course, I could easily do some renaming if
people would believe that this would be more appropriate.