* Off Topic (was: bug#31544) [not found] ` <A2BA1EF2-D393-43D5-8F44-E802DC705C0A@gnu.org> @ 2018-05-22 6:58 ` Van L 2018-05-23 3:24 ` Richard Stallman 0 siblings, 1 reply; 18+ messages in thread From: Van L @ 2018-05-22 6:58 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Emacs developers > Eli Zaretskii writes: > > Van L writes: >> >>> Richard Stallman writes: >>> >>>> about it in more detail). >>> >>> I think that is not a bug. >>> We don't follow a rule to write that way. >> >> The bug surfaces to occasionally cause the failure to present the >> content as all italicized within texi file's @i{} embrace. > > It's some subtle problem with > JIT font-lock in that place. Thanks. If a voice-recognition module is workable and Emacs has the skill to compose raw regexps from less terse human friendly natural language statements, with marks and point at data, would it be easy to marry the two? ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-22 6:58 ` Off Topic (was: bug#31544) Van L @ 2018-05-23 3:24 ` Richard Stallman 2018-05-23 3:44 ` Van L 2018-05-23 11:06 ` Noam Postavsky 0 siblings, 2 replies; 18+ messages in thread From: Richard Stallman @ 2018-05-23 3:24 UTC (permalink / raw) To: Van L; +Cc: eliz, emacs-devel [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > If a voice-recognition module is workable and Emacs has the skill > to compose raw regexps from less terse human friendly natural > language statements, with marks and point at data, would it be > easy to marry the two? We don't have adequate free software for voice recognition, as far as I know, and we should not add Emacs support for any such nonfree program. Compiling a clearer syntax into regexps is feasible. We have such things but we haven't adopted any of them in Emacs itself. Perhaps they are not really convenient. It would be good to figure out why not, and make one that is convenient to use, and then use it. Perhaps the inconvenience has to do with combining the complex parts of the regexp with the simple strings to match. Is that so? -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-23 3:24 ` Richard Stallman @ 2018-05-23 3:44 ` Van L 2018-05-23 11:06 ` Noam Postavsky 1 sibling, 0 replies; 18+ messages in thread From: Van L @ 2018-05-23 3:44 UTC (permalink / raw) To: rms; +Cc: Emacs developers > Richard Stallman writes: > > We don't have adequate free software for voice recognition, as far as > I know, and we should not add Emacs support for any such nonfree > program. I get the demand to be free. > Perhaps the inconvenience has to do with combining the complex > parts of the regexp with the simple strings to match. Is that so? Imagine this. The scene is one of a room full of twenty Agile Programmers (who may not be any good at all). There are two Scrum Masters and the Agile Coach. They are across realtime data tracking 150,000 objects, such as, people. In a different world. There is free software voice-recognition (after a long slog to transition from nonfree). The secretaries from the 1980s interact with Emacs on data of equal size and complexity (and there are no charlatans at Theranos which is showing signs of success after a long slog :-). ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-23 3:24 ` Richard Stallman 2018-05-23 3:44 ` Van L @ 2018-05-23 11:06 ` Noam Postavsky 2018-05-24 2:48 ` Richard Stallman 1 sibling, 1 reply; 18+ messages in thread From: Noam Postavsky @ 2018-05-23 11:06 UTC (permalink / raw) To: Richard Stallman; +Cc: Van L, Eli Zaretskii, Emacs developers On 22 May 2018 at 23:24, Richard Stallman <rms@gnu.org> wrote: > Compiling a clearer syntax into regexps is feasible. > We have such things but we haven't adopted any of them in Emacs itself. Doesn't rx.el qualify? ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-23 11:06 ` Noam Postavsky @ 2018-05-24 2:48 ` Richard Stallman 2018-05-24 9:03 ` Off Topic Robert Pluim 2018-05-24 16:35 ` Off Topic (was: bug#31544) Alan Mackenzie 0 siblings, 2 replies; 18+ messages in thread From: Richard Stallman @ 2018-05-24 2:48 UTC (permalink / raw) To: Noam Postavsky; +Cc: van, eliz, emacs-devel [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > We have such things but we haven't adopted any of them in Emacs itself. > Doesn't rx.el qualify? It's an example of what I said. We have it, but we don't actually use it much if at all. This suggests to me that it has drawbacks which prevent it from being clearly superior. If someone comes up with a replacement syntax that reduces the drawbacks, we might start using it all the time. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic 2018-05-24 2:48 ` Richard Stallman @ 2018-05-24 9:03 ` Robert Pluim 2018-05-24 15:20 ` Eli Zaretskii 2018-05-24 16:35 ` Off Topic (was: bug#31544) Alan Mackenzie 1 sibling, 1 reply; 18+ messages in thread From: Robert Pluim @ 2018-05-24 9:03 UTC (permalink / raw) To: Richard Stallman; +Cc: van, eliz, Noam Postavsky, emacs-devel Richard Stallman <rms@gnu.org> writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > > We have such things but we haven't adopted any of them in Emacs itself. > > > Doesn't rx.el qualify? > > It's an example of what I said. We have it, but we don't actually use it > much if at all. This suggests to me that it has drawbacks which prevent > it from being clearly superior. > Iʼve never used rx.el because I didnʼt know it existed. Itʼs not described in the regular expression chapter of the emacs lisp reference manual, nor in the emacs user manual. > If someone comes up with a replacement syntax that reduces the drawbacks, > we might start using it all the time. Documenting rx.el would be a more productive use of time, I think, especially since Iʼve now noticed via reading rx.el that we already have sregex as well. Let's pick one rather than inventing a third syntax. Robert ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic 2018-05-24 9:03 ` Off Topic Robert Pluim @ 2018-05-24 15:20 ` Eli Zaretskii 2018-05-24 15:41 ` Robert Pluim 0 siblings, 1 reply; 18+ messages in thread From: Eli Zaretskii @ 2018-05-24 15:20 UTC (permalink / raw) To: Robert Pluim; +Cc: emacs-devel > From: Robert Pluim <rpluim@gmail.com> > Cc: Noam Postavsky <npostavs@gmail.com>, van@scratch.space, eliz@gnu.org, emacs-devel@gnu.org > Date: Thu, 24 May 2018 11:03:33 +0200 > > Documenting rx.el would be a more productive use of time, I think, > especially since Iʼve now noticed via reading rx.el that we already > have sregex as well. Let's pick one rather than inventing a third > syntax. I'm all for more documentation, but in this case what would you add to the doc string that already is very long and very detailed? ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic 2018-05-24 15:20 ` Eli Zaretskii @ 2018-05-24 15:41 ` Robert Pluim 2018-05-24 17:07 ` Eli Zaretskii 2018-05-25 2:59 ` Richard Stallman 0 siblings, 2 replies; 18+ messages in thread From: Robert Pluim @ 2018-05-24 15:41 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> From: Robert Pluim <rpluim@gmail.com> >> Cc: Noam Postavsky <npostavs@gmail.com>, van@scratch.space, eliz@gnu.org, emacs-devel@gnu.org >> Date: Thu, 24 May 2018 11:03:33 +0200 >> >> Documenting rx.el would be a more productive use of time, I think, >> especially since Iʼve now noticed via reading rx.el that we already >> have sregex as well. Let's pick one rather than inventing a third >> syntax. > > I'm all for more documentation, but in this case what would you add to > the doc string that already is very long and very detailed? I meant documentation of its existence, something like: diff --git i/doc/emacs/search.texi w/doc/emacs/search.texi index 263c4c5dcc..fd65cf3b38 100644 --- i/doc/emacs/search.texi +++ w/doc/emacs/search.texi @@ -802,7 +802,8 @@ Regexps This section (and this manual in general) describes regular expression features that users typically use. @xref{Regular Expressions,,, elisp, The Emacs Lisp Reference Manual}, for additional -features used mainly in Lisp programs. +features used mainly in Lisp programs. For an alternative and more +verbose syntax, see the @code{rx} package. Regular expressions have a syntax in which a few characters are special constructs and the rest are @dfn{ordinary}. An ordinary ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: Off Topic 2018-05-24 15:41 ` Robert Pluim @ 2018-05-24 17:07 ` Eli Zaretskii 2018-05-25 2:59 ` Richard Stallman 1 sibling, 0 replies; 18+ messages in thread From: Eli Zaretskii @ 2018-05-24 17:07 UTC (permalink / raw) To: Robert Pluim; +Cc: emacs-devel > From: Robert Pluim <rpluim@gmail.com> > Cc: emacs-devel@gnu.org > Date: Thu, 24 May 2018 17:41:04 +0200 > > > I'm all for more documentation, but in this case what would you add to > > the doc string that already is very long and very detailed? > > I meant documentation of its existence, something like: I very much doubt this will increase the package's visibility, but saying that certainly doesn't hurt. Thanks. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic 2018-05-24 15:41 ` Robert Pluim 2018-05-24 17:07 ` Eli Zaretskii @ 2018-05-25 2:59 ` Richard Stallman 1 sibling, 0 replies; 18+ messages in thread From: Richard Stallman @ 2018-05-25 2:59 UTC (permalink / raw) To: Robert Pluim; +Cc: emacs-devel [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > -features used mainly in Lisp programs. > +features used mainly in Lisp programs. For an alternative and more > +verbose syntax, see the @code{rx} package. We really should link somehow to documentation of rx. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-24 2:48 ` Richard Stallman 2018-05-24 9:03 ` Off Topic Robert Pluim @ 2018-05-24 16:35 ` Alan Mackenzie 2018-05-24 16:53 ` Yuri Khan 2018-05-24 17:01 ` Eli Zaretskii 1 sibling, 2 replies; 18+ messages in thread From: Alan Mackenzie @ 2018-05-24 16:35 UTC (permalink / raw) To: Richard Stallman; +Cc: van, eliz, Noam Postavsky, emacs-devel Hello, Richard. On Wed, May 23, 2018 at 22:48:59 -0400, Richard Stallman wrote: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > We have such things but we haven't adopted any of them in Emacs itself. > > Doesn't rx.el qualify? > It's an example of what I said. We have it, but we don't actually use it > much if at all. This suggests to me that it has drawbacks which prevent > it from being clearly superior. rx.el uses a wordy syntax, somewhat analagously to Cobol 50 years ago. Its premiss is that it's the terse, dense, austere characters which make a regexp difficult to write and read. I would suggest that it's more the abstract concepts which cause beginners difficulties, rather than the syntax. This was true of Cobol 50 years ago, and I think it's always been the case with regexps. That said, rx.el is used ~72 times in 19 files.el in Emacs, so somebody likes it. > If someone comes up with a replacement syntax that reduces the drawbacks, > we might start using it all the time. I don't think this will happen. At least, I hope not. ;-) > -- > Dr Richard Stallman > President, Free Software Foundation (https://gnu.org, https://fsf.org) > Internet Hall-of-Famer (https://internethalloffame.org) -- Alan Mackenzie (Nuremberg, Germany). ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-24 16:35 ` Off Topic (was: bug#31544) Alan Mackenzie @ 2018-05-24 16:53 ` Yuri Khan 2018-05-24 19:57 ` Alan Mackenzie 2018-05-25 2:59 ` Richard Stallman 2018-05-24 17:01 ` Eli Zaretskii 1 sibling, 2 replies; 18+ messages in thread From: Yuri Khan @ 2018-05-24 16:53 UTC (permalink / raw) To: Alan Mackenzie; +Cc: van, Eli Zaretskii, Emacs developers, rms, Noam Postavsky On Thu, May 24, 2018 at 11:38 PM Alan Mackenzie <acm@muc.de> wrote: > rx.el uses a wordy syntax, somewhat analagously to Cobol 50 years ago. > Its premiss is that it's the terse, dense, austere characters which make > a regexp difficult to write and read. I would suggest that it's more > the abstract concepts which cause beginners difficulties, rather than > the syntax. This was true of Cobol 50 years ago, and I think it's > always been the case with regexps. > That said, rx.el is used ~72 times in 19 files.el in Emacs, so somebody > likes it. I like rx.el. I like it because any reasonably involved rx.el expression will be written out on multiple lines, indented, and possibly commented; whereas the equivalent plain regexp will be jumbled up on one long line, or else broken up into a concat of several arbitrary parts. I like rx.el because its expressions can be navigated structurally, using ‘backward-up-list’, ‘forward-sexp’, and the like. The same commands work on regular regular expressions only if they have not been broken up for readability. I also like rx.el because it allows me to see fewer backslashes, double-backslashes, and quadruple-backslashes. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-24 16:53 ` Yuri Khan @ 2018-05-24 19:57 ` Alan Mackenzie 2018-05-24 20:24 ` Noam Postavsky ` (2 more replies) 2018-05-25 2:59 ` Richard Stallman 1 sibling, 3 replies; 18+ messages in thread From: Alan Mackenzie @ 2018-05-24 19:57 UTC (permalink / raw) To: Yuri Khan; +Cc: van, Eli Zaretskii, Emacs developers, rms, Noam Postavsky Hello, Yuri. On Thu, May 24, 2018 at 23:53:52 +0700, Yuri Khan wrote: > On Thu, May 24, 2018 at 11:38 PM Alan Mackenzie <acm@muc.de> wrote: > > rx.el uses a wordy syntax, somewhat analagously to Cobol 50 years ago. > > Its premiss is that it's the terse, dense, austere characters which make > > a regexp difficult to write and read. I would suggest that it's more > > the abstract concepts which cause beginners difficulties, rather than > > the syntax. This was true of Cobol 50 years ago, and I think it's > > always been the case with regexps. > > That said, rx.el is used ~72 times in 19 files.el in Emacs, so somebody > > likes it. > I like rx.el. :-) > I like it because any reasonably involved rx.el expression will be written > out on multiple lines, indented, and possibly commented; whereas the > equivalent plain regexp will be jumbled up on one long line, or else broken > up into a concat of several arbitrary parts. Yes. But... rx.el needs to be _learnt_. You cannot, at least not yet, learn rx.el as an alternative to normal string regexp syntax, because the string syntax is so common that it _must_ be learnt. So rx.el is an optional extra. It seems unlikely that its use could spread beyond Emacs, so the effort learning rx.el is going to yield special purpose knowledge only. > I like rx.el because its expressions can be navigated structurally, using > ‘backward-up-list’, ‘forward-sexp’, and the like. The same commands work on > regular regular expressions only if they have not been broken up for > readability. What would be useful would be a function to turn normal regexps into rx.el syntax. > I also like rx.el because it allows me to see fewer backslashes, > double-backslashes, and quadruple-backslashes. It's when you start seeing triple backslashes that you need to start worrying. ;-) -- Alan Mackenzie (Nuremberg, Germany). ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-24 19:57 ` Alan Mackenzie @ 2018-05-24 20:24 ` Noam Postavsky 2018-05-24 20:36 ` Off Topic Stefan Monnier 2018-05-25 3:01 ` Off Topic (was: bug#31544) Richard Stallman 2 siblings, 0 replies; 18+ messages in thread From: Noam Postavsky @ 2018-05-24 20:24 UTC (permalink / raw) To: Alan Mackenzie Cc: Van L, Yuri Khan, Eli Zaretskii, Richard Stallman, Emacs developers On 24 May 2018 at 15:57, Alan Mackenzie <acm@muc.de> wrote: > What would be useful would be a function to turn normal regexps into > rx.el syntax. https://github.com/joddie/pcre2el has some handy commands for that. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic 2018-05-24 19:57 ` Alan Mackenzie 2018-05-24 20:24 ` Noam Postavsky @ 2018-05-24 20:36 ` Stefan Monnier 2018-05-25 3:01 ` Off Topic (was: bug#31544) Richard Stallman 2 siblings, 0 replies; 18+ messages in thread From: Stefan Monnier @ 2018-05-24 20:36 UTC (permalink / raw) To: emacs-devel > Yes. But... rx.el needs to be _learnt_. You cannot, at least not yet, > learn rx.el as an alternative to normal string regexp syntax, because > the string syntax is so common that it _must_ be learnt. So rx.el is an > optional extra. It seems unlikely that its use could spread beyond > Emacs, so the effort learning rx.el is going to yield special purpose > knowledge only. Very good point. For me the problem is just that rx.el regexps are too verbose. >> I like rx.el because its expressions can be navigated structurally, using >> ‘backward-up-list’, ‘forward-sexp’, and the like. The same commands work on >> regular regular expressions only if they have not been broken up for >> readability. > What would be useful would be a function to turn normal regexps into > rx.el syntax. http://elpa.gnu.org/packages/lex.html provides the function `lex-parse-re` for that. Stefan ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-24 19:57 ` Alan Mackenzie 2018-05-24 20:24 ` Noam Postavsky 2018-05-24 20:36 ` Off Topic Stefan Monnier @ 2018-05-25 3:01 ` Richard Stallman 2 siblings, 0 replies; 18+ messages in thread From: Richard Stallman @ 2018-05-25 3:01 UTC (permalink / raw) To: Alan Mackenzie; +Cc: van, yurivkhan, eliz, npostavs, emacs-devel [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > What would be useful would be a function to turn normal regexps into > rx.el syntax. That is a good idea. In order to truly serve the purpose, it needs to be code that we can install in Emacs. I wonder if we can make it easier to see the regexp that an rx call stands for. Could we make font lock show this? -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-24 16:53 ` Yuri Khan 2018-05-24 19:57 ` Alan Mackenzie @ 2018-05-25 2:59 ` Richard Stallman 1 sibling, 0 replies; 18+ messages in thread From: Richard Stallman @ 2018-05-25 2:59 UTC (permalink / raw) To: Yuri Khan; +Cc: van, acm, eliz, npostavs, emacs-devel [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] If people are happy with rx.el, maybe our search has ended. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Off Topic (was: bug#31544) 2018-05-24 16:35 ` Off Topic (was: bug#31544) Alan Mackenzie 2018-05-24 16:53 ` Yuri Khan @ 2018-05-24 17:01 ` Eli Zaretskii 1 sibling, 0 replies; 18+ messages in thread From: Eli Zaretskii @ 2018-05-24 17:01 UTC (permalink / raw) To: Alan Mackenzie; +Cc: van, emacs-devel, rms, npostavs > Date: Thu, 24 May 2018 16:35:34 +0000 > Cc: Noam Postavsky <npostavs@gmail.com>, van@scratch.space, eliz@gnu.org, > emacs-devel@gnu.org > From: Alan Mackenzie <acm@muc.de> > > rx.el uses a wordy syntax, somewhat analagously to Cobol 50 years ago. > Its premiss is that it's the terse, dense, austere characters which make > a regexp difficult to write and read. I would suggest that it's more > the abstract concepts which cause beginners difficulties, rather than > the syntax. This was true of Cobol 50 years ago, and I think it's > always been the case with regexps. I actually agree with the premise: reading an rx spec of a regexp is much easier than reading the regexp itself. > That said, rx.el is used ~72 times in 19 files.el in Emacs, so somebody > likes it. I certainly do (but I'm not responsible for those uses). ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2018-05-25 3:01 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <7D0B397D-5D1B-4B8C-93B6-1CA207DD552A@scratch.space> [not found] ` <E1fKwoI-0000Ug-Lv@fencepost.gnu.org> [not found] ` <A424F9A2-E4C4-47CD-A4B4-E9CEB32A60FD@scratch.space> [not found] ` <A2BA1EF2-D393-43D5-8F44-E802DC705C0A@gnu.org> 2018-05-22 6:58 ` Off Topic (was: bug#31544) Van L 2018-05-23 3:24 ` Richard Stallman 2018-05-23 3:44 ` Van L 2018-05-23 11:06 ` Noam Postavsky 2018-05-24 2:48 ` Richard Stallman 2018-05-24 9:03 ` Off Topic Robert Pluim 2018-05-24 15:20 ` Eli Zaretskii 2018-05-24 15:41 ` Robert Pluim 2018-05-24 17:07 ` Eli Zaretskii 2018-05-25 2:59 ` Richard Stallman 2018-05-24 16:35 ` Off Topic (was: bug#31544) Alan Mackenzie 2018-05-24 16:53 ` Yuri Khan 2018-05-24 19:57 ` Alan Mackenzie 2018-05-24 20:24 ` Noam Postavsky 2018-05-24 20:36 ` Off Topic Stefan Monnier 2018-05-25 3:01 ` Off Topic (was: bug#31544) Richard Stallman 2018-05-25 2:59 ` Richard Stallman 2018-05-24 17:01 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git 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 read-only IMAP folder(s) and NNTP newsgroup(s).