GNU bug report logs - #3020
23.0.92; `previous-line' sometimes fails with overlays

Previous Next

Package: emacs;

Reported by: Markus Triska <markus.triska <at> gmx.at>

Date: Thu, 16 Apr 2009 18:40:04 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3020 in the body.
You can then email your comments to 3020 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3020; Package emacs. (Thu, 16 Apr 2009 18:40:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Markus Triska <markus.triska <at> gmx.at>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 16 Apr 2009 18:40:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Markus Triska <markus.triska <at> gmx.at>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.92; `previous-line' sometimes fails with overlays
Date: Thu, 16 Apr 2009 20:34:23 +0200
When I evaluate the following form in "emacs -Q":

   (progn
     (switch-to-buffer (get-buffer-create "test"))
     (insert "the first line\na ")
     (let ((o (make-overlay (point) (point))))
       (overlay-put
        o 'after-string
        (propertize (concat "very very very very very very very very "
                            "very very very very very very very very "
                            "long line") 'face '(:background "cyan"))))
     (insert "\nand the last line")
     (previous-line))

and then press C-p, point unexpectedly fails to move. However, when I
then press C-a C-n C-p C-p, the second C-p works as expected.


In GNU Emacs 23.0.92.1 (i386-apple-darwin9.6.1, GTK+ Version 2.14.7)
 of 2009-04-16 on mt-imac.local
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3020; Package emacs. (Thu, 16 Apr 2009 22:55:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 16 Apr 2009 22:55:03 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Markus Triska <markus.triska <at> gmx.at>
Cc: 3020 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#3020: 23.0.92; `previous-line' sometimes fails with overlays
Date: Fri, 17 Apr 2009 00:49:22 +0200
On Thu, 16 Apr 2009 20:34:23 +0200 Markus Triska <markus.triska <at> gmx.at> wrote:

> When I evaluate the following form in "emacs -Q":
>
>    (progn
>      (switch-to-buffer (get-buffer-create "test"))
>      (insert "the first line\na ")
>      (let ((o (make-overlay (point) (point))))
>        (overlay-put
>         o 'after-string
>         (propertize (concat "very very very very very very very very "
>                             "very very very very very very very very "
>                             "long line") 'face '(:background "cyan"))))
>      (insert "\nand the last line")
>      (previous-line))
>
> and then press C-p, point unexpectedly fails to move. However, when I
> then press C-a C-n C-p C-p, the second C-p works as expected.

Here are some further observations:

- The first C-p does not fail when the propertized string is short
  enough so that when point is at the end of the string it is visually
  below but crucially before any initial segment of the string.  To see
  this with window-width of 85 (else adjust accordingly) replace the
  second string of the concat above by each of the following, evalling
  and trying C-p in between:
      "very very very very very very very "
      "very very very very very very very  "

- The first C-p does not fail when the propertized string is alone on
  the line it starts on, i.e., not preceded by another string on the
  same line.  To see this replace the first inserted string by each of
  the following, evalling and trying C-p in between:
      "the first line\n "
      "the first line\n"

- The condition under which the second C-p works is when point is at a
  lower column number than the column at which the propertized string
  begins.  For example, in the above the propertized string begins at
  column 2, and the second C-p works if point is at column 0 or column 1
  when the movement from below begins; if point is at column 2 or
  higher, the second C-p fails.

- The previous observation recalls a problem with the invisible text
  property I noted in the context of a different, but perhaps related,
  bug; see
  http://thread.gmane.org/gmane.emacs.pretest.bugs/2194/focus=83503

Steve Berman




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3020; Package emacs. (Thu, 16 Apr 2009 22:55:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 16 Apr 2009 22:55:04 GMT) Full text and rfc822 format available.

Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. (Sat, 25 Apr 2009 15:35:04 GMT) Full text and rfc822 format available.

Notification sent to Markus Triska <markus.triska <at> gmx.at>:
bug acknowledged by developer. (Sat, 25 Apr 2009 15:35:04 GMT) Full text and rfc822 format available.

Message #20 received at 3020-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Markus Triska <markus.triska <at> gmx.at>
Cc: 3020-done <at> debbugs.gnu.org,
        Stephen Berman <stephen.berman <at> gmx.net>
Subject: Re: 23.0.92; `previous-line' sometimes fails with overlays
Date: Sat, 25 Apr 2009 11:29:21 -0400
> point unexpectedly fails to move. However, when I then press C-a C-n
> C-p C-p, the second C-p works as expected.

I've checked in a fix.  Thanks for noticing the problem.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Sun, 24 May 2009 14:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 111 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.