[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: |
Tue, 06 Dec 2022 10:34:24 +0600 |
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Tue, 06 Dec 2022 00:30:52 +0600
>> From: Akib Azmain Turja via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> The 'Display Margins' node of Emacs Lisp manual says to put
>> 'before-string' on text to use the marginal area (is this the correct
>> term?) while not altering buffer text. But 'before-string' text
>> property doesn't work.
>>
>> 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".
The manual should be clear.
> And if you want the 'display' property to show text in the margin, you need
> also to use set-window-margins to setup the margin.
I know that.
--
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."
signature.asc
Description: PGP signature
- bug#59841: 29.0.50; 'before-string' text property doesn't work, Akib Azmain Turja, 2022/12/05
- bug#59841: 29.0.50; 'before-string' text property doesn't work, Eli Zaretskii, 2022/12/05
- bug#59841: 29.0.50; 'before-string' text property doesn't work,
Akib Azmain Turja <=
- bug#59841: 29.0.50; 'before-string' text property doesn't work, Eli Zaretskii, 2022/12/06
- bug#59841: 29.0.50; 'before-string' text property doesn't work, Akib Azmain Turja, 2022/12/07
- bug#59841: 29.0.50; 'before-string' text property doesn't work, Eli Zaretskii, 2022/12/07
- bug#59841: 29.0.50; 'before-string' text property doesn't work, Akib Azmain Turja, 2022/12/08
- bug#59841: 29.0.50; 'before-string' text property doesn't work, Stefan Kangas, 2022/12/12