From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17623: 24.4.50; incorrect example for `apply-partially' in (elisp) `Calling Functions' Date: Sat, 23 Oct 2021 14:39:02 +0300 Message-ID: <83bl3g55t5.fsf@gnu.org> References: <9fd43ff1-d6cf-4ac6-b173-2fd634f45a98@default> <871tua2o12.fsf@web.de> <1ac7ebe5-6b43-4367-beb8-df7d9f5b6750@default> <87tx75ni8k.fsf@web.de> <8338ep6kk1.fsf@gnu.org> <87pphsor8h.fsf@web.de> <83tx746fgd.fsf@gnu.org> <87ee8cyt1m.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18143"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 17623-done@debbugs.gnu.org, stefan@marxist.se To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 23 13:40:59 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1meFOU-0004WT-MN for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 13:40:58 +0200 Original-Received: from localhost ([::1]:43272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meFOT-0001Z8-B5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 07:40:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meFNf-0001YH-68 for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 07:40:14 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meFNe-00044U-7O for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 07:40:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1meFNd-00076Q-TL for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 07:40:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Oct 2021 11:40:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17623 X-GNU-PR-Package: emacs Original-Received: via spool by 17623-done@debbugs.gnu.org id=D17623.163498916227240 (code D ref 17623); Sat, 23 Oct 2021 11:40:05 +0000 Original-Received: (at 17623-done) by debbugs.gnu.org; 23 Oct 2021 11:39:22 +0000 Original-Received: from localhost ([127.0.0.1]:34520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meFMw-00075I-2s for submit@debbugs.gnu.org; Sat, 23 Oct 2021 07:39:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meFMu-000755-IM for 17623-done@debbugs.gnu.org; Sat, 23 Oct 2021 07:39:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58390) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meFMo-0003hL-Ub; Sat, 23 Oct 2021 07:39:15 -0400 Original-Received: from [87.69.77.57] (port=1848 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meFMo-00033q-Gi; Sat, 23 Oct 2021 07:39:14 -0400 In-Reply-To: <87ee8cyt1m.fsf@web.de> (message from Michael Heerdegen on Sat, 23 Oct 2021 11:44:21 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217972 Archived-At: > From: Michael Heerdegen > Cc: Eli Zaretskii , 17623-done@debbugs.gnu.org > Date: Sat, 23 Oct 2021 11:44:21 +0200 > > I disagree. The paragraph in the manual explains what the arity of the > function returned by `apply-partially' would be. > > Directly following is an example suggesting that (apply-partially '+ 1) > is equivalent to #'1+ - which obviously contradicts that preceding > paragraph. In what sense is that a contradiction? (+ 1 10) is equivalent to (1+ 10), so we have N = 2 arguments in the original function and M = 1 = N - 1 in the new one. > I'm a bit confused that you don't consider this a problem, and also that > you said there were no concrete suggestions. That suggestion doesn't make the documentation more clear, IMNSHO, unless the reader already knows about apply-partially and generally has a lot of background knowledge about Lisp and Emacs Lisp. Why are you saying the suggestion is not being considered, whereas in reality it was considered (and rejected)? > There were concrete suggestions for improvements. One was to simply > spell out the function that is constructed. It is only one line, and > would make the semantics clear. I cannot disagree more. That one line doesn't make anything clear, it just shows the implementation. > BTW, whenever I posted an example using `apply-partially', Stefan told > me that it would be more efficient to write out the lambda. That aspect > could also be covered: when is worth using? Concrete proposals for expanding the documentation of apply-partially (read: patches) will be most welcome, of course. > Or delete that paragraph, better to say nothing than to confuse readers. I object to deleting that. That text certainly helps me, so it cannot be useless, let alone harmful.