all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Patch]: Allow overlay arrows to be inserted before the text at column zero rather than splatting it.
Date: Sun, 18 Aug 2019 16:15:30 +0000	[thread overview]
Message-ID: <20190818161530.GB31509@ACM> (raw)
In-Reply-To: <83mug6mtjy.fsf@gnu.org>

Hello, Eli.

On Sun, Aug 18, 2019 at 17:34:09 +0300, Eli Zaretskii wrote:
> > Date: Sun, 18 Aug 2019 13:48:04 +0000
> > From: Alan Mackenzie <acm@muc.de>

> > Currently, when there are no fringes, inserting an overlay arrow
> > overwrites the first two characters on the pertinent line.  This is fine
> > for things like edebug, where the text is usually indented many columns
> > anyway, and only whitespace gets overwritten.

> > This is less good for things like compilation-mode, where this arrow
> > would obliterate the first two characters of a file name.

> > The following amendment fixes this by allowing the arrow to be displayed
> > at the BOL, displacing the rest of the line two characters to the right.
> > To do this, a new buffer local boolean variable, overlay-arrow-insert is
> > introduced.

> If you want the arrow be displayed before the line's text, why didn't
> you just put a before-string at the beginning of the line, instead of
> implementing this in the display engine?

I think it was to be able to use the same interface that the overlay
arrow already uses, without having to reimplement a lot of it using
before-strings.

> AFAIU, that would give you most of the patch for free, e.g. you
> wouldn't need to mess with the set_cursor_from_row hair.

Yes, there was set_cursor_from_row which I had to change.  Somehow, only
partially initialised glyphs got into it; they pointed to lisp strings,
but with an offset of -1.  This caused an error to be thrown, and the
surrounding internal_condition_case_1 reentered the redisplay code in a
loop, causing Emacs to hang.  I'm not sure where they failed to get
initialised, but the function is probably better with the workaround I
put in.

> What am I missing?

Probably not a lot.  Extending the overlay arrow functionality using
before-strings would certainly have been easier than changing the
display engine.  But it may be worthwhile to be able to use the overlay
arrow interface for "insertion type" arrows.

-- 
Alan Mackenzie (Nuremberg, Germany).



  reply	other threads:[~2019-08-18 16:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-18 13:48 [Patch]: Allow overlay arrows to be inserted before the text at column zero rather than splatting it Alan Mackenzie
2019-08-18 14:34 ` Eli Zaretskii
2019-08-18 16:15   ` Alan Mackenzie [this message]
2019-08-18 16:29     ` Eli Zaretskii
2019-08-18 18:43       ` Alan Mackenzie
2019-08-18 18:53         ` Eli Zaretskii
2019-08-18 19:23           ` Alan Mackenzie
2019-08-19  2:29             ` Eli Zaretskii
2019-08-19 19:28               ` Alan Mackenzie
2019-08-20  2:30                 ` Eli Zaretskii
2019-08-18 19:30         ` Noam Postavsky
2019-08-18 19:43           ` Alan Mackenzie
2019-08-19  9:30         ` Stefan Monnier
2019-08-19 14:46           ` Eli Zaretskii

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=20190818161530.GB31509@ACM \
    --to=acm@muc.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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.