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 12:56:41 +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> <83r1w2u20y.fsf@gnu.org> <83lfmatym6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bd3fa205a4a82893" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="68149"; 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 12:57:51 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 1jUpqA-000Hba-PD for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 12:57:50 +0200 Original-Received: from localhost ([::1]:45800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUpq9-0008Hz-Kr for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 06:57:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUppc-00072T-Bm for emacs-devel@gnu.org; Sat, 02 May 2020 06:57:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUppb-0007fx-IA for emacs-devel@gnu.org; Sat, 02 May 2020 06:57:16 -0400 Original-Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:42091) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUppX-0007YP-OX; Sat, 02 May 2020 06:57:11 -0400 Original-Received: by mail-lj1-x235.google.com with SMTP id a21so4878341ljb.9; Sat, 02 May 2020 03:57:10 -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=UhHMxlZEiybyjPxr77Cp1IqsSdD1tTMNceNWctyzEo0=; b=rnEuPXrk5zaA5CILvj0iz8OogAoRDZhjMo51qNHmKIDWkODH2A56z9L4EUb9eh8piy dJqb3xd2smIQRhZQN4srI7dfO6828BYTkx4A8OTrmIS49rrCsbIKX60O0Uzd99QJcYPH FF2m0qmmhBXLxKqExXJGRHGO8tXRF56R14EBNkNXtx31EBg2HICaY/Q91wU9sv5Zsoyo /gAjMH3TLl2zoDgk8mIDuECuTJdRlPZq+PPI60TN67N58EOB8lHLJy78OOPqGtFwAAIR cJfHBZB3li7w4WoQE9+SFTh0/avIGQaDwUY1QeghvMcwL/96bdbLpS+e2egIlqtIhm7L uOfw== 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=UhHMxlZEiybyjPxr77Cp1IqsSdD1tTMNceNWctyzEo0=; b=tylMevgbnHWwMCMYNrDjdz4YkWbULvLwWNmmsgBfMFa6h/Z9Xi9beOIayOFO9sZ2bg fAEOCi3Ow9DAplAVUrBsyyaLuGVVhFPm8rVGVnar5vfGT2hxVyYsW4Hv6fgZcDNxrJgd /XGe9UecexescvZAlC6KgJ8v/Pj/4bMW6NRqRaS17WLqHgsPFcEMdPoCi1d/2bjg1PXL EtK6ddofB6X7qAd/+AUxlFhsz4xRxeRrVPPKNKcHPz0IvsmrryjH8BidH17OBzRwQVSJ BVvigOef5bkhcoeSLxV4Hrs8373muBGy5g7Kp5vwGrFaeQC5s9W1usZfWDzShWVzPiWN c1cA== X-Gm-Message-State: AGi0PuY1kg5JhU8ydZyppUYeAeezJA2r2OvmGRmCpE1HOMoBCZlDZcoU 9OY5TRGa47hLM8FQZaLCHGCDI1BlmOeFHe3qBelGX18z X-Google-Smtp-Source: APiQypKEHMLzdXsHjl+vHjK+1l5+nK9M5u1fngUxAa40C6pI8Q8rQrpH8A6jfUahwmxLVDnAdsVyjq/MlRgrdn9fFTw= X-Received: by 2002:a2e:7e04:: with SMTP id z4mr5010641ljc.50.1588417028504; Sat, 02 May 2020 03:57:08 -0700 (PDT) In-Reply-To: <83lfmatym6.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=philippe.vaucher@gmail.com; helo=mail-lj1-x235.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::235 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:248399 Archived-At: --000000000000bd3fa205a4a82893 Content-Type: text/plain; charset="UTF-8" > > > My original use case is: I want to copy an association list, I know the > function will probably have "copy" in its > > name and "alist", let's C-h f for "alist TAB" and fail because no > results. Start again with "copy TAB" and filter > > the lots of "copy-*" function until I find copy-alist. > > "C-u C-h a copy alist RET" finds that function as the single hit. As > does "C-u C-h a alist copy RET". > Right, that works well. Thanks. It's not the most obvious keybinding but "C-h d copy alist" also works. > > Now imagine if this particual function was named "asscpy" > > instead how frustrated I'd be :-) > > You will be frustrated because you use the wrong command. "C-h f" is > not your friend unless you have a very good idea of the function's > name. That's why "apropos" family of commands were invented: to help > you find something you don't know by name. There's a best tool for > each job, and "C-h f" is not a good tool for this job. > > But I already said that, several times. And since you still disagree, > then I must insist that my response to Richard was spot-on: he asked > why doesn't "C-h d" do the job, and my response was, in a nutshell, > that what "C-h d" does is not relevant for you and other users who > think and are accustomed to work like you do. You disagreed with my > conclusion, but we now made one more full circle, and established that > my conclusion was correct after all. > I think we are mixing two concepts here. To search for a single function, where you already know the keywords, yes "C-h d" works. To get a curated list of the API of a topic, not so much. Because my examples mix both finding a specific function and getting the curated list, I guess we were each talking about the specific function example and I want talking about the curated list. I still think "C-h d alist", because it does not give me assq and assoc is not doing a good job. Because alist is controversial let's take "C-h d regexp match": it does not give me string-match nor match-string. If I search for "regex match" then I find match-string. But overall I understand your point better now, you are not supposed to use "C-h d" to get a curated list of the api of a topic, it's just to find a single function. For that I agree it's a good tool. > > Also imagine how self-documenting and self-discoverable Emacs Lisp would > > be if things where properly namespaced, like we ask for all packages to > be on MELPA/ELPA and friends. > > I'm not objected to have aliases that would make it easier to find out > the function's name using simple completion, but I think you greatly > overestimate the usefulness of that in many practical situations. > Meanwhile there are existing features designed specifically for these > use cases, which do their job much more efficiently _today_, and you > choose to disregard them or treat them as second-class citizens. I > think it's a mistake, but I can only make suggestions and point out > that those features do exist. > I'm still not very satisfied about the tools you showed for listing an overview of the API to manipulate regexp, or files, or processes (etc). What you are basically saying is that wanting to have this overview is overrated, but for me it helps me understand the landscape of how the API works and is designed. What functions would be available should I need them in the future, what parts is missing, etc. For now the only tool I have is the manual page with "M-x keep-lines -- function". > > As said earlier, probably that my way of thinking is not common around > here, but I'd not be surprised if it was > > common for many developpers, maybe outside Emacs Lisp. > > My earnest advice for those developers is to try the features I > mentioned, they might find them useful in situations similar to the > one you described, and they might then decide to use them more than > what they do today. > I'll certainly start to use it more. Thanks, Philippe --000000000000bd3fa205a4a82893 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> My original use case is: I want to copy an associat= ion list, I know the function will probably have "copy" in its > name and "alist", let's C-h f for "alist TAB" = and fail because no results. Start again with "copy TAB" and filt= er
> the lots of "copy-*" function until I find copy-alist.

"C-u C-h a copy alist RET" finds that function as the single hit.= =C2=A0 As
does "C-u C-h a alist copy RET".

<= div>Right, that works well. Thanks. It's not the most obvious keybindin= g but "C-h d copy alist" also works.

=C2= =A0
> Now imagine= if this particual function was named "asscpy"
> instead how frustrated I'd be :-)

You will be frustrated because you use the wrong command.=C2=A0 "C-h f= " is
not your friend unless you have a very good idea of the function's
name.=C2=A0 That's why "apropos" family of commands were inve= nted: to help
you find something you don't know by name.=C2=A0 There's a best too= l for
each job, and "C-h f" is not a good tool for this job.

But I already said that, several times.=C2=A0 And since you still disagree,=
then I must insist that my response to Richard was spot-on: he asked
why doesn't "C-h d" do the job, and my response was, in a nut= shell,
that what "C-h d" does is not relevant for you and other users wh= o
think and are accustomed to work like you do.=C2=A0 You disagreed with my conclusion, but we now made one more full circle, and established that
my conclusion was correct after all.

I = think we are mixing two concepts here. To search for a single function, whe= re you already know the keywords, yes "C-h d" works. To get a cur= ated list of the API of a topic, not so much. Because my examples mix both = finding a specific function and getting the curated list, I guess we were e= ach talking about the specific function example and I want talking about th= e curated list.

I still think "C-h d alist&qu= ot;, because it does not give me assq and assoc is not doing a=C2=A0good jo= b.

Because alist is controversial let's take &= quot;C-h d regexp match": it does not give me string-match nor match-s= tring. If I search for "regex match" then I find match-string.

But overall I understand your point better now, you = are not supposed to use "C-h d" to get a curated list of the api = of a topic, it's just to find a single function. For that I agree it= 9;s a good tool.

=C2=A0
> Also imagine how self-documenting and sel= f-discoverable Emacs Lisp would
> be if things where properly namespaced, like we ask for all packages t= o be on MELPA/ELPA and friends.

I'm not objected to have aliases that would make it easier to find out<= br> the function's name using simple completion, but I think you greatly overestimate the usefulness of that in many practical situations.
Meanwhile there are existing features designed specifically for these
use cases, which do their job much more efficiently _today_, and you
choose to disregard them or treat them as second-class citizens.=C2=A0 I think it's a mistake, but I can only make suggestions and point out
that those features do exist.

I'm s= till not very satisfied about the tools you showed for listing an overview = of the API to manipulate regexp, or files, or processes (etc). What you are= basically saying is that wanting to have this overview is overrated, but f= or me it helps me understand the landscape of how the API works and is desi= gned. What functions would be available should I need them in the future, w= hat parts is missing, etc.

For now the only tool I= have is the manual page with "M-x keep-lines -- function".
=

=C2=A0
> As said earlier, probably that my way of thinking is not common= around here, but I'd not be surprised if it was
> common for many developpers, maybe outside Emacs Lisp.

My earnest advice for those developers is to try the features I
mentioned, they might find them useful in situations similar to the
one you described, and they might then decide to use them more than
what they do today.

I'll certainly = start to use it more.=C2=A0

Thanks,
Phil= ippe
--000000000000bd3fa205a4a82893--