unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49695: 27.2; wrap-prefix text property doesn't work with display property
@ 2021-07-22 12:51 Shingo Tanaka
  2021-07-22 18:26 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Shingo Tanaka @ 2021-07-22 12:51 UTC (permalink / raw)
  To: 49695

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#49695: 27.2; wrap-prefix text property doesn't work with display property
  2021-07-22 12:51 bug#49695: 27.2; wrap-prefix text property doesn't work with display property Shingo Tanaka
@ 2021-07-22 18:26 ` Eli Zaretskii
  2022-08-21 18:09   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2021-07-22 18:26 UTC (permalink / raw)
  To: Shingo Tanaka; +Cc: 49695

> Date: Thu, 22 Jul 2021 21:51:23 +0900
> From: Shingo Tanaka <shingo.fg8@gmail.com>
> 
> 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.

Thanks, should be fixed now on the master branch.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#49695: 27.2; wrap-prefix text property doesn't work with display property
  2021-07-22 18:26 ` Eli Zaretskii
@ 2022-08-21 18:09   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-21 18:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 49695, Shingo Tanaka

Eli Zaretskii <eliz@gnu.org> writes:

> Thanks, should be fixed now on the master branch.

This was a year ago, but the bug report wasn't closed at the time, so
I'm doing that now.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-21 18:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 12:51 bug#49695: 27.2; wrap-prefix text property doesn't work with display property Shingo Tanaka
2021-07-22 18:26 ` Eli Zaretskii
2022-08-21 18:09   ` Lars Ingebrigtsen

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).