all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Undo
@ 2003-09-26 18:01 bhiker
  2003-09-26 19:50 ` Undo Orm Finnendahl
  2003-09-27 17:13 ` Undo bhiker
  0 siblings, 2 replies; 5+ messages in thread
From: bhiker @ 2003-09-26 18:01 UTC (permalink / raw)


Sorry for this newbie's question about undo.

I do not succeed to undo characters with emacs 21.3 under console.

Here is what I get:

* Under X, it may work:
C-_ is binded to the undo function (as returned by C-h c C-_) and works fine.
Besides it, at first try, M-x undo removes one character.
This character will appear again with the following M-x undo.

* Under a console text-based environment: 
C-_ is binded to DEL 

M-x undo behaves like under X: one character is deleted at the first try and 
will appear again at the second try.

So, how may I bind C-_ to the undo function for the console environment?
Thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Undo
       [not found] <mailman.768.1064599396.21628.help-gnu-emacs@gnu.org>
@ 2003-09-26 18:38 ` John Russell
  2003-09-26 19:11 ` Undo Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: John Russell @ 2003-09-26 18:38 UTC (permalink / raw)


bhiker@free.fr writes:

> Sorry for this newbie's question about undo.
> 
> I do not succeed to undo characters with emacs 21.3 under console.
> 
> Here is what I get:
> 
> * Under X, it may work:
> C-_ is binded to the undo function (as returned by C-h c C-_) and works fine.
> Besides it, at first try, M-x undo removes one character.
> This character will appear again with the following M-x undo.
> 
> * Under a console text-based environment: 
> C-_ is binded to DEL 
> 
> M-x undo behaves like under X: one character is deleted at the first try and 
> will appear again at the second try.
> 
> So, how may I bind C-_ to the undo function for the console environment?
> Thanks!


I would love to answer your question, but so many other things you
said  baffled me that I don't think I can.  When I do C-_ on emacs
21.3.1 I get many many many levels of undo. It keeps going back
seemingly forever.  This also works in the console with no
modifications whatsoever.  

The problem is, I'm not even sure what a person could do if the wanted
to do what you are describing.  Do you have something strange in your
.emacs file?

John

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Undo
       [not found] <mailman.768.1064599396.21628.help-gnu-emacs@gnu.org>
  2003-09-26 18:38 ` Undo John Russell
@ 2003-09-26 19:11 ` Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2003-09-26 19:11 UTC (permalink / raw)


> C-_ is binded to DEL 

Try C-x u
or C-/

C-_ is a convenient binding but not all text terminals accept this
key combo (they won't beep at you, but they might send some other
code to Emacs, such as DEL in your case).
C-x u is the safest binding, but it's not too convenient, so you
can try C-/ as well.

In case C-/ doesn't work either, then choose a binding you like
and put (global-set-key <thebindingIlike> 'undo) in your .emacs.

If C-x u doesn't work either, then there's something really wrong
with your Emacs setup.


        Stefan


PS: M-x undo does not do quite what you want, indeed.  You might want
    to report it as a bug, but I'm not sure it'll be treated as such.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Undo
  2003-09-26 18:01 Undo bhiker
@ 2003-09-26 19:50 ` Orm Finnendahl
  2003-09-27 17:13 ` Undo bhiker
  1 sibling, 0 replies; 5+ messages in thread
From: Orm Finnendahl @ 2003-09-26 19:50 UTC (permalink / raw)


Am 26. September 2003, 20:01 Uhr (+0200) schrieb bhiker@free.fr:
>
> So, how may I bind C-_ to the undo function for the console environment?

xmodpmap is probably what your looking for. It defines, which keys on
your keyboard are mapped to which code (globally and *before* emacs
sees them). There should be some example xmodmaps for different
keyboards and languages either in the distro or already on your
computer. Try "locate xmodmap", then copy the xmodmap which is closest
to your keyboard into your homedirectory. If you have xmodmap
installed, execute "xmodmap <filename>" and check the result. Adjust
according to your needs. The fileformat is quite straightforward and
there are gui programs and lots of howtos in the net.

--
Orm

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Undo
  2003-09-26 18:01 Undo bhiker
  2003-09-26 19:50 ` Undo Orm Finnendahl
@ 2003-09-27 17:13 ` bhiker
  1 sibling, 0 replies; 5+ messages in thread
From: bhiker @ 2003-09-27 17:13 UTC (permalink / raw)


Thanks for your answers.
using C-x u, undo works in the text-based environment (emacs 21.3). 

By default, 20 characters are restored. 
'C-h f undo' doesn't mention any variable to change this default behavior. 

Is there a variable to just restore one character?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-09-27 17:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.768.1064599396.21628.help-gnu-emacs@gnu.org>
2003-09-26 18:38 ` Undo John Russell
2003-09-26 19:11 ` Undo Stefan Monnier
2003-09-26 18:01 Undo bhiker
2003-09-26 19:50 ` Undo Orm Finnendahl
2003-09-27 17:13 ` Undo bhiker

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.