From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 21468@debbugs.gnu.org
Subject: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0
Date: Sat, 10 Oct 2015 09:37:43 -0400 [thread overview]
Message-ID: <CAM-tV-8hE=95NVGr8KDA1MnQeRfbdVtPWghwq3Gd3AdkO4xRAw@mail.gmail.com> (raw)
In-Reply-To: <83fv1jtctc.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
On 10/10/15, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Fri, 9 Oct 2015 19:34:43 -0400
>> From: Noam Postavsky <npostavs@users.sourceforge.net>
>> - On a truncated line with the overlay, move-end-of-line skips to the
>> next line. (I tried to avoid this by only adding the stretched space
>> when it's going to be visible. But that just made things worse
>> (looping in the display engine))
>>
>> - When at the end of line, next-line goes to the end-of-line instead
>> of staying on the same column.
>
> Are these caused by the 'cursor' property, i.e. do not happen if that
> property is not used?
They're not caused by the 'cursor' property, although it makes the 2nd
case more visually surprising.
>
> In any case, I'd appreciate a short self-contained test case for each
> of these two issues, as I'm not sure I understand what's going on.
>
Using attached 21468-overlay.el
The 1st case:
emacs -Q -l 21468-overlay.el -f 21468-test-eol-skip
then hit C-e. Point lands at the end of line 19 instead of the end of
line 18 where it started.
The 2nd case
emacs -Q -l 21468-overlay.el -f 21468-test-eol-col-movement
then hit C-e C-n. Point lands at the end of line 8 instead of line 8,
column 33 which is what happens when there is no overlay.
[-- Attachment #2: 21468-overlay.el --]
[-- Type: application/octet-stream, Size: 1065 bytes --]
(defconst +file-name+ load-file-name)
(defun 21468-put-overlay-at-line (line)
(goto-line line)
(let ((ov (make-overlay (line-beginning-position) (line-end-position)))
(face (list :overline "red" :underline "green")))
(overlay-put ov 'face face)
(overlay-put ov 'after-string
(propertize "\s" 'face face
'display (list 'space :align-to
`(+ (,(window-body-width nil t))
,(window-hscroll)))
'cursor t))))
(defun 21468-test-eol-skip ()
(find-file +file-name+)
(setq truncate-lines t)
;; line 18 is truncated (assuming window width < 200)
(21468-put-overlay-at-line 18)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
)
(defun 21468-test-eol-col-movement ()
(find-file +file-name+)
(21468-put-overlay-at-line 7))
next prev parent reply other threads:[~2015-10-10 13:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-13 5:17 bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 Noam Postavsky
2015-09-13 10:30 ` Eli Zaretskii
2015-09-13 17:20 ` Noam Postavsky
2015-09-13 19:50 ` Eli Zaretskii
2015-09-13 20:22 ` Noam Postavsky
2015-09-14 6:17 ` Eli Zaretskii
2015-09-14 12:46 ` Noam Postavsky
2015-09-14 13:22 ` Stefan Monnier
2015-09-14 13:33 ` Eli Zaretskii
2015-09-14 13:55 ` Noam Postavsky
2015-09-14 15:14 ` Eli Zaretskii
2015-09-14 20:50 ` Noam Postavsky
2015-09-15 6:53 ` Eli Zaretskii
2015-10-01 20:43 ` Noam Postavsky
2015-10-02 10:01 ` Eli Zaretskii
2015-10-02 19:58 ` Noam Postavsky
2015-10-02 21:00 ` Eli Zaretskii
2015-10-09 23:34 ` Noam Postavsky
2015-10-10 7:14 ` Eli Zaretskii
2015-10-10 13:37 ` Noam Postavsky [this message]
2015-10-10 14:20 ` Eli Zaretskii
2015-10-10 16:51 ` Noam Postavsky
2015-10-10 17:09 ` Eli Zaretskii
2015-10-10 21:06 ` Noam Postavsky
2015-10-11 2:38 ` Eli Zaretskii
2015-10-10 17:03 ` Eli Zaretskii
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='CAM-tV-8hE=95NVGr8KDA1MnQeRfbdVtPWghwq3Gd3AdkO4xRAw@mail.gmail.com' \
--to=npostavs@users.sourceforge.net \
--cc=21468@debbugs.gnu.org \
--cc=eliz@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.