Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16044

Re: [PATCH] Add active mark, face support; activate mark on paste

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From "Daniel Colascione" <dancol@dancol.org>
Newsgroups gnu.bash.bug
Subject Re: [PATCH] Add active mark, face support; activate mark on paste
Date Wed, 25 Mar 2020 13:18:30 -0700
Lines 34
Approved bug-bash@gnu.org
Message-ID <mailman.422.1585167519.3020.bug-bash@gnu.org> (permalink)
References <20180310075024.196515-1-dancol@google.com> <CAKOZuesyQ81O_GfkOZsPiBhgTVWzfCjXvV4G+52GoiEnSENTiw@mail.gmail.com> <b3595753-add3-40aa-8362-f683b05fdba7@case.edu> <CAKOZueukmT5skB_uxD3jSoK1w8L2SQhAwpFHC4Wgnj4h-Dczgg@mail.gmail.com> <9dd461f8-9a65-10c7-f21d-e274446cc411@case.edu> <CAKOZueuTpWvrpi2w2k+3U+BxD0k5H5baNbNgh_U3UosHE+gP=Q@mail.gmail.com> <c44dfb06-fad2-4b6c-0520-558cec6d25ba@case.edu> <CAKOZueuJZkPzJwRH56FwWtDDdNxxa+Zm=VZDhnJuTf5bfo2Y2w@mail.gmail.com> <edc24625-1e32-5571-2728-2744e3b7f6ca@case.edu> <CAKOZueubcO2RdOZuevzF+waBBcnfnVgd74LJU6P2bbwtEewOXA@mail.gmail.com> <CAKOZuet-7Tskn-ZDOsrmuRYM16AvqN+1OfJ38bvmaGCYZFAAvw@mail.gmail.com> <4bc4cc5a-7223-805b-a9ef-0a6be91e4af5@case.edu> <CAKOZuetkFYqEyW_Lm88FjFS7MX2r=xXiPfbJ8Go=Rx-+KB05UQ@mail.gmail.com> <7e19d6ba-1961-8606-c4ce-e36d16835ec7@case.edu> <06fe6c870eaf14df56094faa6be1ee9e.squirrel@dancol.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain;charset=iso-8859-1
Content-Transfer-Encoding 8bit
X-Trace usenet.stanford.edu 1585167520 16460 209.51.188.17 (25 Mar 2020 20:18:40 GMT)
X-Complaints-To action@cs.stanford.edu
Cc "Daniel Colascione" <dancol@google.com>, "bash.bug list" <bug-bash@gnu.org>
To chet.ramey@case.edu
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From: Subject:Date:References:In-Reply-To:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3V9+BIjQSDbntnqKFhXD0LpMzdgSktvt9hYsry1HPWc=; b=qClAu9MdwvgbNFtgFKISOUXq+r 5NNdPEUH0YFsu/krzwFr2CACbCfOzSGchfVgQjeb+BIiqwnSINMW/wKxwNmIQmyiNh83iuCasZaly XaSWO6DaEfbYfSi4rZEXliGwIyLKxe9ny6de2us3Z4KEOr3CZIB8fhf2BTbdiQJWCcIFQ+FC+3j5a H/qcb0w8t/Ar/anaE+XXZvLedv9YAMO6DhH8p6gzTjB3RwDRqCpKxzaiGkuGnSdWm2TsPjiM525dk kXkcMsW5GHtgB9rEtq/2dm6KFfdA7Dm2O55PezQAXNp6YFYXoVLIFTivMsC32duX1Hg4H4EwmZ9QR g6B1H/cw==;
In-Reply-To <7e19d6ba-1961-8606-c4ce-e36d16835ec7@case.edu>
User-Agent SquirrelMail/1.4.23 [SVN]
X-Priority 3 (Normal)
Importance Normal
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2600:3c01::f03c:91ff:fedf:adf3
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <06fe6c870eaf14df56094faa6be1ee9e.squirrel@dancol.org>
X-Mailman-Original-References <20180310075024.196515-1-dancol@google.com> <CAKOZuesyQ81O_GfkOZsPiBhgTVWzfCjXvV4G+52GoiEnSENTiw@mail.gmail.com> <b3595753-add3-40aa-8362-f683b05fdba7@case.edu> <CAKOZueukmT5skB_uxD3jSoK1w8L2SQhAwpFHC4Wgnj4h-Dczgg@mail.gmail.com> <9dd461f8-9a65-10c7-f21d-e274446cc411@case.edu> <CAKOZueuTpWvrpi2w2k+3U+BxD0k5H5baNbNgh_U3UosHE+gP=Q@mail.gmail.com> <c44dfb06-fad2-4b6c-0520-558cec6d25ba@case.edu> <CAKOZueuJZkPzJwRH56FwWtDDdNxxa+Zm=VZDhnJuTf5bfo2Y2w@mail.gmail.com> <edc24625-1e32-5571-2728-2744e3b7f6ca@case.edu> <CAKOZueubcO2RdOZuevzF+waBBcnfnVgd74LJU6P2bbwtEewOXA@mail.gmail.com> <CAKOZuet-7Tskn-ZDOsrmuRYM16AvqN+1OfJ38bvmaGCYZFAAvw@mail.gmail.com> <4bc4cc5a-7223-805b-a9ef-0a6be91e4af5@case.edu> <CAKOZuetkFYqEyW_Lm88FjFS7MX2r=xXiPfbJ8Go=Rx-+KB05UQ@mail.gmail.com> <7e19d6ba-1961-8606-c4ce-e36d16835ec7@case.edu>
Xref csiph.com gnu.bash.bug:16044

Show key headers only | View raw


> On 3/25/20 1:14 PM, Daniel Colascione wrote:
>
>> Ping? Anything I can do to help?
>
> OK, I sat down and looked at this code, since I'm homebound. I added the
> active mark/region features (rl_activate_mark/rl_deactivate_mark/etc.)
> and a couple of the smaller pieces (_rl_cr, the so/se sequences).

Thanks!

> Can you
> tell me why you decided to make the region management functions public?
> Did you anticipate external application functions wanting to manage the
> region?

I was imagining applications wanting to highlight certain regions, e.g., a
shell showing which command in a pipeline failed. You can also imagine a
readline user supporting something like xterm-mouse-mode. Making the
region functions public isn't essential right now though.

> I haven't touched the face code in display.c. I'd like to find a simpler
> way to do it: the patch seems to have a lot of overhead and adds more
> complexity than I'd like at a time when I'm trying to make the redisplay
> code simpler. I don't know of a better way to do that yet.

The redisplay code needs to track the intended attribute state of each
character in the buffer. I'm not sure what simpler approach might be
viable. Fat characters? You'd still have to support the old char*
interface, and you'd still need something like puts_face to "propertize"
any strings we add to the buffer. A face system preserves the existing
format of the buffer at least, and the redisplay update code is a logical
extension of the current diffing logic.

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: [PATCH] Add active mark, face support; activate mark on paste "Daniel Colascione" <dancol@dancol.org> - 2020-03-25 13:18 -0700

csiph-web