* Undo'ing cursor movement keys
@ 2006-09-07 17:17 Bob
2006-09-07 17:55 ` Dynamic expansion in html-mode Ewen Cartwright
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Bob @ 2006-09-07 17:17 UTC (permalink / raw)
Coming from the Windows world, one of the items that I became highly
accustomed to with my editor, Codewright, was that you could UNDO
printable characters as well as the cursor positioning/movement keys.
Is there any equivalent for emacs? Can anyone point me to where/how to
accomplish this?
For example, in codewright if I were at the top of the screen pressed
'a', right arrow, 'b', right arrow, 'c', then page down, page down. I
would move down 2 pages worth of text. If I then did undo once, I
would undo the page down, undo'ing a second time would undo the page
down, a 3rd undo undoes the 'c', 4th undoes the right arrow key press,
Another undo undoes the 'b', the next undo undoes the right arrow, and
the last undoes the 'a'. The important thing is that the the cursor
movement keys were also pushed onto the undo stack. This is what I
want to do in emacs.
Thanks
Bob
^ permalink raw reply [flat|nested] 9+ messages in thread
* Dynamic expansion in html-mode
2006-09-07 17:17 Undo'ing cursor movement keys Bob
@ 2006-09-07 17:55 ` Ewen Cartwright
2006-09-07 18:36 ` Undo'ing cursor movement keys Drew Adams
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Ewen Cartwright @ 2006-09-07 17:55 UTC (permalink / raw)
Hi there,
I'm using html-mode to edit ColdFusion files in Emacs 22.0.50.1 on
win32. Previously, in Emacs 21, dynamic expansion would allow me to
expand names like 'whatever' if, for instance, 'form.whatever' was
defined in a buffer. Likewise, if the cursor was positioned over the
'whatever' in 'form.whatever', then M-. would default to the tag name
'whatever'.
However, Emacs 22 will only recognize 'form.whatever' as an expansion,
and will pick up 'form.whatever' as the tag name to find. I'd far rather
have the Emacs 21 behaviour for these operations, and I'm guessing that
somewhere in sgml-mode or html-mode I need to tell emacs that '.' is a
word separator in order to achieve this. Could anyone point me in the
right direction?
Thanks in advance,
/ewen
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Undo'ing cursor movement keys
2006-09-07 17:17 Undo'ing cursor movement keys Bob
2006-09-07 17:55 ` Dynamic expansion in html-mode Ewen Cartwright
@ 2006-09-07 18:36 ` Drew Adams
2006-09-07 21:07 ` Colin S. Miller
2006-09-08 14:25 ` Eric Eide
3 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2006-09-07 18:36 UTC (permalink / raw)
The important thing is that the the cursor
movement keys were also pushed onto the undo stack. This is what I
want to do in emacs.
I don't have an answer for your request. But you might find it helpful to
use a prefix arg (`C-u') with `C-SPC'. That will jump to the mark position
and pop the mark ring. In effect, repeating it lets you go back to previous
mark positions. See `C-h f set-mark-command'.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Undo'ing cursor movement keys
2006-09-07 17:17 Undo'ing cursor movement keys Bob
2006-09-07 17:55 ` Dynamic expansion in html-mode Ewen Cartwright
2006-09-07 18:36 ` Undo'ing cursor movement keys Drew Adams
@ 2006-09-07 21:07 ` Colin S. Miller
2006-09-08 14:25 ` Eric Eide
3 siblings, 0 replies; 9+ messages in thread
From: Colin S. Miller @ 2006-09-07 21:07 UTC (permalink / raw)
Bob wrote:
> Coming from the Windows world, one of the items that I became highly
> accustomed to with my editor, Codewright, was that you could UNDO
> printable characters as well as the cursor positioning/movement keys.
>
> Is there any equivalent for emacs? Can anyone point me to where/how to
> accomplish this?
>
> For example, in codewright if I were at the top of the screen pressed
> 'a', right arrow, 'b', right arrow, 'c', then page down, page down. I
> would move down 2 pages worth of text. If I then did undo once, I
> would undo the page down, undo'ing a second time would undo the page
> down, a 3rd undo undoes the 'c', 4th undoes the right arrow key press,
> Another undo undoes the 'b', the next undo undoes the right arrow, and
> the last undoes the 'a'. The important thing is that the the cursor
> movement keys were also pushed onto the undo stack. This is what I
> want to do in emacs.
>
> Thanks
> Bob
>
In the O'Reilly book, "Writing GNU EMACs Extensions", by Bob Glickstein,
ISBN 1565922611,
there is, IIRC, a minor mode to do this.
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Undo'ing cursor movement keys
2006-09-07 17:17 Undo'ing cursor movement keys Bob
` (2 preceding siblings ...)
2006-09-07 21:07 ` Colin S. Miller
@ 2006-09-08 14:25 ` Eric Eide
2006-09-08 19:41 ` Dave Benjamin
2006-09-09 12:33 ` David Hansen
3 siblings, 2 replies; 9+ messages in thread
From: Eric Eide @ 2006-09-08 14:25 UTC (permalink / raw)
"Bob" == Bob <junkmail71@gmail.com> writes:
Bob> Coming from the Windows world, one of the items that I became
Bob> highly accustomed to with my editor, Codewright, was that you
Bob> could UNDO printable characters as well as the cursor
Bob> positioning/movement keys.
Bob>
Bob> Is there any equivalent for emacs? Can anyone point me to
Bob> where/how to accomplish this?
I don't know to accomplish exactly what you want, but I will give you two
pointers that you might find useful:
+ The `scroll-in-place' Emacs add-on package makes scrolling commends
"effectively" undoable, in the sense that PageDown+PageUp will always
bring the cursor back to its starting location. Get this package from:
http://www.cs.utah.edu/~eeide/emacs/scroll-in-place.el.gz
The variable `scroll-preserve-screen-position', which is built into GNU
Emacs, has a similar effect.
+ Often, you can get back to where you want to be by "popping the mark ring."
The key binding for this is C-u C-SPC. Read the online GNU Emacs manual
for more information about "marks" and the mark ring.
Good luck! ---
Eric.
--
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu> . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Undo'ing cursor movement keys
2006-09-08 14:25 ` Eric Eide
@ 2006-09-08 19:41 ` Dave Benjamin
2006-09-09 12:33 ` David Hansen
1 sibling, 0 replies; 9+ messages in thread
From: Dave Benjamin @ 2006-09-08 19:41 UTC (permalink / raw)
On Fri, 8 Sep 2006, Eric Eide wrote:
> + Often, you can get back to where you want to be by "popping the mark
> ring." The key binding for this is C-u C-SPC. Read the online GNU
> Emacs manual for more information about "marks" and the mark ring.
In a similar vein, I use a library called goto-chg.el that defines a
goto-last-change function. I have this function bound to M-_, which nicely
parallels C-_ for undo. It's especially handy on my laptop, where the
touchpad sometimes sends me off to la-la-land when I accidentally brush
against it with my palm.
http://www.cs.virginia.edu/~wh5a/personal/Emacs/goto-chg.el
Another implementation of this function by a different person is here
(I have not tried this one myself, but it looks pretty similar):
http://www.emacswiki.org/cgi-bin/wiki/goto-last-change.el
Dave
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Undo'ing cursor movement keys
2006-09-08 14:25 ` Eric Eide
2006-09-08 19:41 ` Dave Benjamin
@ 2006-09-09 12:33 ` David Hansen
2006-09-09 20:45 ` Kaloian Doganov
1 sibling, 1 reply; 9+ messages in thread
From: David Hansen @ 2006-09-09 12:33 UTC (permalink / raw)
On Fri, 08 Sep 2006 08:25:57 -0600 (MDT) Eric Eide wrote:
> The variable `scroll-preserve-screen-position', which is built into GNU
> Emacs, has a similar effect.
Hey, that's nice. Why isn't this the default? I was always
annoyed that scroll-up, scroll-down isn't a nop.
David
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Undo'ing cursor movement keys
2006-09-09 12:33 ` David Hansen
@ 2006-09-09 20:45 ` Kaloian Doganov
0 siblings, 0 replies; 9+ messages in thread
From: Kaloian Doganov @ 2006-09-09 20:45 UTC (permalink / raw)
David Hansen <david.hansen@gmx.net> writes:
Hey, that's nice. Why isn't this the default? I was always
annoyed that scroll-up, scroll-down isn't a nop.
May be because it will drive the user mad when she/he tries to use
Emacs on slow terminal, which is not an unusual case at all.
--
"Every non-free program has a lord, a master --
and if you use the program, he is your master." --RMS
___________________________________________________________
Ако не отговарям на писмата Ви: http://6lyokavitza.org/mail
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Dynamic expansion in html-mode
[not found] <mailman.6597.1157659250.9609.help-gnu-emacs@gnu.org>
@ 2006-09-13 10:54 ` Andreas Roehler
0 siblings, 0 replies; 9+ messages in thread
From: Andreas Roehler @ 2006-09-13 10:54 UTC (permalink / raw)
Ewen Cartwright wrote:
> Hi there,
>
> I'm using html-mode to edit ColdFusion files in Emacs 22.0.50.1
> on win32. Previously, in Emacs 21, dynamic expansion would
> allow me to expand names like 'whatever' if, for instance,
> 'form.whatever' was defined in a buffer. Likewise, if the
> cursor was positioned over the 'whatever' in 'form.whatever',
> then M-. would default to the tag name 'whatever'.
>
> However, Emacs 22 will only recognize 'form.whatever' as an
> expansion, and will pick up 'form.whatever' as the tag name to
> find. I'd far rather have the Emacs 21 behaviour for these
> operations, and I'm guessing that somewhere in sgml-mode or
> html-mode I need to tell emacs that '.' is a word separator in
> order to achieve this. Could anyone point me in the right
> direction?
>
> Thanks in advance,
>
> /ewen
Can't reproduce this with
GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2006-09-11
it behaves as you described first.
>From here it seems a matter of the win-port.
__
Andreas Roehler
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-09-13 10:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-07 17:17 Undo'ing cursor movement keys Bob
2006-09-07 17:55 ` Dynamic expansion in html-mode Ewen Cartwright
2006-09-07 18:36 ` Undo'ing cursor movement keys Drew Adams
2006-09-07 21:07 ` Colin S. Miller
2006-09-08 14:25 ` Eric Eide
2006-09-08 19:41 ` Dave Benjamin
2006-09-09 12:33 ` David Hansen
2006-09-09 20:45 ` Kaloian Doganov
[not found] <mailman.6597.1157659250.9609.help-gnu-emacs@gnu.org>
2006-09-13 10:54 ` Dynamic expansion in html-mode Andreas Roehler
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.