home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / emacs / help / 5319 < prev    next >
Encoding:
Text File  |  1993-01-11  |  3.8 KB  |  84 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!spool.mu.edu!agate!linus!linus.mitre.org!blackbird!dsg
  3. From: dsg@blackbird.mitre.org (David S. Goldberg)
  4. Subject: Re: IMPOSSIBLE hacks?  or just very hard to do?
  5. In-Reply-To: kpc@pluto.arc.nasa.gov's message of Sat, 9 Jan 1993 17:53:28 GMT
  6. Message-ID: <DSG.93Jan11105310@blackbird.mitre.org>
  7. Sender: news@linus.mitre.org (News Service)
  8. Nntp-Posting-Host: blackbird.mitre.org
  9. Organization: The Mitre Corp., Bedford, MA.
  10. References: <KPC.93Jan9095536@zog.arc.nasa.gov>
  11. Date: Mon, 11 Jan 1993 15:53:10 GMT
  12. Lines: 70
  13.  
  14.  
  15. >>>>> In article <KPC.93Jan9095536@zog.arc.nasa.gov>,
  16. >>>>> kpc@pluto.arc.nasa.gov (k p c) writes:
  17.  
  18. k> here are some hacks that i've thought of as MUCH too hard (in elisp
  19. k> anyway).  but i'd love to have them!  are they even possible?
  20.  
  21. k> 1.  sticky shift and control keys.
  22.  
  23. k> you know how you can use ESC instead of a meta key?  i'd LOVE to use a
  24. k> key (maybe ESC ESC) to do the same for a control key.  ESC ESC f would
  25. k> then be forward-word.  and ideally ESC ESC ESC f would be
  26. k> forward-sexp.  transparently.
  27.  
  28. k> this is nice for people with CTS and other RSI problems.  (i think
  29. k> xmodmap might work but i want emacs to do it so that terminals can do
  30. k> it also.)  (i'd put eval-expression somewhere else to be able to do
  31. k> ESC ESC.)  (pc-write can do stickiness.)
  32.  
  33. I suppose you could do this (albeit with difficulty) using alot of sub
  34. keymaps, but it would make it alot harder for people to remap their
  35. key bindings.  You probably couldn't do it in such a way that
  36. remapping "\C-f" would also remap "\e\e\e\ef" or whatever
  37. automatically.
  38.  
  39. This is really a hardware issue.  What's needed is a way to make the
  40. terminal generate a control key or a shifted key after pressing a
  41. sticky key.  In fact, this issue came up just a couple of weeks ago in
  42. comp.unix.misc (or maybe it was questions, I forget).  I remember one
  43. of the responses referencing special keyboards that do just this.
  44.  
  45. Doing it in software, with the exception of the terminal driver,
  46. limits the change to that piece of software.  But by modifying the
  47. terminal driver, you force the change on everyone on the system.
  48. Maybe that's OK in your environment, but maybe it's not.  The ESC for
  49. Meta hack is great because alot of terminals don't have a Meta key and
  50. so it's convenient to sort of equate an ESC prefix with the Meta key.
  51. But they aren't exactly the same - if you build epoch with the
  52. EIGHTBIT_KEYBOARD defined, you lose key definitions defined as "M-",
  53. but using "\e" as a prefix works fine.  I don't know (and have no way
  54. of checking) if that is only an epoch issue, though.
  55.  
  56. k> 2.  word motion and word deletion to treat punctuation in a special way.
  57.  
  58. k> in the last paragraph there is the string "control key.  ESC ESC".
  59. k> i'd LOVE to have forward-word (M-f) and kill-word (M-d) and their
  60. k> backward equivalents think of sets of punctuation as just different
  61. k> kinds of words.  so i'd be able to do this (' indicates point):
  62.  
  63. It's been a long time since I played with syntax tables, but I believe
  64. you can set one up to do just what you want.  If nothing else, that's
  65. the place to start looking.
  66.  
  67. k> 3.  mode line functions.
  68.  
  69. k> i'd like to be able to do arbitrary things to the mode line on
  70. k> redisplay.  like printing the value of the variable major-mode after
  71. k> deleting the substring "-mode".  and like putting the
  72. k> file-name-nondirectory of the default directory right-justified after
  73. k> the %- string, if there is enough space.
  74.  
  75. Couldn't you just write a wrapper around redisplay that calls your
  76. arbitrary functions in a hook?  I don't see any redisplay-screen-hook
  77. in the docs, but maybe it exists.
  78.  
  79. --
  80. Dave Goldberg                      UNIX Systems Programmer/Administrator
  81. Post: The Mitre Corporation MS B020 202 Burlington Rd. Bedford, MA 01730
  82. Phone: 617-271-2460
  83. Domain: dsg@mbunix.mitre.org  UUCP: {your neighborhood}!linus!mbunix!dsg 
  84.