all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Héctor Lahoz" <hectorlahoz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: strange behaviour in keyboard macro
Date: Sun, 30 Jul 2017 07:51:06 +0200	[thread overview]
Message-ID: <20170730055106.GA2292@ordenador31> (raw)

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.



             reply	other threads:[~2017-07-30  5:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-30  5:51 Héctor Lahoz [this message]
2017-07-30  7:26 ` strange behaviour in keyboard macro 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170730055106.GA2292@ordenador31 \
    --to=hectorlahoz@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.