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

2020-03-25 Thread Daniel Colascione
> 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.




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

2020-03-25 Thread Chet Ramey
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). 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 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.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



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

2020-03-25 Thread Daniel Colascione
On Fri, Jan 10, 2020 at 5:34 AM Chet Ramey  wrote:
>
> On 1/8/20 2:38 PM, Daniel Colascione wrote:
> > On Tue, Sep 24, 2019 at 10:20 PM Daniel Colascione  
> > wrote:
> >>
> >> On Mon, Sep 23, 2019 at 6:36 AM Chet Ramey  wrote:
> >>>
> >>> On 9/23/19 7:32 AM, Daniel Colascione wrote:
>  On Wed, Jan 9, 2019 at 12:37 PM Chet Ramey  wrote:
> >
> > On 1/9/19 2:39 PM, Daniel Colascione wrote:
> >> Any chance we can revive this patch now that Bash 5 is out? (The patch
> >> itself, of course, would need to be rebased.)
> >
> > Yes, I plan to.
> 
>  Have you had a chance to look at the patch?
> >>>
> >>> Sorry, I have not. I need a bigger chunk of time than I've had available
> >>> to figure out the intent of the patches, and whether they're a good idea
> >>> to include in readline, before looking closely at the code.
> >>
> >> I've had a people tell me that this patch is very useful for helping
> >> them understand editing operations and pasting. I sent this patch over
> >> a year and a half ago. Should I expect another year and a half of
> >> pinging this thread? :-)
> >
> > Is there anything I can do to get this patch looked at?
>
> I haven't taken the time to sit down and look at it.  That's my bad.

Ping? Anything I can do to help?



process substitution bug or difference from bash 4.4

2020-03-25 Thread Valentin Lab

Hi,

I have encountered an issue when running some bash code from 4.4 on a 
bash 5 ... I've managed to pinpoint the exact issue on my end.


Here are 2 functions that are quite similar, except the usage of "{ ; }" 
around the "cat":


## 
ouch() {
cat < <(echo bar)
cat "$1"
}

ouch2() {
{ cat; } < <(echo bar)
cat "$1"
}
##


Runnning this will give the same output on bash 4.4 and 5:


$ ouch <(echo "foo")
foo
bar


And by replacing "ouch" by "ouch2", I have the same output in bash 4.4 .

But running it on bash 5 will fail:

$ ouch2 <(echo "foo")
bar
cat: /dev/fd/63: No such file or directory


Is that expected ? I'd be happy to know about the rationale behind this 
(and the change) if this is expected.


Many thanks,

Valentin Lab



Re: [PATCH] (Debian, testing) bash.1: Remove superfluous '.PP' and whitespace

2020-03-25 Thread Chet Ramey
On 3/24/20 4:22 PM, Bjarni Ingi Gislason wrote:

> Bash Version: 5.0
> Patch Level: 16
> Release Status: release
> 
> Description:
>   [Detailed description of the problem, suggestion, or complaint.]
> 
>   The input file is from Debian testing.
> 
>   Warnings from "mandoc" and "test-groff".

Thanks for the report.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/