unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs]  fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’
       [not found] ` <20180511165051.022C820545@vcs0.savannah.gnu.org>
@ 2018-05-12 15:01   ` Stefan Monnier
  2018-05-13 17:46     ` Thien-Thi Nguyen
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2018-05-12 15:01 UTC (permalink / raw)
  To: emacs-devel; +Cc: Thien-Thi Nguyen

>     do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’

Hmm... I think this text should be changed to use the term "pattern" for
"U(-)pattern".  I did that in pcase's docstring when I introduced the
pcase-defmacro.


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Emacs-diffs]  fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’
  2018-05-12 15:01   ` [Emacs-diffs] fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’ Stefan Monnier
@ 2018-05-13 17:46     ` Thien-Thi Nguyen
  2018-05-15 15:40       ` Michael Heerdegen
  0 siblings, 1 reply; 8+ messages in thread
From: Thien-Thi Nguyen @ 2018-05-13 17:46 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]


() Stefan Monnier <monnier@IRO.UMontreal.CA>
() Sat, 12 May 2018 11:01:16 -0400

   Hmm... I think this text should be changed to use the term
   "pattern" for "U(-)pattern".

I've come around to this pov as well.  See latest commits.

WRT Q-pattern:

My understanding is that `QPAT is an "extension" in deed (since
it's implemented via ‘pcase-defmacro’), but perhaps "innate" in
spirit.  I moved the "structural pattern" stuff to the

 (pcase-defmacro \` (qpat) ...)

docstring and added a comment in ‘pcase--make-docstring’ (but
have not changed any code).  I think if we can get `QPAT to be
first in the extensions docs (in *Help*), this would satisfy
both the maintainability best practice (keep documentation near
its code) and the user experience best practice (good flow,
ordering).

What do people think?

-- 
Thien-Thi Nguyen -----------------------------------------------
 (defun responsep (query)
   (pcase (context query)
     (`(technical ,ml) (correctp ml))
     ...))                              748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Emacs-diffs]  fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’
  2018-05-13 17:46     ` Thien-Thi Nguyen
@ 2018-05-15 15:40       ` Michael Heerdegen
  2018-05-15 18:29         ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2018-05-15 15:40 UTC (permalink / raw)
  To: emacs-devel

Thien-Thi Nguyen <ttn@gnu.org> writes:

> [...]  I think if we can get `QPAT to be first in the extensions docs
> (in *Help*), this would satisfy both the maintainability best practice
> (keep documentation near its code) and the user experience best
> practice (good flow, ordering).
>
> What do people think?

Absolutely agreed.

Now that the result of `pcase--make-docstring' grows longer and longer,
maybe the naive `mapatoms' is not so nice anyway, it could need some
better order/ some structure.


Michael.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Emacs-diffs]  fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’
  2018-05-15 15:40       ` Michael Heerdegen
@ 2018-05-15 18:29         ` Stefan Monnier
  2018-05-16 19:17           ` Thien-Thi Nguyen
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2018-05-15 18:29 UTC (permalink / raw)
  To: emacs-devel

> Now that the result of `pcase--make-docstring' grows longer and longer,
> maybe the naive `mapatoms' is not so nice anyway, it could need some
> better order/ some structure.

Agreed.


        Stefan




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Emacs-diffs]  fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’
  2018-05-15 18:29         ` Stefan Monnier
@ 2018-05-16 19:17           ` Thien-Thi Nguyen
  2018-05-18 12:51             ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Thien-Thi Nguyen @ 2018-05-16 19:17 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]


() Stefan Monnier <monnier@iro.umontreal.ca>
() Tue, 15 May 2018 14:29:33 -0400

   > Now that the result of `pcase--make-docstring' grows longer
   > and longer, maybe the naive `mapatoms' is not so nice
   > anyway, it could need some better order/ some structure.

   Agreed.

Please see commit 4cf4faa888.  Works for me (light testing).

I retained ‘mapatoms’, but split the processing into two phases,
separated by a "yank backquote to head".  What could be better
than ‘mapatoms’, i wonder?

-- 
Thien-Thi Nguyen -----------------------------------------------
 (defun responsep (query)
   (pcase (context query)
     (`(technical ,ml) (correctp ml))
     ...))                              748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Emacs-diffs]  fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’
  2018-05-16 19:17           ` Thien-Thi Nguyen
@ 2018-05-18 12:51             ` Stefan Monnier
  2018-05-18 16:16               ` Thien-Thi Nguyen
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2018-05-18 12:51 UTC (permalink / raw)
  To: emacs-devel

> I retained ‘mapatoms’, but split the processing into two phases,
> separated by a "yank backquote to head".  What could be better
> than ‘mapatoms’, i wonder?

Lexicographic sorting?


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Emacs-diffs]  fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’
  2018-05-18 12:51             ` Stefan Monnier
@ 2018-05-18 16:16               ` Thien-Thi Nguyen
  2018-05-18 22:13                 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Thien-Thi Nguyen @ 2018-05-18 16:16 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]


() Stefan Monnier <monnier@IRO.UMontreal.CA>
() Fri, 18 May 2018 08:51:30 -0400

   > I retained ‘mapatoms’, but split the processing into two
   > phases, separated by a "yank backquote to head".  What
   > could be better than ‘mapatoms’, i wonder?

   Lexicographic sorting?

The patch retains ‘mapatoms’ use for the first phase, collecting
all the symbols (and their associated macroexpanders) that have
‘pcase’-related documentation to display.  I don't see a cleaner
way to do that collection than ‘mapatoms’, do you?

-- 
Thien-Thi Nguyen -----------------------------------------------
 (defun responsep (query)
   (pcase (context query)
     (`(technical ,ml) (correctp ml))
     ...))                              748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Emacs-diffs]  fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’
  2018-05-18 16:16               ` Thien-Thi Nguyen
@ 2018-05-18 22:13                 ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2018-05-18 22:13 UTC (permalink / raw)
  To: emacs-devel

> The patch retains ‘mapatoms’ use for the first phase, collecting
> all the symbols (and their associated macroexpanders) that have
> ‘pcase’-related documentation to display.  I don't see a cleaner
> way to do that collection than ‘mapatoms’, do you?

Oh, sorry I didn't understand it first time: indeed, `mapatoms` is the
way to collect the entries and there's basically no other.


        Stefan




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-05-18 22:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20180511165048.32157.10695@vcs0.savannah.gnu.org>
     [not found] ` <20180511165051.022C820545@vcs0.savannah.gnu.org>
2018-05-12 15:01   ` [Emacs-diffs] fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’ Stefan Monnier
2018-05-13 17:46     ` Thien-Thi Nguyen
2018-05-15 15:40       ` Michael Heerdegen
2018-05-15 18:29         ` Stefan Monnier
2018-05-16 19:17           ` Thien-Thi Nguyen
2018-05-18 12:51             ` Stefan Monnier
2018-05-18 16:16               ` Thien-Thi Nguyen
2018-05-18 22:13                 ` Stefan Monnier

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).