bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59841: 29.0.50; 'before-string' text property doesn't work


From: Akib Azmain Turja
Subject: bug#59841: 29.0.50; 'before-string' text property doesn't work
Date: Wed, 07 Dec 2022 21:38:53 +0600

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Akib Azmain Turja <akib@disroot.org>
>> Cc: 59841@debbugs.gnu.org
>> Date: Tue, 06 Dec 2022 10:34:24 +0600
>> 
>> >> Steps:  1. Open a clean fundamental mode buffer.
>> >>         2. (insert (propertize "foo" 'before-string "bar"))
>> >>         3. The buffer shows only "foo", but not "bar" before it.
>> >
>> > The code is incorrect: 'before-string' is an overlay property, not a text
>> > property.  So you need to define an overlay with a 'before-string' property
>> > whose value is a string, and put a 'display' property on that string.
>> >
>> 
>> If that code is incorrect, the 'Display Margins' node of Emacs Lisp
>> manual is also wrong.  On the fourth paragraph, it says, "put a
>> ‘before-string’ property on the text".
>
> When did you last read the text of that node? ;-)

Now.

--8<---------------cut here---------------start------------->8---
   To display something in the margin _in association with_ certain
buffer text, without altering or preventing the display of that text,
put a ‘before-string’ property on the text and put the margin display
specification on the contents of the before-string.
--8<---------------cut here---------------end--------------->8---

>
>> The manual should be clear.
>
> Yes, of course.
>
>
>

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]