Word-processor-like word wrap for emacs??
flag
Messages 1 - 10 of 705 - Collapse all
/groups/adfetch?adid=X_hT3xIAAAA0OzyUsI7Q1I22IaQYBd_Exyxpo7bMRVgpn9ZMKisPfQ
Word-processor-like word wrap for emacs??  
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
1.  Bill Richter  
View profile  
 More options Jan 1 1994, 3:39 pm
Newsgroups: comp.emacs, gnu.emacs.help
From: rich...@kepler.math.nwu.edu (Bill Richter)
Date: 01 Jan 1994 15:39:45 GMT
Local: Sat, Jan 1 1994 3:39 pm
Subject: Re: Word-processor-like word wrap for emacs??
In article <ANTONIO_DESIMONE.93Dec31195...@qpc1.ho.att.com> Antonio_DeSim...@hoserve.att.com (Tony DeSimone) replies to Per Abrahamsen <abra...@iesd.auc.dk>:
   In article <ABRAHAM.93Dec31094...@verdande.iesd.auc.dk> abra...@iesd.auc.dk (Per Abrahamsen) writes:

   Per> (add-hook 'post-command-hook
   Per>        (function (lambda ()
   Per>          (if (and (eolp)
   Per>                   (memq (preceding-char)
   Per>                         '(0 ?\n ?\t ? )))  
   Per>              ()
   Per>            (fill-paragraph nil)))))

   This isn't exactly what the ``popular word processors'' do---at least
   not MS Word, the only one I have the misfortune of having used.  The
   ``auto-fill'' in Word doesn't insert a newline the way emacs auto-fill
   does.  It's really just displaying long lines with breaks at word
   boundaries, without inserting characters in the buffer.  That would
   seem to be an interesting feature for emacs, for reading badly
   formatted text without changing it, for example.

I'm interested in this emacs lisp problem.  One thing to keep in mind
is the following advantage of emacs over common household editors:

I'm mostly typing TeX files, which look like

text
$$
display
$$
text

Somehow I got the idea that in PC editors that a "hard return" would
stay there.  That is, if I put the $$ on their own lines by typing a
carriage return, they would not get wrapped up into the previous text.

And yet in practice I always found that if I perturbed the text
enough, the $$ would get bumped up a line.  So I get pretty fed up,
and as a result I've never really minded the emacs way of having to
manually format the text myself.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2.  Tom Buskey  
View profile  
 More options Jan 10 1994, 7:01 pm
Newsgroups: comp.emacs, gnu.emacs.help
Followup-To: comp.emacs, gnu.emacs.help
From: t...@fluent.com (Tom Buskey)
Date: Mon, 10 Jan 1994 17:45:04 GMT
Local: Mon, Jan 10 1994 5:45 pm
Subject: Re: Word-processor-like word wrap for emacs??
Bill Richter (rich...@kepler.math.nwu.edu) wrote:

: In article <ANTONIO_DESIMONE.93Dec31195...@qpc1.ho.att.com> Antonio_DeSim...@hoserve.att.com (Tony DeSimone) replies to Per Abrahamsen <abra...@iesd.auc.dk>:
:    In article <ABRAHAM.93Dec31094...@verdande.iesd.auc.dk> abra...@iesd.auc.dk (Per Abrahamsen) writes:

:    Per> (add-hook 'post-command-hook
:    Per>      (function (lambda ()
:    Per>        (if (and (eolp)
:    Per>                 (memq (preceding-char)
:    Per>                       '(0 ?\n ?\t ? )))  
:    Per>            ()
:    Per>          (fill-paragraph nil)))))

How about M-x auto-fill-mode
Works in emacs 19 fine.

--
Tom Buskey Assistant Systems Administrator t...@fluent.com
Fluent Inc. 10 Cavendish Court Lebanon, NH 03766


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
3.  Lawrence R. Dodd  
View profile  
 More options Jan 12 1994, 9:01 pm
Newsgroups: comp.emacs, gnu.emacs.help
Followup-To: comp.emacs, gnu.emacs.help
From: d...@roebling.poly.edu (Lawrence R. Dodd)
Date: Wed, 12 Jan 1994 14:02:22 GMT
Local: Wed, Jan 12 1994 2:02 pm
Subject: Re: Word-processor-like word wrap for emacs??
::: "TB" == Tom Buskey <t...@fluent.com> writes:

  TB> Bill Richter (rich...@kepler.math.nwu.edu) wrote:

  TB> : In article <ANTONIO_DESIMONE.93Dec31195...@qpc1.ho.att.com>
  TB> Antonio_DeSim...@hoserve.att.com (Tony DeSimone) replies to Per
  TB> Abrahamsen <abra...@iesd.auc.dk>:

  TB> : In article <ABRAHAM.93Dec31094...@verdande.iesd.auc.dk>
  TB> abra...@iesd.auc.dk (Per Abrahamsen) writes:

  TB> :    Per> (add-hook 'post-command-hook
  TB> :    Per>     (function (lambda ()
  TB> :    Per>       (if (and (eolp)
  TB> :    Per>                (memq (preceding-char)
  TB> :    Per>                      '(0 ?\n ?\t ? )))  
  TB> :    Per>           ()
  TB> :    Per>         (fill-paragraph nil)))))

  TB> How about M-x auto-fill-mode
  TB> Works in emacs 19 fine.

You do need to toggle auto-file-mode but I think Per is right here.  The
original poster wanted the filling done dynamically.  While auto-fill-mode
does this as you type at the end of a paragraph, when adding material in the
middle of a paragraph it will not always fill (it depends on the location of
the point).  Typically the user has to hit M-q to fill (which I have adopted
as a nervous twitch :-).


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
4.  Daniel LaLiberte  
View profile  
 More options Jan 3 1994, 4:45 pm
Newsgroups: comp.emacs, gnu.emacs.help
From: libe...@cs.uiuc.edu (Daniel LaLiberte)
Date: Mon, 3 Jan 1994 16:40:41 GMT
Local: Mon, Jan 3 1994 4:40 pm
Subject: Re: Word-processor-like word wrap for emacs??

   From: Antonio_DeSim...@hoserve.att.com (Tony DeSimone)
   ...
   The ``auto-fill'' in Word doesn't insert a newline the way emacs auto-fill
   does.  It's really just displaying long lines with breaks at word
   boundaries, without inserting characters in the buffer.  ...

   While I'm sure it can be done, I don't see an easy way to do it...

It can't be done in Emacs Lisp (that I know of).  A post-command or
after-change hook can reformat text but there is no way to modify
Emacs' display of the text, other than: scrolling, line truncation,
selective-display, overlay-arrows, alternative display of control
characters, and character attributes.  The feature you want would have
to be supported at the C level by some additional display hook.  

This might be a reasonable feature to add to Emacs, especially given
proportional fonts and other features typical of word processors.  It
shouldn't be hard to add either since it is very similar to current
line wrapping.  But one would expect that next and previous line
commands would move between displayed lines rather than jump between
paragraphs.  Also, it might be nice to have a mode that displays
hidden things like newlines and tabs.

Dan LaLiberte
libe...@cs.uiuc.edu
(Fight interface copyrights and software patents.
 Join the League for Programming Freedom: l...@uunet.uu.net)


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
5.  Per Abrahamsen  
View profile  
 More options Jan 3 1994, 5:46 pm
Newsgroups: comp.emacs, gnu.emacs.help
From: abra...@iesd.auc.dk (Per Abrahamsen)
Date: 03 Jan 1994 17:22:38 GMT
Local: Mon, Jan 3 1994 5:22 pm
Subject: Re: Word-processor-like word wrap for emacs??

>>>>> "Daniel" == Daniel LaLiberte <libe...@cs.uiuc.edu> writes:

Daniel> This might be a reasonable feature to add to Emacs, especially given
Daniel> proportional fonts and other features typical of word processors.  It
Daniel> shouldn't be hard to add either since it is very similar to current
Daniel> line wrapping.  

Agreed, except that I do not think any change to the Emacs display
algorithm is easy...

Daniel> Also, it might be nice to have a mode that displays hidden
Daniel> things like newlines and tabs.

You can _almost_ do this with display tables, except that newline and
tab are hardcoded special cases, and ignore the entries in the display
table.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
6.  Bill Richter  
View profile  
 More options Jan 4 1994, 12:31 am
Newsgroups: comp.emacs, gnu.emacs.help
From: rich...@kepler.math.nwu.edu (Bill Richter)
Date: 03 Jan 1994 23:32:25 GMT
Local: Mon, Jan 3 1994 11:32 pm
Subject: Re: Word-processor-like word wrap for emacs??
In article <LIBERTE.94Jan3104...@ebony.cs.uiuc.edu> libe...@cs.uiuc.edu (Daniel LaLiberte) replies to Antonio_DeSim...@hoserve.att.com (Tony DeSimone)
      ...
      The ``auto-fill'' in Word doesn't insert a newline the way emacs auto-fill
      does.  It's really just displaying long lines with breaks at word
      boundaries, without inserting characters in the buffer.  ...

   It can't be done in Emacs Lisp (that I know of).  A post-command or
   after-change hook can reformat text but there is no way to modify
   Emacs' display of the text, other than: scrolling, line truncation,
   selective-display, overlay-arrows, alternative display of control
   characters, and character attributes.  

I think the MSDOG way of having these extremely long lines which
"look" like they are broken into nicely formatted lines is a Bad Idea.
The suntoys/openwindoze editor Textedit has the same problem.  In
particular long lines are bad for email or TeX files.  I think that's
always been one of the real advantages of emacs that something that
looks like a newline is one!

So I think that any automated word wrapping in emacs should actually
reformat the text.

Bill Richter

(Fight interface copyrights and software patents.
Join the League for Programming Freedom)


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
looking for font-lock suggestions for emacs 19.22  
1.  Benjamin Chigier  
View profile  
 More options Jan 2 1994, 1:52 am
Newsgroups: gnu.emacs.help
From: b...@speech.speech.COM (Benjamin Chigier)
Date: 1 Jan 1994 20:45:02 -0500
Local: Sun, Jan 2 1994 1:45 am
Subject: looking for font-lock suggestions for emacs 19.22
Anyone got any good-lookin emacs's that they would like to share?
I am in the process of switching from epoch to emacs 19.22 and was
wondering if anyone out there would be willing to share any of their
additions to the font-lock package? The font-lock package that comes
with emacs 19.22 does not seem to have as many examples and
suggestions as epoch.

fonts, colors and any other neat ideas welcome.

Is it possible to have multi-color mode lines, for different types of
info (i.e. time in one color, mode in another color etc)?

And whats the deal with the "<" character (It seems to be bound to
help or something)? Don't people use this char in emacs 19 (other than
for help)?

Thanks in advance,

Ben...


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2.  Ted Matsumura  
View profile  
 More options Jan 3 1994, 4:41 am
Newsgroups: gnu.emacs.help
From: t...@rahul.net (Ted Matsumura)
Date: 2 Jan 1994 23:41:14 -0500
Local: Mon, Jan 3 1994 4:41 am
Subject: Re: looking for font-lock suggestions for emacs 19.22
I'm looking for emacs and mule, along with x11r5 w/ contribs on cd-rom.
I've paid Unidirect $150 for 2 prime time disks, but only included x
patches, not the x11r5 or emacs as was promised, anyone know any reputable
vendors with x, gnu on cd?  Thanks.

Ted Matsumura

--
Ted Matsumura <t...@rahul.net>


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
3.  Rich Morin  
View profile  
 More options Jan 4 1994, 7:11 am
Newsgroups: gnu.emacs.help, comp.emacs
From: r...@cfcl.com (Rich Morin)
Date: 3 Jan 94 23:28:40 GMT
Local: Mon, Jan 3 1994 11:28 pm
Subject: Re: looking for font-lock suggestions for emacs 19.22

> From: tedm%mbpdo.u...@germany.eu.net (Ted Matsumura)
> ...
> I've paid Unidirect $150 for 2 prime time disks, but only included x
> patches, not the x11r5 or emacs as was promised, anyone know any reputable
> vendors with x, gnu on cd?  Thanks.

I have several problems with this posting:

  1)    Mr. Matsumura does not specify which Prime Time Freeware (PTF)
        product(s) he has.  We *did* leave the main release of X11 off
        Issue 2-1, in order to make room for other items.  This was
        documented in the booklet, and in our product literature.
        Issues 1-2 and 2-2, by the way, contained the complete release,
        as will Issue 3-1.

  2)    He also says "I've paid Unidirect $150 for 2 prime time disks".
        Well, PTF's list price has always been $60, and Issue 2-1, which
        he apparently has, contains two discs.  As far as I know,
        Unidirect sells PTF products at or under suggeested list price.

  3)    I can't imagine why Mr. Matsumura would be unable to find a copy
        of GNU Emacs on the disc.  It's stored in docprep/edit/emacs/gnu,
        and is listed in both the Package List and Index.

  4)    Mr. Matsumura has chosen to take his complaint public, and even
        to insinuate that Prime Time Freeware (PTF) is not a "reputable
        vendor" without giving us any chance to solve his problems first.

        This seems a bit hasty, to say the least.  We have sold several
        thousand copies of PTF products, and I think the vast majority
        of our customers are quite happy with our products and service.
        Had Mr. Matsumura sent email to PTF, as requested in the booklet,
        he might already have a solution.

Normally I would not reply publicly to a customer's complaint.  In this
case, however, the complaint was *made* publicly.  If Mr.  Matsumura will
contact me privately, I will see what can be done to help him out.

Rich Morin
r...@cfcl.com
Proprietor, PTF
--
Rich Morin, Canta Forda Computer Laboratory | Prime Time Freeware - quality
  UNIX consulting, training, and writing    | freeware at affordable prices
  P.O. Box 1488, Pacifica, CA, 94044, USA   |          p...@cfcl.com
r...@cfcl.com    +1 415-873-7841 (Voice/Fax) | +1 408-433-9662, -0727 (Fax)


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
flow control revisited  
1.  Jeff Morgenthaler  
View profile  
 More options Jan 2 1994, 6:10 am
Newsgroups: gnu.emacs.help
From: jpmor...@wisp4.physics.wisc.edu (Jeff Morgenthaler)
Date: 02 Jan 1994 06:06:36 GMT
Local: Sun, Jan 2 1994 6:06 am
Subject: flow control revisited
I have been working for about a year on flow control hobbled terminals
and have found that the package included with emacs-19[.22] is not
really sufficient for the serious flow-control hobbled terminal user.
In particular, it is essential to be able to turn flow-control on _and
off_ at will interactively.  I have developed a package that works
with both emacs-18 and 19 which includes this enhancement (among
others).  The package has been on the net and in the archives for well
over six months without a bug report.

I think it is about time that this is included in emacs-19, but I need
a little help getting it ready for submission to bug-gnu-emacs.

First of all, my idea for the name of the function is
"flow-control-fix," since it makes a lot of sence to type M-x
flow<ret> when you sit down at a flow-control hobbled terminal.  If
you use the flow-control-fix-for feature (formerly
enable-flow-control-on), things are sometimes turned on by mistake, so
it is nice to be able to turn things off conveniently.  However, I
can't figure out a clean way to fset the old names to the new names
(for compatability with old versions) that will autoload properly.
Any ideas?

Also, I'd really like to set things up so that no messages (like
"loading flow-ctrl") appear when flow-control-fix-for doesn't actually
do anything.  I don't think this is possible with autoload, which
means pre-loading flow-ctrl in loadup.el.  Is this worth it for people
(this also solves the first problem)?

Thanks for your input.

j

PS
Yeah Bucky!

;;; File:  flow-ctrl.el, v 4.0 (emacs 19 version) Sat Jan  1 23:45:43 CST 1994
;;;
;;;               -------   -------------   ---------------------
;;;               F l o w   C o n t r o l   A d j u s t m e n t s
;;;               -------   -------------   ---------------------
;;;
;;;
;;; Copyright (C) 1994 Jeff Morgenthaler
;;; Thanks to Kevin Gallagher for TERM-in-list and Joe Wells for
;;; encouragement to code everything right.  
;;;

;;; GNU Emacs is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY.  No author or distributor accepts
;;; RESPONSIBILITY TO anyone for the consequences of using it or for
;;; whether it serves any particular purpose or works at all, unless
;;; he says so in writing.  Refer to the GNU Emacs General Public
;;; License for full details.
;;;
;;;  Send bug reports and suggestions for improvement to Jeff Morgenthaler
;;;  (jpmor...@wisp4.physics.wisc.edu).
;;;
;;; Everyone is granted permission to copy, modify and redistribute
;;; GNU Emacs, but only under the conditions described in the GNU
;;; Emacs General Public License.  A copy of this license is supposed
;;; to have been given to you along with GNU Emacs so you can know
;;; your rights and responsibilities.  It should be in a file named
;;; COPYING.  Among other things, the Copyright notice and this notice
;;; must be preserved on all copies.
;;;

;;;; XON/XOFF flow control is a primitive user interface scheme
;;;; employed by most terminals, terminal servers, modems, and
;;;; operating systems.  XON/XOFF flow control allows the user,
;;;; terminal, modem, etc. to pause the data stream at any time for
;;;; whatever reason.  The standard flow control commands are C-s for
;;;; stop and C-q for "quontinue" (at least that's how I remember it).

;;;; Users of GNU emacs will recognize C-s and C-q as the commands
;;;; isearch-forward and quote-insert, and part of the commands
;;;; save-buffer and toggle-read-only.  It does not take very long to
;;;; recognize the usefulness of these bindings in emacs (and the
;;;; emacs model in general--mnemonic key bindings) over any
;;;; usefulness that XON/XOFF flow control had or will ever had.

;;;; Emacs does the best it can to turn XON/XOFF flow control off.
;;;; Unfortunately, due to poor planing on the part of the inventors
;;;; of XON/XOFF flow control, it is only possible to disable flow
;;;; control on the machine that is running emacs: there is no
;;;; standard sequence of characters that a remote terminal, modem,
;;;; operating system, etc. will interpret to mean "disable flow
;;;; control."

;;;; Thus, it is up to each user to make sure that XON/XOFF flow
;;;; control is disabled at all hardware between the user and the
;;;; machine running emacs.  Terminals usually have an item in their
;;;; setup menu for flow control or "hsk."  Modems using the Hayes
;;;; standard "at" commands should respond to at&k0.  Terminal or
;;;; modem servers will often have a command such as "set port flow
;;;; control disable" to be issued an the "local" prompt.  In VMS, you
;;;; can issue the command SET TERM/PASSALL.  In UNIX, you can try
;;;; "stty start u stop u," rlogin -8, or use telnet....

;;;; Unfortunately (and you probably wouldn't be reading this if this
;;;; wasn't the case for you) it is sometimes impossible or
;;;; inconvenient at the moment to disable flow control.  Emacs has
;;;; always had a solution for this: the C-\ and C-^ keys are not
;;;; bound to anything (unlike all the other control characters in
;;;; emacs).  Following the emacs model, these keys are fairly
;;;; mnemonic: C-\ (that is back-Slash) resembles / which is search in
;;;; more/vi/ed) and C-^ can clearly be associated with the ^ produced
;;;; by C-q C-w.  Also, emacs has a function (set-input-mode) which
;;;; allows the C-s and C-q characters to be passed to the machine on
;;;; which emacs is running in case the terminal, modem, server, etc.,
;;;; really can't handle the rate of data flow and has no other means
;;;; of flow control.

;;;; What has been missing up to now has been a decent wrapper for
;;;; these already existing features so that users can function in
;;;; emacs even when they are stuck on broken hardware without
;;;; becoming expert emacs code writers.  By "decent wrapper" I mean a
;;;; function that can be called interactively (with M-x) that is
;;;; sensibly named.  The function should not interfere with other
;;;; functions which remap the keys and it should toggle, cleaning up
;;;; completely after itself.  Variables for customizing the key
;;;; remappings and an auto-start feature should also be included.

;;;; flow-control-fix is such a function.

;;;; The variables C-s-replacement, C-q-replacement and
;;;; terminal-uses-flow-control-chars are available for customization
;;;; of flow-control-fix.  Here are some examples of how to set them
;;;; (you would put these in your .emacs file):

;;;; (setq C-s-replacement ?\C-t)
;;;; (flow-control-fix-for
;;;;   '("vt52" "vt100" "vt200"))

;;;; TERM-in-list, which is a useful functions for further user
;;;; customizations is also defined.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(provide 'flow-ctrl)

;; default C-s, C-q replacements
(defvar C-s-replacement ?\C-\\
  "*Ascii version of character to substitute for Control-S.  Example of
setting this variable: (setq C-s-replacement ?\\C-t).")

(defvar C-q-replacement ?\C-^
  "*Ascii version of character to substitute for Control-Q.  Example of
setting this variable: (setq C-q-replacement ?\\C-]).")

(defvar flow-control-fix-flag nil
  "Flag to indicate if flow control avoidance is in effect.")

;;;###autoload
(defun TERM-in-list (term-list)
  "Returns t if the current terminal \(TERM\) is in term-list.  Drops
everything in TERM past the first hyphen. Example of term-list:
  '\(""vt52"" ""vt100"" ""vt200""\)"
  (let ((term (getenv "TERM"))
        hyphend
        TERM-in-list)
    ;; Make sure TERM is set. Some people start emacs from their
    ;; .xinitrc or .xsession file, in which case TERM is not set
    (if term
        (progn
          ;; Strip off hyphen and what follows
          (while (setq hyphend (string-match "[-_][^-_]+$" term))
            (setq term (substring term 0 hyphend)))
          (let ((len (length term-list))
                (idx 0)
                (temp-term nil))
            (while (and (< idx len)
                        (not temp-term))
              (if (string-equal term
                                (nth idx term-list))
                  (progn
                    (setq TERM-in-list t)
                    (setq temp-term term))
                (setq idx (1+ idx)))))))
    TERM-in-list))

;;;###autoload
(defun flow-control-fix (arg)
  "Replaces C-s with C-s-replacement, C-q with C-q-replacement \(C-\\
and C-^ by default\) and tells emacs to pass C-s and C-q on to the
operating system.  Gets around XON/XOFF flow control.  This is a last
resort fix!  First try turning off flow control at your terminal \(with
the setup menu\), modem \(at&k0\), terminal server \(set port flow
control disable\), machine you are logging in through \(SET TERM/PASSALL
or rlogin -8\), etc.  Turns on with an argument of t or a positive
argument, off with an argument of nil or negative argument, and toggles
with no argument."

  (interactive
   (list
    (if current-prefix-arg
        ;; If an argument is specified, then turn on if non-negative else
        ;; turn off if negative.
        (>= (prefix-numeric-value current-prefix-arg) 0)
      ;; If no argument is specified, then toggle.
      'toggle)))

  (setq flow-control-fix-flag
        (if (eq arg 'toggle)
            (not flow-control-fix-flag)
         arg))
  ;; Thanks to the elisp prowess of jbw for the above sequence!

  (if flow-control-fix-flag
    ;; Tell emacs to pass C-s and C-q to OS and swap out C-s and C-q.
    (progn
      (set-input-mode nil t (nth 2 (current-input-mode)))
      ;; Swap C-s and C-s-replacement
      (keyboard-translate C-s-replacement ?\^s)
      (keyboard-translate ?\^s C-s-replacement)
      ;; Swap C-q and C-q-replacement
      (keyboard-translate C-q-replacement ?\^q)
      (keyboard-translate ?\^q C-q-replacement)
      (message (concat "XON/XOFF adjustment for "
                             (getenv "TERM")
                       ":  use "(single-key-description C-s-replacement)
                       " for C-s  and  use  "
                       (single-key-description C-q-replacement)
                       " for C-q."))
      (sleep-for 2) ; Give user a chance to see message.
      )
    ;; Tell emacs to not pass C-s and C-q to OS and reset keys.
    (progn
      (set-input-mode nil nil (nth 2 (current-input-mode)))
      ;; Restore C-s and
...

read more »


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google