unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 56815@debbugs.gnu.org, gregory@heytings.org, larsi@gnus.org
Subject: bug#56815: 29.0.50; Isearch lazy-highlight highlights too much when truncate-lines is in effect
Date: Mon, 01 Aug 2022 14:51:56 +0300	[thread overview]
Message-ID: <83wnbs2nc3.fsf@gnu.org> (raw)
In-Reply-To: <86fsih5bch.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 31 Jul 2022 22:40:22 +0300)

> From: Juri Linkov <juri@linkov.net>
> Cc: Eli Zaretskii <eliz@gnu.org>,  larsi@gnus.org,  56815@debbugs.gnu.org
> Date: Sun, 31 Jul 2022 22:40:22 +0300
> 
> >> And yes, if we want truncate-lines to work reasonably well, we need to
> >> fix any features which behave silly in that display mode.
> >>
> >
> > If we want truncate-lines to work reasonably well without fixing all such
> > features one-by-one, we need to fix the root cause of that dysfunction,
> > which is not inside these individual features, but is the fact that (-
> > (window-end) (window-start)) is huge.
> 
> Do you think introducing the rectangular narrowing could be a more general fix?
> We already have rectangular regions generalized as non-contiguous regions.
> Could non-contiguous narrowing help to restrict the accessible buffer area
> to the visible screen rectangle?

I don't understand how such a restriction will work on the level of
buffer text.  E.g., what happens when you insert a single character
before the beginning of one of the narrowed regions? does the region
move with the text or does it stay on the same buffer positions?

Basically, as long as Emacs represents buffer text as a single long C
string (aside of the gap), with no additional structure, I don't see
how implement this with any reasonable complexity.

And I agree with Gregory that the gains in this case will be too low,
relative to the complexity.

Let's keep this in its correct proportions: we "just" want isearch to
behave reasonably well in long-and-truncated lines, because IMO
isearch is one of the few features that we cannot break or disable in
such buffers -- the ability to search is too fundamental to editing,
even if that editing means just viewing the text.

So if no good ideas arise that are simple enough to implement, I'm
okay with simply disabling isearch-lazy-highlight in such buffers, as
I wrote in the original bug report.  (Doing that will probably require
exposing the "long-lines" flag to Lisp, but that's fine by me.)

Thanks.





  parent reply	other threads:[~2022-08-01 11:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28 17:29 bug#56815: 29.0.50; Isearch lazy-highlight highlights too much when truncate-lines is in effect Eli Zaretskii
2022-07-28 20:08 ` Juri Linkov
2022-07-29  5:50   ` Eli Zaretskii
2022-07-29 11:48     ` Lars Ingebrigtsen
2022-07-29 18:14       ` Juri Linkov
2022-07-29 18:37         ` Gregory Heytings
2022-07-29 19:02           ` Eli Zaretskii
2022-07-29 19:11             ` Gregory Heytings
2022-07-29 19:31               ` Eli Zaretskii
2022-07-29 19:36                 ` Eli Zaretskii
2022-07-29 19:52                 ` Gregory Heytings
2022-07-29 19:59                   ` Eli Zaretskii
2022-07-29 20:26                     ` Gregory Heytings
2022-07-30  5:35                       ` Eli Zaretskii
2022-07-31 19:40                       ` Juri Linkov
2022-07-31 21:21                         ` Gregory Heytings
2022-08-01 11:51                         ` Eli Zaretskii [this message]
2022-08-01 18:09                           ` Juri Linkov
2022-08-02  7:31                             ` Gregory Heytings
2022-08-02 11:10                               ` Eli Zaretskii
2022-08-14 13:53                             ` Eli Zaretskii
2022-08-21 16:32                               ` Juri Linkov
2022-08-21 17:06                                 ` Eli Zaretskii
2022-08-21 19:03                                   ` Juri Linkov
2022-08-21 19:35                                     ` Eli Zaretskii
2022-08-22  6:48                                       ` Juri Linkov
2022-08-22 11:32                                         ` Eli Zaretskii
2022-08-23  7:41                                           ` Juri Linkov
2022-08-23 12:11                                             ` Eli Zaretskii
2022-08-23 16:49                                               ` Juri Linkov
2022-08-27 19:52                                                 ` Juri Linkov
2022-08-08 17:20 ` Juri Linkov

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=83wnbs2nc3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=56815@debbugs.gnu.org \
    --cc=gregory@heytings.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.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 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).