all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* strange behaviour in keyboard macro
@ 2017-07-30  5:51 Héctor Lahoz
  2017-07-30  7:26 ` Emanuel Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Héctor Lahoz @ 2017-07-30  5:51 UTC (permalink / raw)
  To: help-gnu-emacs

I saved a keyboard macro like this:

<<search-forward>>	;; search-forward
Priority:		;; self-insert-command * 9
SPC			;; self-insert-command
required		;; self-insert-command * 8
RET			;; newline
<<backward-paragraph>>	;; backward-paragraph
C-n			;; next-line
<<search-forward>>	;; search-forward
:			;; self-insert-command
SPC			;; self-insert-command
RET			;; newline

When I execute it sometimes it does what I mean and the cursor ends on the right line.
But sometimes it ends (erroneously) on the following line. For example (I added numbers
for reference):

1: Package: mypkg
2: xxxxxxxxxxxxxx
3:  xxxxxxxxxxxxxx
4: Priority: normal
5: 
6: Package: mypkg2
7: xxxxxxxxxxxxxx
8: Priority: required

backward-paragraph should set the cursor at line 5 (blank line) so
cursor should end up at line 6.

At first it seemed random. Then I tried to find a pattern and found
out that it has something to do with text scrolling. When I repeat the
macro starting at a distant point (like half the window size) I manage
to get alternating results, that is, with one execution it ends at
line 6 and with the next execution (reseting the start position) it
ends at line 7.

Emacs version 24.4.1. Fundamental mode.
Is this a bug? I think with emacs 23 it worked fine.



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

end of thread, other threads:[~2017-08-09  6:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-30  5:51 strange behaviour in keyboard macro Héctor Lahoz
2017-07-30  7:26 ` Emanuel Berg
2017-07-30 10:01   ` Héctor Lahoz
2017-07-30 13:46     ` Emanuel Berg
2017-07-30 20:19       ` Marcin Borkowski
2017-07-30 21:47         ` Emanuel Berg
2017-07-31  4:40           ` Marcin Borkowski
2017-07-31  9:19             ` Emanuel Berg
2017-08-09  6:18               ` Stefan Huchler
2017-07-30 13:50     ` Emanuel Berg

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.