Re: idea for groff

2025-02-20 Thread G. Branden Robinson
Hi Larry, At 2025-02-20T16:49:47-0800, Larry McVoy wrote: > On Thu, Feb 20, 2025 at 06:36:29PM -0600, G. Branden Robinson wrote: > > At 2025-02-20T19:39:37+0100, onf wrote: > > > On Thu Feb 20, 2025 at 5:59 PM CET, Douglas McIlroy wrote: > > > > The idea that the argument of .so might contain unqu

Re: idea for groff

2025-02-20 Thread Larry McVoy
On Thu, Feb 20, 2025 at 06:36:29PM -0600, G. Branden Robinson wrote: > At 2025-02-20T19:39:37+0100, onf wrote: > > On Thu Feb 20, 2025 at 5:59 PM CET, Douglas McIlroy wrote: > > > The idea that the argument of .so might contain unquoted spaces is > > > anathema--contrary to groff convention and for

Re: idea for groff

2025-02-20 Thread G. Branden Robinson
At 2025-02-20T19:39:37+0100, onf wrote: > On Thu Feb 20, 2025 at 5:59 PM CET, Douglas McIlroy wrote: > > The idea that the argument of .so might contain unquoted spaces is > > anathema--contrary to groff convention and fortunately not supported. > > As far as I know, .so currently doesn't support

Re: idea for groff

2025-02-20 Thread Damian McGuckin
On Thu, 20 Feb 2025, G. Branden Robinson wrote: I think we Unix people lost this war, or at least need to write code that is well-prepared to handle sojourns in foreign lands. Yes. Sadly. Although some of us are lucky enough to mandate a file naming policy within our own organization (and som

Re: idea for groff

2025-02-20 Thread G. Branden Robinson
At 2025-02-20T15:55:40-0500, Steve Izma wrote: > For what it's worth, I've always abhorred filenames with word spaces > -- they usually require extra consideration in shell scripts and other > programs. Yes. I remember around 2002 or so when Apple released an iTunes update that didn't appreciate

the anathema of unquoted spaces (was: idea for groff)

2025-02-20 Thread G. Branden Robinson
I don't intend to address the "line selection by number from a sourced file" issue in this sub-thread. The point here is to increase awareness of developments in the forthcoming groff 1.24.0. At 2025-02-20T16:28:02-0500, Douglas McIlroy wrote: > Indeed, .so does not keep a quoted argument togethe

Re: Idea for groff

2025-02-20 Thread Neil Johnson
Thanks Branden, That confirms my switch to putting the line range before the filename rather than at the end, where it could be confused as part of the filename. Cheers, Neil On Thu, 20 Feb 2025 at 00:21, G. Branden Robinson < g.branden.robin...@gmail.com> wrote: > At 2025-02-19T23:46:30+,

Re: idea for groff

2025-02-20 Thread Douglas McIlroy
Indeed, .so does not keep a quoted argument together. Surely that's a bug. Doug On Thu, Feb 20, 2025 at 1:39 PM onf wrote: > On Thu Feb 20, 2025 at 5:59 PM CET, Douglas McIlroy wrote: > > The idea that the argument of .so might contain unquoted spaces is > > anathema--contrary to groff conventi

Re: idea for groff

2025-02-20 Thread Steve Izma
On Thu, Feb 20, 2025 at 11:59:09AM -0500, Douglas McIlroy wrote: > Subject: Re: idea for groff > > The idea that the argument of .so might contain unquoted spaces > is anathema--contrary to groff convention and fortunately not > supported. I think the idea of selecting lines from a

Re: idea for groff

2025-02-20 Thread onf
On Thu Feb 20, 2025 at 5:59 PM CET, Douglas McIlroy wrote: > The idea that the argument of .so might contain unquoted spaces is > anathema--contrary to groff convention and fortunately not supported. As far as I know, .so currently doesn't support spaces even when quoted. ~ onf

Re: idea for groff

2025-02-20 Thread Douglas McIlroy
> .so[2-11] /my/source/file with spaces in the name The idea that the argument of .so might contain unquoted spaces is anathema--contrary to groff convention and fortunately not supported. I think the idea of selecting lines from a file is good, but it doesn't warrant new groff syntax. I wou

Re: Idea for groff

2025-02-19 Thread onf
On Thu Feb 20, 2025 at 2:05 AM CET, G. Branden Robinson wrote: > I did the following interactively; a here document runs into escaping > problems that I didn't want to mess with. This might be useful (quoted from dash(1)): The following redirection is often called a “here-document”. [n]

Re: Idea for groff

2025-02-19 Thread Damian McGuckin
On Wed, 19 Feb 2025, Larry McVoy wrote: For the record, I like your way better. .so[2-11] /my/source/file with spaces in the name My opinion is what it is, but I'd prefer a .so[2-11] since it can be backwards compat with .so /my/file. I know that a '.so' allows spaces but I always di

Re: Idea for groff

2025-02-19 Thread G. Branden Robinson
At 2025-02-19T16:46:51-0800, Larry McVoy wrote: > On Wed, Feb 19, 2025 at 11:46:30PM +, Neil Johnson wrote: > > With my alternative syntax: > > > > .SO[2-11] /my/source/file > > .SO[40-50] /my/source/file > > .SO[...] /my/source/file > > I like this form. Though the o

Re: Idea for groff

2025-02-19 Thread Larry McVoy
On Wed, Feb 19, 2025 at 11:46:30PM +, Neil Johnson wrote: > With my alternative syntax: > > .SO[2-11] /my/source/file > .SO[40-50] /my/source/file > .SO[...] /my/source/file I like this form. Though the other way you could do it is .SO /my/source/file\ with\

Re: Idea for groff

2025-02-19 Thread G. Branden Robinson
At 2025-02-19T23:46:30+, Neil Johnson wrote: > That's actually where I started from as well! Except file names after > the ".so" can have spaces in them on some platforms, and I don't > believe there is a requirement to escape them, so something like this > would be valid: > > .SO /my/

Re: Idea for groff

2025-02-19 Thread Neil Johnson
Thanks Damian, That's actually where I started from as well! Except file names after the ".so" can have spaces in them on some platforms, and I don't believe there is a requirement to escape them, so something like this would be valid: .SO /my/source/file with spaces in the name.c So the

Re: Idea for groff

2025-02-19 Thread Damian McGuckin
On Wed, 19 Feb 2025, Neil Johnson wrote: .so[2-11] /my/source/file.c A long time ago, I did something like .SO /my/source/file 2-11,40-50,... and some variations which had a label to delimit sections. Eventually, the reason for that disappeared and the sode for my special soelim go

Idea for groff

2025-02-19 Thread Neil Johnson
Hello there, I am currently using groff and friends to write a book. I am mostly using my own set of custom macros on top of the ms macros. One thing I need to do is pull in parts of source files into the book text. I would rather avoid tedious shell hackery and .sy and .so etc. Instead I am toyi