all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Akib Azmain Turja via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 59841@debbugs.gnu.org
Subject: bug#59841: 29.0.50; 'before-string' text property doesn't work
Date: Tue, 06 Dec 2022 10:34:24 +0600	[thread overview]
Message-ID: <87bkohxi9b.fsf@disroot.org> (raw)
In-Reply-To: <834ju98wp5.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Dec 2022 21:41:42 +0200")

[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2022-12-06  4:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 18:30 bug#59841: 29.0.50; 'before-string' text property doesn't work Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-05 19:41 ` Eli Zaretskii
2022-12-06  4:34   ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-12-06 12:19     ` Eli Zaretskii
2022-12-07 15:38       ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-07 18:08         ` Eli Zaretskii
2022-12-08  4:34           ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-13  1:04             ` Stefan Kangas

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=87bkohxi9b.fsf@disroot.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=59841@debbugs.gnu.org \
    --cc=akib@disroot.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.