From: Eli Zaretskii <eliz@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: jporterbugs@gmail.com, 66041@debbugs.gnu.org
Subject: bug#66041: 30.0.50; Should 'flymake-note-echo' inherit from 'compilation-info'?
Date: Mon, 18 Sep 2023 20:29:45 +0300 [thread overview]
Message-ID: <83edive6eu.fsf@gnu.org> (raw)
In-Reply-To: <CALDnm50vDDiqfni01oTEVsSfwAffbkDXBt9m8KWeAqtLi3ix1w@mail.gmail.com> (message from João Távora on Mon, 18 Sep 2023 16:31:45 +0100)
> From: João Távora <joaotavora@gmail.com>
> Date: Mon, 18 Sep 2023 16:31:45 +0100
> Cc: jporterbugs@gmail.com, 66041@debbugs.gnu.org
>
> On Mon, Sep 18, 2023 at 3:32 PM Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > I guess you want the cursor on the first character of the
> > overlay-string that is displayed first (leftmost)? Are you asking how
> > to implement this when there are more than one overlay at EOB?
>
> Yes, a direct answer to that question would be nice to know, too.
Give your overlays different priorities, and use (cursor t) only in
the overlay of the highest priority. If they all have before-string
(which is what I saw in the example), then priority will determine
which overlay is processed first (and thus displayed first).
> The idea is to have multiple bits of diagnostic text displayed
> after the end-of-line each related to a source overlay contained
> within that line. The idea of the feature is that source overlay
> and eol text are linked. If the source overlay is deleted, the
> end-of-line should disappear.
>
> It's similar to what happens with a simple 'after-string' overlay
> property, but with the 'after-string' skipping over all characters
> until the end of line.
>
> Currently, I'm doing this with a single "end-of-line" overlay placed
> as I explained properly (modulo bugs like this one, of course, since
> I intended a single overlay but unexpectedly got two). It's this
> second end-of-line overlay which has an 'after-string' property. I use
> after change functions to control the value of this property, so that
> if a source overlays gets destroyed, the corresponding text in value
> is deleted (and eventually also
>
> But I could probably use multiple end-of-line overlays, with a
> one-to-one correspondence to the source overlays. I've tried that too
> but abandoned it for difficulty in placing the cursor (similar problem
> to this one).
>
> And I think I tried an overlay modification hook instead of buffer after
> change functions and abandoned it too for some reason. Maybe the
> modification hook isn't called at all when the overlay is completely
> deleted?
>
> Or, conceivably, it could be done without end-of-line overlays at all,
> if somehow a 'eol-string' property similar to 'after-string' was
> implemented in the C code. But I would prefer a Lisp solution, of
> course.
>
> So, in summary, there is a fair bit of design space for this feature
> (which exists in VS code, btw) and I wanted to know your thoughts
> on these possibilities and my decisions.
Is placing the cursor the only problem you need to solve?
And do I understand correctly that you normally collect all the
diagnostics into a single sting, and display it as a single overlay
string?
next prev parent reply other threads:[~2023-09-18 17:29 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-17 4:42 bug#66041: 30.0.50; Should 'flymake-note-echo' inherit from 'compilation-info'? Jim Porter
2023-09-17 21:22 ` João Távora
2023-09-17 21:54 ` Jim Porter
2023-09-17 22:15 ` João Távora
2023-09-18 4:36 ` Jim Porter
2023-09-18 10:44 ` Eli Zaretskii
2023-09-18 10:46 ` João Távora
2023-09-18 11:42 ` Eli Zaretskii
2023-09-18 12:52 ` João Távora
2023-09-18 14:32 ` Eli Zaretskii
2023-09-18 15:31 ` João Távora
2023-09-18 17:29 ` Eli Zaretskii [this message]
2023-09-18 18:55 ` João Távora
2023-09-18 17:44 ` Jim Porter
2023-09-18 18:49 ` João Távora
2023-09-18 19:00 ` Jim Porter
2023-09-21 21:40 ` João Távora
2023-09-24 3:38 ` Jim Porter
2023-09-24 8:18 ` João Távora
2023-09-25 8:59 ` João Távora
2023-09-25 10:32 ` Eli Zaretskii
2023-09-25 11:46 ` João Távora
2023-09-25 12:08 ` Eli Zaretskii
2023-09-25 12:12 ` João Távora
2023-09-25 12:49 ` Eli Zaretskii
2023-09-25 13:52 ` João Távora
2023-09-25 14:19 ` Eli Zaretskii
2023-09-25 16:55 ` João Távora
2023-09-25 17:23 ` Eli Zaretskii
2023-09-25 18:23 ` João Távora
2023-09-25 20:55 ` Jim Porter
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83edive6eu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=66041@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
--cc=jporterbugs@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).