Re: <> and ?font-lock? fly-check, ...
Tom, >I just checked and it induces a syntax error, which I did not know, > but turns out to be quite useful because it means that an untangled or > incorrectly tangled file will fail to run beyond that point. Best! :) cheers.
Re: <> and ?font-lock? fly-check, ...
Hi Greg, I just checked and it induces a syntax error, which I did not know, but turns out to be quite useful because it means that an untangled or incorrectly tangled file will fail to run beyond that point. Best! Tom On Sun, May 2, 2021 at 9:11 PM Greg Minshall wrote: > > Tom, that is quite devious, actually. thank you very much! do you > know, by the way, what flycheck and/or the shell make the "<<&" > construct out to be? cheers, Greg >
Re: <> and ?font-lock? fly-check, ...
Tom, that is quite devious, actually. thank you very much! do you know, by the way, what flycheck and/or the shell make the "<<&" construct out to be? cheers, Greg
Re: <> and ?font-lock? fly-check, ...
Hi Greg, A slightly different suggestion that doesn't break other org processors (which might not allow users to change org-babel-noweb-wrap- values) is to prefix the names of the blocks with & (e.g. <<&block-to-noweb-in>>) as I do in multiple places in https://github.com/tgbugs/pyontutils/blob/master/docs/release.org#build-release. I found this solution while fighting with the font-locking behavior in shell blocks. Best! Tom
Re: <> and ?font-lock? fly-check, ...
Diego and Sébastien, thank you both. in particular, i didn't know about =org-babel-noweb-wrap-start=, and that's probably perfect for this case. cheers, Greg
Re: <> and ?font-lock? fly-check, ...
Hi Greg, Greg Minshall writes: is there an obvious thing to do to either get whatever syntax checker is running to ignore the <> reference, or some such? From the org side of things, you could customize the variables `org-babel-noweb-wrap-start` and `org-babel-noweb-wrap-end` to something that doesn't interfere with bash syntax. Regards, -- Sébastien Miquel
Re: <> and ?font-lock? fly-check, ...
I don't think there's an easy way to fix this - since src blocks are fontified using the mode for the corresponding language. Particularly in shell script, since << has a meaning in the language ("here" input), I assume this is why the rest of the block gets fontified differently. Best, --Diego On Sun, May 2, 2021 at 2:29 PM Greg Minshall wrote: > hi, all. > > using a <> reference in a bash source block, the buffer's font > lock colors go south on lines folowing the <> reference. (in my > case, all remaining lines in the buffer are colored bright yellow). the > major and minor modes are as listed below. > > is there an obvious thing to do to either get whatever syntax checker is > running to ignore the <> reference, or some such? > > thanks in advance, Greg > > major mode: Shell-script[bash] > > Enabled minor modes: Async-Bytecomp-Package Auto-Composition > Auto-Compression Auto-Encryption Blink-Cursor Electric-Indent > File-Name-Shadow Flycheck Font-Lock Global-Eldoc Global-Flycheck > Global-Font-Lock Line-Number Marginalia Menu-Bar Mouse-Wheel > My-Global-Subword Org-Src Override-Global Selectrum > Sh-Electric-Here-Document Shell-Dirtrack Straight-Package-Neutering > Straight-Use-Package Subword Tooltip Transient-Mark Yas Yas-Global > >
<> and ?font-lock? fly-check, ...
hi, all. using a <> reference in a bash source block, the buffer's font lock colors go south on lines folowing the <> reference. (in my case, all remaining lines in the buffer are colored bright yellow). the major and minor modes are as listed below. is there an obvious thing to do to either get whatever syntax checker is running to ignore the <> reference, or some such? thanks in advance, Greg major mode: Shell-script[bash] Enabled minor modes: Async-Bytecomp-Package Auto-Composition Auto-Compression Auto-Encryption Blink-Cursor Electric-Indent File-Name-Shadow Flycheck Font-Lock Global-Eldoc Global-Flycheck Global-Font-Lock Line-Number Marginalia Menu-Bar Mouse-Wheel My-Global-Subword Org-Src Override-Global Selectrum Sh-Electric-Here-Document Shell-Dirtrack Straight-Package-Neutering Straight-Use-Package Subword Tooltip Transient-Mark Yas Yas-Global