unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: John Chandler <chandler@cfa.harvard.edu>
To: 16181@debbugs.gnu.org
Subject: bug#16181: 23.1; losing track of point
Date: Tue, 17 Dec 2013 20:36:30 -0500	[thread overview]
Message-ID: <201312180136.rBI1aUj9050387@cfa0.cfa.harvard.edu> (raw)

emacs-version:
GNU Emacs 23.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.18.9) of 2013-07-17 on c6b10.bsys.dev.centos.org

installed as part of CentOS 6.5

When a macro performs some editing tasks and then moves "point"
forward using a (forward-line 1) at a time when the current line wraps
and extends outside the viewing window, emacs often loses track of
"point" and leaves it somewhere near the middle of the viewing window.
The same macro invocation will work properly if the entire current
line is visible in the window when the editing tasks are done, even if
the beginning of the next line is outside the window.  But it will
fail if the editing tasks performed by the macro cause the line to
wrap outside the window before the final (forward-line 1).  This
behavior does not depend on the setting of line-move-visual.  The
following macro is a short example:

(defun ttt() "add tag from start" (interactive)
  (save-excursion
    (goto-char 0)
    (copy-to-register 26 (point) (progn (forward-word 1)(point)) t))
  (insert-register 26)
  (forward-line 1))

The file to be edited using this macro should begin with a line
containing a list of words to be inserted in front of a succession of
lines in the file.  If the lines in the file generally wrap,
especially if they wrap multiple times each, the successive
application of the macro should quickly trigger the bug.



In GNU Emacs 23.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.18.9)
 of 2013-07-17 on c6b10.bsys.dev.centos.org
configured using `configure  '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
 --param=ssp-buffer-size=4 -m64 -mtune=generic''

Important settings:
  value of $LC_ALL: en_US
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: ascii8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: iso-latin-1-unix
  default-enable-multibyte-characters: t

Major mode: Apropos

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
c a t e SPC / / ; C-x C-s ESC O A C-a C-s C-w C-s C-g 
ESC O B ESC O B ESC O B ESC [ 5 ~ ESC O A ESC O A ESC 
O A ESC O B ESC O B C-s C-w C-s ESC O A C-a C-x 2 C-x 
C-f r b DEL b . x RET C-s c h e k DEL c k ESC O C C-s 
a C-g C-s SPC a g C-x 0 C-s C-w C-r C-r C-g ESC O B 
ESC O B ESC O A ESC O A C-s C-w C-s C-s C-g C-g C-r 
C-r ESC O B ESC O B ESC O B C-a ESC b C-s C-w C-r C-r 
C-e C-r d . ESC f ESC f SPC S e p SPC 2 3 SPC a e : 
8 7 SPC i n : S h e r b o r n , SPC M A SPC * S C D 
SPC P DEL p : 4 6 8 - 2 0 C-r SPC i RET . 7 . 2 ESC 
f ESC f ESC f SPC b y : d y s e n t e r y C-u ESC d 
C-y C-e ESC b ESC f C-y C-a C-s C-w C-s ESC O B ESC 
O B ESC [ 5 ~ ESC O A ESC O A ESC O A ESC O B ESC O 
B ESC O A C-a C-s C-w C-r C-r C-r C-g ESC [ 1 8 ~ ESC 
[ 1 8 ~ C-h a b u g s RET C-h a b u g RET ESC [ 1 8 
~ ESC [ 6 ~ ESC [ 6 ~ ESC x r e p o TAB r TAB RET

Recent messages:
Mark saved where search started
Quit [2 times]
Mark saved where search started [4 times]
Mark set [2 times]
Auto-saving...
Mark saved where search started
Quit
No apropos matches for `bugs'
Type C-x 4 C-o RET to restore the other window.  
Making completion list...





             reply	other threads:[~2013-12-18  1:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18  1:36 John Chandler [this message]
2014-02-26 20:31 ` bug#16181: 23.1; losing track of point - partial workaround Chandler, John
2021-05-30  5:26 ` bug#16181: 23.1; losing track of point Lars Ingebrigtsen
2021-05-30 19:23   ` Chandler, John
2021-05-31  5:44     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=201312180136.rBI1aUj9050387@cfa0.cfa.harvard.edu \
    --to=chandler@cfa.harvard.edu \
    --cc=16181@debbugs.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).