Re: [pager] line wrapping breaks URL detection

2022-05-16 Thread Ludolf Holzheid
On Fri, 2022-05-13 22:09:13 +0200, Daan van Rossum wrote: > [..] > > Ludolf, I hear you, there are plenty of workarounds, but I wonder if a real > solution to this problem would be feasible. > Daan, I didn't say it was impossible. You asked why it hasn't been implemented yet, and I guessed

Re: [pager] line wrapping breaks URL detection

2022-05-13 Thread Vincent Lefevre
On 2022-05-13 21:55:12 +0200, Daan van Rossum wrote: > * on Friday, 2022-05-13 19:49 +0200, Vincent Lefevre > wrote: > > A better tool could be to convert the text to HTML with just > > URL recognition to generate URL links (and > > perhaps a bit more), and run a web browser on it. > > There is

Re: [pager] line wrapping breaks URL detection

2022-05-13 Thread Vincent Lefevre
On 2022-05-13 21:55:12 +0200, Daan van Rossum wrote: > There is the 'urlscan' tool that does exactly this. It does the job, > without using the terminal's url detection functionality. I didn't know it. Mutt's manual mentions "urlview". So I think that it should mention "urlscan" too. -- Vincent

Re: [pager] line wrapping breaks URL detection

2022-05-13 Thread Vincent Lefevre
On 2022-05-13 20:25:28 +0200, Magnus Groß wrote: > Mutt could also use OSC 8 [1] to embed the link directly. This would work > regardless of whether mutt inserts hardcoded linebreaks or not. > > For example the following works despite the linebreak inbetween (tested in > wezterm): > >

Re: [pager] line wrapping breaks URL detection

2022-05-13 Thread Daan van Rossum
* on Friday, 2022-05-13 18:14 +0200, Ludolf Holzheid wrote: > On Fri, 2022-05-13 17:21:37 +0200, Daan van Rossum wrote: > > > > I suppose if mutt estimates the row number incorrectly: > > 1. underestimates: you could then still overwrite the last two rows with > > the status bar > > 2.

Re: [pager] line wrapping breaks URL detection

2022-05-13 Thread Daan van Rossum
* on Friday, 2022-05-13 19:49 +0200, Vincent Lefevre wrote: > On 2022-05-13 18:49:04 +0200, Gero Treuner wrote: > > Good point. There is the good old urlview program, also mentioned in the > > Mutt manual: > > https://github.com/sigpipe/urlview > > > > It can start a browser, but doesn't

Re: [pager] line wrapping breaks URL detection

2022-05-13 Thread Magnus Groß
Am Fri, May 13, 2022 at 07:49:38PM +0200 schrieb Vincent Lefevre: A better tool could be to convert the text to HTML with just URL recognition to generate URL links (and perhaps a bit more), and run a web browser on it. Mutt could also use OSC 8 [1] to embed the link directly. This would work

Re: [pager] line wrapping breaks URL detection

2022-05-13 Thread Vincent Lefevre
On 2022-05-13 18:49:04 +0200, Gero Treuner wrote: > Good point. There is the good old urlview program, also mentioned in the > Mutt manual: > https://github.com/sigpipe/urlview > > It can start a browser, but doesn't present URLs ready for copy. So this > could be a new feature or a new tool.

Re: [pager] line wrapping breaks URL detection

2022-05-13 Thread Gero Treuner
Hi, On Fri, May 13, 2022 at 06:14:13PM +0200, Ludolf Holzheid wrote: > Of course it is possible for TUI programs to let the terminal wrap the > lines. However, I expect it to be difficult to get it right for all > terminals (and all corner cases). > > For your problem, a simple workaround might

Re: [pager] line wrapping breaks URL detection

2022-05-13 Thread Ludolf Holzheid
On Fri, 2022-05-13 17:21:37 +0200, Daan van Rossum wrote: > > I suppose if mutt estimates the row number incorrectly: > 1. underestimates: you could then still overwrite the last two rows with the > status bar > 2. overestimates: one or more lines at the bottom of the screen would be empty > >

Re: [pager] line wrapping breaks URL detection

2022-05-13 Thread Daan van Rossum
* on Friday, 2022-05-13 11:39 +0200, Ludolf Holzheid wrote: > I think this is because Mutt needs to exactly know the terminal row it > is printing on. I'm not sure if all terminals behave the same if, for > example, the line is exactly as long as the terminal is wide. I suppose if mutt

[pager] line wrapping breaks URL detection

2022-05-13 Thread Daan van Rossum
Dear mutt devs, In modern terminals that support URL detection (e.g. alacritty, foot, urxvt), it is unfortunate that mutt's internal pager inserts explicit line breaks, breaking URLs as they get wrapped. I was wondering: is there a good reason for not letting the terminal wrap lines? Best,