* [ISSUE] mless: Making use of the switch in the "main loop"
@ 2020-02-06 9:47 mblaze-github
2020-02-06 9:51 ` mblaze-github
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: mblaze-github @ 2020-02-06 9:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 594 bytes --]
New issue by xelxebar on mblaze repository
https://github.com/leahneukirchen/mblaze/issues/171
Description:
Browsing `mless`'s source, I notice a "main loop" with an inner `case` statement. It looks to be switching on the exit code of `less`, supposedly letting one do convenient things like mark messages read, toggle raw/html modes, *etc.* from within mless. The exit codes acting as ascii codes is nifty.
This behaviour is completely undocumented in `mless(1)` and, reading through `less(1)` I can find no way to produce the necessary exit codes. Am I simply missing something obvious?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mless: Making use of the switch in the "main loop"
2020-02-06 9:47 [ISSUE] mless: Making use of the switch in the "main loop" mblaze-github
@ 2020-02-06 9:51 ` mblaze-github
2020-02-06 10:23 ` mblaze-github
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mblaze-github @ 2020-02-06 9:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 197 bytes --]
New comment by leahneukirchen on mblaze repository
https://github.com/leahneukirchen/mblaze/issues/171#issuecomment-582822332
Comment:
See `mlesskey.example`. This is not yet documented, indeed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mless: Making use of the switch in the "main loop"
2020-02-06 9:47 [ISSUE] mless: Making use of the switch in the "main loop" mblaze-github
2020-02-06 9:51 ` mblaze-github
@ 2020-02-06 10:23 ` mblaze-github
2020-02-06 10:47 ` mblaze-github
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mblaze-github @ 2020-02-06 10:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 316 bytes --]
New comment by xelxebar on mblaze repository
https://github.com/leahneukirchen/mblaze/issues/171#issuecomment-582835152
Comment:
Beautiful, thanks.
Apparently, I did miss something sort of obvious. Should have noticed the `LESSKEY` setting right above the loop!
Might be nice to document this in `mless(1)`.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mless: Making use of the switch in the "main loop"
2020-02-06 9:47 [ISSUE] mless: Making use of the switch in the "main loop" mblaze-github
2020-02-06 9:51 ` mblaze-github
2020-02-06 10:23 ` mblaze-github
@ 2020-02-06 10:47 ` mblaze-github
2020-02-06 10:53 ` mblaze-github
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mblaze-github @ 2020-02-06 10:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
New comment by xelxebar on mblaze repository
https://github.com/leahneukirchen/mblaze/issues/171#issuecomment-582845332
Comment:
Also, where did you find out about the ability to give arguments to `quit` and `noaction`. The allowable commands aren't really documented all the well in `lesskey(1)`. Directly from the source?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mless: Making use of the switch in the "main loop"
2020-02-06 9:47 [ISSUE] mless: Making use of the switch in the "main loop" mblaze-github
` (2 preceding siblings ...)
2020-02-06 10:47 ` mblaze-github
@ 2020-02-06 10:53 ` mblaze-github
2020-02-06 10:57 ` mblaze-github
2020-05-20 1:01 ` [ISSUE] [CLOSED] " xelxebar
5 siblings, 0 replies; 7+ messages in thread
From: mblaze-github @ 2020-02-06 10:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
New comment by leahneukirchen on mblaze repository
https://github.com/leahneukirchen/mblaze/issues/171#issuecomment-582847838
Comment:
> An action may be followed by an "extra" string. When such a command is
> entered while running less, the action is performed, and then the extra
> string is parsed, just as if it were typed in to less. This feature
> can be used in certain cases to extend the functionality of a command.
> For example, see the "{" and ":t" commands in the example below. The
> extra string has a special meaning for the "quit" action: when less
> quits, first character of the extra string is used as its exit status.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mless: Making use of the switch in the "main loop"
2020-02-06 9:47 [ISSUE] mless: Making use of the switch in the "main loop" mblaze-github
` (3 preceding siblings ...)
2020-02-06 10:53 ` mblaze-github
@ 2020-02-06 10:57 ` mblaze-github
2020-05-20 1:01 ` [ISSUE] [CLOSED] " xelxebar
5 siblings, 0 replies; 7+ messages in thread
From: mblaze-github @ 2020-02-06 10:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
New comment by xelxebar on mblaze repository
https://github.com/leahneukirchen/mblaze/issues/171#issuecomment-582849661
Comment:
Sigh. I completely missed that in my skimming. Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ISSUE] [CLOSED] mless: Making use of the switch in the "main loop"
2020-02-06 9:47 [ISSUE] mless: Making use of the switch in the "main loop" mblaze-github
` (4 preceding siblings ...)
2020-02-06 10:57 ` mblaze-github
@ 2020-05-20 1:01 ` xelxebar
5 siblings, 0 replies; 7+ messages in thread
From: xelxebar @ 2020-05-20 1:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
Closed issue by xelxebar on mblaze repository
https://github.com/leahneukirchen/mblaze/issues/171
Description:
Browsing `mless`'s source, I notice a "main loop" with an inner `case` statement. It looks to be switching on the exit code of `less`, supposedly letting one do convenient things like mark messages read, toggle raw/html modes, *etc.* from within mless. The exit codes acting as ascii codes is nifty.
This behaviour is completely undocumented in `mless(1)` and, reading through `less(1)` I can find no way to produce the necessary exit codes. Am I simply missing something obvious?
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-05-20 1:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 9:47 [ISSUE] mless: Making use of the switch in the "main loop" mblaze-github
2020-02-06 9:51 ` mblaze-github
2020-02-06 10:23 ` mblaze-github
2020-02-06 10:47 ` mblaze-github
2020-02-06 10:53 ` mblaze-github
2020-02-06 10:57 ` mblaze-github
2020-05-20 1:01 ` [ISSUE] [CLOSED] " xelxebar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).