Article View: gnu.emacs.help
Article #2116IMPOSSIBLE hacks? or just very hard to do?
From: k p c
Date: Sat, 09 Jan 1993 17:53
Date: Sat, 09 Jan 1993 17:53
81 lines
3437 bytes
3437 bytes
here are some hacks that i've thought of as MUCH too hard (in elisp
anyway). but i'd love to have them! are they even possible?
here's all 4:
1. sticky shift and control keys.
2. word motion and word deletion to treat punctuation in a special way.
3. mode line functions.
4. counts and paren negation in regular expressions.
1.
you know how you can use ESC instead of a meta key? i'd LOVE to use a
key (maybe ESC ESC) to do the same for a control key. ESC ESC f would
then be forward-word. and ideally ESC ESC ESC f would be
forward-sexp. transparently.
this is nice for people with CTS and other RSI problems. (i think
xmodmap might work but i want emacs to do it so that terminals can do
it also.) (i'd put eval-expression somewhere else to be able to do
ESC ESC.) (pc-write can do stickiness.)
2.
in the last paragraph there is the string "control key. ESC ESC".
i'd LOVE to have forward-word (M-f) and kill-word (M-d) and their
backward equivalents think of sets of punctuation as just different
kinds of words. so i'd be able to do this (' indicates point):
(text) (motion)
' control key. ESC ESC M-f
'control key. ESC ESC M-f
control 'key. ESC ESC M-f
control key'. ESC ESC M-f
control key. 'ESC ESC M-f
control key. ESC 'ESC M-f
control key. ESC ESC' M-f
control key. ESC 'ESC M-b
control key. 'ESC ESC M-b
control key'. ESC ESC M-b
control 'key. ESC ESC
(text) (deletion)
' control key. ESC ESC M-d
'control key. ESC ESC C-a TAB
'control key. ESC ESC M-f
control 'key. ESC ESC M-d
control '. ESC ESC M-d
control 'ESC ESC M-d
control 'ESC M-d
control ' M-TAB
' M-TAB
(point at end of previous line, having deleted TAB and newline)
3.
i'd like to be able to do arbitrary things to the mode line on
redisplay. like printing the value of the variable major-mode after
deleting the substring "-mode". and like putting the
file-name-nondirectory of the default directory right-justified after
the %- string, if there is enough space.
4.
i'd like to be able to do things with parenthesized groupings in a
regexp. like saying "\\(^redisplay.*\\) like" to a reverse regexp
search from here to have it skip over the second line in the above
paragraph. also i'd like to be able to use ? and * and + the way
they work on characters. finally, i'd like to be able to say
"\\(redisplay\\){2,4}" so that 2 to 4 occurrences are to be matched.
(p.s. why do (, ), and | have to be quoted with \, but *, ?, and .
not so?)
are these impossible? thanks for ALL answers, comments, fixes, code,
and ideas! email is preferred. these hacks (if they are possible)
would make emacs a MUCH more enjoyable experience!
--
i'm open to comparing research career notes with other cogsci/cogneuro people.
Technical Details
Message-ID:
<KPC.93Jan9095536@zog.arc.nasa.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!kronos.arc.nasa.gov!pluto.arc.nasa.gov!kpcShow Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.help Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!kronos.arc.nasa.gov!pluto.arc.nasa.gov!kpc From: kpc@pluto.arc.nasa.gov (k p c) Subject: IMPOSSIBLE hacks? or just very hard to do? Message-ID: <KPC.93Jan9095536@zog.arc.nasa.gov> Originator: kpc@zog.arc.nasa.gov Lines: 79 Sender: usenet@kronos.arc.nasa.gov (Will Edgington, wedgingt@ptolemy.arc.nasa.gov) Nntp-Posting-Host: zog.arc.nasa.gov Reply-To: kpc@ptolemy.arc.nasa.gov Organization: NASA Ames Research Center AI Research and Aero Branches; Sterling. Date: Sat, 9 Jan 1993 17:53:28 GMT