From: Shingo Tanaka <shingo.fg8@gmail.com>
To: 49695@debbugs.gnu.org
Subject: bug#49695: 27.2; wrap-prefix text property doesn't work with display property
Date: Thu, 22 Jul 2021 21:51:23 +0900 [thread overview]
Message-ID: <84im12o6k4.wl-shingo.fg8@gmail.com> (raw)
Hi,
wrap-prefix text property doesn't work properly when a character with display
property is in the beginning of a line. Here is how to reproduce.
1. Goto *scratch* buffer
2. Evaluate below preconditioning function.
(defun preconditioning ()
(interactive)
(goto-char (point-min))
(insert "This is a sample text.\n")
(forward-line -1)
(put-text-property (line-beginning-position) (line-end-position)
'wrap-prefix " ")
(search-forward "This is a ")
(put-text-property (point) (1+ (point)) 'display "X")
(goto-char (point-min)))
3. Execute it with M-x preconditioning
4. Confirm the text "This is a sample text." is inserted in the beginning of
the buffer and your cursor is as well. Note that this text has wrap-prefix
property and "X" is the character which has display property.
5. Start typing spaces (or any character) and observe how the text is wrapped.
6. You will see wrap-prefix works correctly until wrapped point gets "X" like:
This is a Xample
text.
7. However, you will see it doesn't work when "X" gets in the beginning of the
line like:
This is a
Xample text.
This issue is reproducible either word-wrap is nil or t, and also with Emacs
28.0.50.
Regards,
Shingo
next reply other threads:[~2021-07-22 12:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 12:51 Shingo Tanaka [this message]
2021-07-22 18:26 ` bug#49695: 27.2; wrap-prefix text property doesn't work with display property Eli Zaretskii
2022-08-21 18:09 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84im12o6k4.wl-shingo.fg8@gmail.com \
--to=shingo.fg8@gmail.com \
--cc=49695@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 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.