all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Redisplaying text in both display margins?
Date: Wed, 27 Jan 2021 17:59:23 +0200	[thread overview]
Message-ID: <83v9biz7z8.fsf@gnu.org> (raw)
In-Reply-To: <01e529e1bfecb8e32c9d737ebfd26140@bydasein.com> (pwr@bydasein.com)

> Date: Mon, 25 Jan 2021 18:28:11 +1000
> From: "Paul W. Rankin" <pwr@bydasein.com>
> Cc: help-gnu-emacs@gnu.org
> 
> emacs -Q
> (erase-buffer)
> (set-window-margins nil 20)
> (insert "foobarbaz")
> (put-text-property 4 7 'display '((margin left-margin) (space :width (- 
> left-margin 2))))
> (put-text-property 7 10 'display '((margin left-margin) "1"))
> 
> This should result in a window with something like:
> 
>            1 foo
> 
> Then assuming a frame of 80 columns and `truncate-lines' is nil (or 
> visual-line-mode is enabled):
> 
> (goto-char (point-min))
> (insert (make-string 45 ?x))
> 
> The "1" will appear to get pushed towards the left as more text is added 
> until the line wraps the window:
> 
> So my question becomes, how should I apply these display text properties 
> such that they will not be affected by line wrapping?

It's a bug.  Two bugs, actually.  And from the looks of that, it
sounds like no one has ever tried to display stretches of whitespace
in the display margins.

I've now fixed that on the master branch, see commit ff03411.

Alan, could you please see if something similar is needed in nsterm.m
(my reading of the code indicates that it is already okay, but I'm not
sure).  The symptom of the problem I fixed in xterm.c and w32term.c is
that when you execute the first part of the recipe in a single progn,
the first 2 lines are not cleared in the left margin area, you still
see portions of the comment originally displayed in the *scratch*
buffer.

Thanks.



  reply	other threads:[~2021-01-27 15:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19  9:27 Redisplaying text in both display margins? pwr--- via Users list for the GNU Emacs text editor
2021-01-19 15:16 ` Eli Zaretskii
2021-01-25  8:28   ` pwr--- via Users list for the GNU Emacs text editor
2021-01-27 15:59     ` Eli Zaretskii [this message]
2021-01-27 18:02       ` Alan Third
2021-02-01  7:04         ` pwr--- via Users list for the GNU Emacs text editor
2021-02-01 15:02           ` Eli Zaretskii
2021-02-01 15:44             ` pwr--- via Users list for the GNU Emacs text editor
2021-02-01 16:10               ` moasenwood--- via Users list for the GNU Emacs text editor

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=83v9biz7z8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@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.