From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Philippe Vaucher Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: transient Date: Sat, 2 May 2020 11:53:07 +0200 Message-ID: References: <87368npxw4.fsf@bernoul.li> <87v9ljo5d0.fsf@bernoul.li> <87ftcnxu5m.fsf@bernoul.li> <83y2qezlpd.fsf@gnu.org> <83tv12zjx1.fsf@gnu.org> <20200429101755.GF24737@tuxteam.de> <838sicw4do.fsf@gnu.org> <83zhaqu89z.fsf@gnu.org> <83sggiu2p9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005d88df05a4a745d4" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="67142"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tomas@tuxteam.de, Richard Stallman , Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 02 11:54:24 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUoql-000HL5-G7 for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 11:54:23 +0200 Original-Received: from localhost ([::1]:42060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUoqk-0000ZT-J8 for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 05:54:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUoq7-00007G-PD for emacs-devel@gnu.org; Sat, 02 May 2020 05:53:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUoq6-0004Lx-RM for emacs-devel@gnu.org; Sat, 02 May 2020 05:53:43 -0400 Original-Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:42635) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUoq1-0004Kr-1g; Sat, 02 May 2020 05:53:38 -0400 Original-Received: by mail-lf1-x12d.google.com with SMTP id j14so5668471lfg.9; Sat, 02 May 2020 02:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dYR5f21xTfDIvWs/9oT4dE5R3m6we7lB0Ss79UXCB2A=; b=FhyOdlZ6CYSUzAPTFh+6wcEDHkpj7iU6PUqB1FiEoAbAPjkvXpUg0IJPRHJmS7DVkK u55drPnNe05sozcvLewZ1i5PCC/XVnsju6lapdjvl3CC7YO5vJb2ghjUIhlvk3biB0gd jb0XsuVVePPI2vwAkPvVNq/+m+4RttYHZht0l+a6dwiuAkE3lt9o79TD7J7In+SCTFu+ m7cI0o3XlQh/X9SY6X2zmed3u/Xcow/s4Rlh8HL35T9z94ACwcDYoDPKJA0Bdaff/Et0 L9ymJ8fTkSAOvvX/382Q0b9gz++62pKuIcXFXkD3qzMS9UoTcJLZtWbgFcMsWKXCuKCv G8xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dYR5f21xTfDIvWs/9oT4dE5R3m6we7lB0Ss79UXCB2A=; b=jqTORnASQtwjlkHPx5P9m725nA4SCV1h8jCsguX+lI/LajWb11Yka5nh2BwvzJ71ZT H6p4k4rH4rGXCXNZzK9PTJANk8+/nufj0PYCfQCOqedcr1LAs04lnOYDmimBNKJ3IH7l JWbjMUCCo80xIrx2y+aZ+ZrnEUJVj01Or/4f9D140Xq0vafRJYM5YYhlpjh0SJ3mqSVo Lli3JfRu3ULZgYW2aPAIflozQuUn+d9Xm7tcP+aSthpEl65eNBhwQD1rPoCAg2A3cO4z lTeH2lQ3qj2r/5qURNtRwiphiGIamzaZTikCuTcaCfuZN3SAuSERV0sn22ABCNI1eOOa 2bFw== X-Gm-Message-State: AGi0PuZWsEDXEAzT08zZyxgQN2JoGYwyBfyPsM4/mMw/hJ5vcFgvx4w2 jRxah/VWx1zcKvIt4+pavbLwyMFzWlp00aIqKyJxd7moutE= X-Google-Smtp-Source: APiQypI4t/LOGzu562hYLQPAcqzuyVCnUL8takUuyGD3/z+Xmr3A9W8kRG35a3ydsgKhAvHLIVu9LX4/eMBB8yJvOFo= X-Received: by 2002:a05:6512:53a:: with SMTP id o26mr5232195lfc.111.1588413213803; Sat, 02 May 2020 02:53:33 -0700 (PDT) In-Reply-To: <83sggiu2p9.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=philippe.vaucher@gmail.com; helo=mail-lf1-x12d.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::12d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:248390 Archived-At: --0000000000005d88df05a4a745d4 Content-Type: text/plain; charset="UTF-8" > > > It doesn't fail, but there are evidently users who want to have that > > information without using the documentation features of Emacs, so any > > solution based on C-h is not acceptable to them. > > > > While there might be some users who think that way, my workflow is > mainly to use `C-h f` to find the help of > > the function I'm interested in. This is where not properly namespaced > libraries are hurting me. > > > > `C-h d` or `apropos` is plan B, and then I have to filter what is > relevant and not, and also because the result > > set of `C-h d` is so big scrolling inside my Emacs becomes sluggish, > which is not pleasant. So usually a this > > point I go online and search, and fall on Xah-Lee's page, EmacsWiki, or > stackoverflow. > > If I may: your strategy is sub-optimal. When looking for a function > whose name you don't know, the first place to look is in the ELisp > manual. Thus, for finding functions that deal with alists, the first > thing to try is "i alist RET" in the ELisp manual. Here "alist" is > not a part of a function's name, it's a topic which you are looking > for. That is much more efficient than the sequence you described > above, because we take special care of having meaningful topics in the > indices of the manual, precisely to help in such situations. (And my > advice is to always have the ELisp manual shown in some frame on your > display, so that you don't even need to type "C-h i" etc. to get to > it.) > Let's try again why this is not an optimal strategy for me: Searching the manual lands me on https://www.gnu.org/software/emacs/manual/html_node/elisp/Association-Lists.html. This is all good, but most of the time I don't need all this introduction, I just really need a curated list of the function names related to the topic I'm searching. When learning this page is really useful but when trying to quickly find what function you need, this page is 95% noise. What happens is that I'll look at each "-- function" part and enter a loop of "not that, skip paragraph" until I find the function I want. If I take that entry manual and then toggle read only and then "M-x keep-lines -- function" I end up with: -- Function: assoc key alist &optional testfn -- Function: rassoc value alist -- Function: assq key alist -- Function: alist-get key alist &optional default remove testfn -- Function: rassq value alist -- Function: assoc-default key alist &optional test default -- Function: copy-alist alist -- Function: assq-delete-all key alist -- Function: assoc-delete-all key alist -- Function: rassq-delete-all value alist That's what I would like to get out of the manual easily. Note that if these were properly namespaced I'd just use "C-h f alist" and be done with it. But keep in mind "alist" is a poor example, regexp are a much better example I think. Let me illustrate. Over 95% of my documentation search is just that (quickly looking at a list of functions). I'm fluent in many languages already, I don't need a regexp (or whatever) introduction with detailed explanations. I just want to find how to do a regexp match and extract the results. When I fall on https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Search.html it takes way too much reading to find `string-match`, and this page doesn't even mention `match-string`! That means I have to do another search and find https://www.gnu.org/software/emacs/manual/html_node/elisp/Simple-Match-Data.html. I'm sure that if you put yourself in my shoes you'd be able to understand my frustration. In the other languages I use (C++, Ruby) I never have that frustration. It looks like that in Clojure or Scheme I'd be happy too. Maybe it's just me and I have a problem with Emacs Lisp, but from looking at the s.el, f.el and dash.el community I believe we are a significant minority. > But at this point I'm completely confused about your central argument, > because my original mentioning of "C-h d" was regarded as missing the > point, and you objected to the very idea of searching the > documentation. Quote: > > > I think "C-h d alist RET" is your friend. > > > > You miss the central point of my argument. The problem is not that the > doc is hard to find, it's that I *have* to find it to know which are the > related functions. > > > > It is much easier for the mind to think in terms of namespaces, here are > examples from other languages: > > So now I'm no confused because my conclusion from the above was that > you don't want to use the documentation features, but you now > evidently disagreed with that conclusion. Sorry. > What I said here is that I have to find that manual entry and read 300 lines of text when I could have had a list of 10 lines to start with. The manual has the information I want, just way too verbose. Also remember that you were talking about "C-h d alist", I think you missed my further explanations of that point, allow me quote myself again: On Wed, Apr 29, 2020 at 3:19 PM Philippe Vaucher wrote: >> >> I think "C-h d alist RET" is your friend. > > To further illustrate my point, this doesn't lists `assq` or `assoc`, both functions being indispensable when using alists. My point is that "C-h d alist" is not sufficient to find assq or assoc, thus while a useful tool it's not very efficient. There's also a lot of noise on that listing when searching something as generic as "alist". I simply want a mechanism where I'm close to 100% certain that I have the whole list of functions related to a topic. Maybe I'm asking for too much, or maybe my way of functionning is "wrong" in the Emacs Lisp world. I'm curious, please tell me more about how you function, maybe Emacs Lisp is your most used language so you know it all by heart? How often do you popup the manual, and how often do you use "C-h f"? Kind regards, Philippe --0000000000005d88df05a4a745d4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>=C2=A0 It doesn't fail, but there are evidently = users who want to have that
>=C2=A0 information without using the documentation features of Emacs, s= o any
>=C2=A0 solution based on C-h is not acceptable to them.
>
> While there might be some users who think that way, my workflow is mai= nly to use `C-h f` to find the help of
> the function I'm interested in. This is where not properly namespa= ced libraries are hurting me.
>
> `C-h d` or `apropos` is plan B, and then I have to filter what is rele= vant and not, and also because the result
> set of `C-h d` is so big scrolling inside my Emacs becomes sluggish, w= hich is not pleasant. So usually a this
> point I go online and search, and fall on Xah-Lee's page, EmacsWik= i, or stackoverflow.

If I may: your strategy is sub-optimal.=C2=A0 When looking for a function whose name you don't know, the first place to look is in the ELisp
manual.=C2=A0 Thus, for finding functions that deal with alists, the first<= br> thing to try is "i alist RET" in the ELisp manual.=C2=A0 Here &qu= ot;alist" is
not a part of a function's name, it's a topic which you are looking=
for.=C2=A0 That is much more efficient than the sequence you described
above, because we take special care of having meaningful topics in the
indices of the manual, precisely to help in such situations.=C2=A0 (And my<= br> advice is to always have the ELisp manual shown in some frame on your
display, so that you don't even need to type "C-h i" etc. to = get to
it.)

Let's try again why this is no= t an optimal strategy for me:

Searching the manual= lands me on=C2=A0https://www.gnu.org/software/emacs/manu= al/html_node/elisp/Association-Lists.html. This is all good, but most o= f the time I don't need all this introduction, I just really need a cur= ated list of the function names related to the topic I'm searching. Whe= n learning this page is really useful but when trying to quickly find what = function you need, this page is 95% noise. What happens is that I'll lo= ok at each "-- function" part and enter a loop of "not that,= skip paragraph" until I find the function I want.

If I take t= hat entry manual and then toggle read only and then "M-x keep-lines --= function" I end up with:

=C2=A0-- Function: assoc= key alist &optional testfn
=C2=A0-- Function: rassoc value alist=C2=A0-- Function: assq key alist
=C2=A0-- Function: alist-get key alis= t &optional default remove testfn
=C2=A0-- Function: rassq value ali= st
=C2=A0-- Function: assoc-default key alist &optional test default=
=C2=A0-- Function: copy-alist alist
=C2=A0-- Function: assq-delete-a= ll key alist
=C2=A0-- Function: assoc-delete-all key alist
=C2=A0-- F= unction: rassq-delete-all value alist

That's wha= t I would like to get out of the manual easily. Note that if these were pro= perly namespaced I'd just use "C-h f alist" and be done with = it. But keep in mind "alist" is a poor example, regexp are a much= better example I think. Let me illustrate.

Over 9= 5% of my documentation search is just that (quickly looking at a list of fu= nctions). I'm fluent in many languages already, I don't need a rege= xp=C2=A0(or whatever) introduction with detailed explanations. I just want = to find how to do a regexp match and extract the results. When I fall on=C2= =A0https://www.gnu.org/software/emacs/manual/html_node/elisp/= Regexp-Search.html=C2=A0it takes way too much reading to find `string-m= atch`, and this page doesn't even mention `match-string`! That means I = have to do another search and find=C2=A0https://www.gnu.o= rg/software/emacs/manual/html_node/elisp/Simple-Match-Data.html. I'= m sure that if you put yourself in my shoes you'd be able to understand= my frustration.

In the other languages I use (C++, Ruby) I never ha= ve that frustration. It looks like that in Clojure or Scheme I'd be hap= py too. Maybe it's just me and I have a problem with Emacs Lisp, but fr= om looking at the s.el, f.el and dash.el community I believe we are a signi= ficant minority.

=C2=A0
But at this point I'm completely confused = about your central argument,
because my original mentioning of "C-h d" was regarded as missing= the
point, and you objected to the very idea of searching the
documentation.=C2=A0 Quote:

>=C2=A0 =C2=A0 =C2=A0I think "C-h d alist RET" is your friend.=
>
> You miss the central point of my argument. The problem is not that the= doc is hard to find, it's that I *have* to find it to know which are t= he related functions.
>
> It is much easier for the mind to think in terms of namespaces, here a= re examples from other languages:

So now I'm no confused because my conclusion from the above was that you don't want to use the documentation features, but you now
evidently disagreed with that conclusion.=C2=A0 Sorry.

What I said here is that I have to find that manual entry a= nd read 300 lines of text when I could have had a list of 10 lines to start= with. The manual has the information I want, just way too verbose.

Also remember that you were talking about "C-h d ali= st", I think you missed my further explanations of that point, allow m= e quote myself again:

On Wed, Apr 29, 2020 at 3:19= PM Philippe Vaucher <phil= ippe.vaucher@gmail.com> wrote:
>>
>> I think "= ;C-h d alist RET" is your friend.
>
> To further illustrat= e my point, this doesn't lists `assq` or `assoc`, both functions being = indispensable when using alists.

My point is t= hat "C-h d alist" is not sufficient to find assq or assoc, thus w= hile a useful tool it's not very efficient. There's also a lot of n= oise on that listing when searching something as generic as "alist&quo= t;. I simply want a mechanism where I'm close to 100% certain that I ha= ve the whole list of functions related to a topic.

Maybe I'm asking for too much, or maybe my way of functionning=C2=A0is= "wrong" in the Emacs Lisp world. I'm curious, please tell me= more about how you function, maybe Emacs Lisp is your most used language s= o you know it all by heart? How often do you popup the manual, and how ofte= n do you use "C-h f"?

Kind regards,
Philippe
--0000000000005d88df05a4a745d4--