unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 17623-done@debbugs.gnu.org, stefan@marxist.se
Subject: bug#17623: 24.4.50; incorrect example for `apply-partially' in (elisp) `Calling Functions'
Date: Sat, 23 Oct 2021 14:39:02 +0300	[thread overview]
Message-ID: <83bl3g55t5.fsf@gnu.org> (raw)
In-Reply-To: <87ee8cyt1m.fsf@web.de> (message from Michael Heerdegen on Sat, 23 Oct 2021 11:44:21 +0200)

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: Eli Zaretskii <eliz@gnu.org>,  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.





  parent reply	other threads:[~2021-10-23 11:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28 23:53 bug#17623: 24.4.50; incorrect example for `apply-partially' in (elisp) `Calling Functions' Drew Adams
2014-06-27 18:41 ` Michael Heerdegen
2014-06-28  1:36   ` Drew Adams
2014-06-28 15:53     ` Michael Heerdegen
2014-06-28 16:55       ` Eli Zaretskii
2014-06-28 17:53         ` Michael Heerdegen
2014-06-28 18:45           ` Eli Zaretskii
2014-06-28 19:37             ` Michael Heerdegen
2014-06-29 14:57               ` Eli Zaretskii
2021-10-23  5:24             ` Stefan Kangas
2021-10-23  9:44               ` Michael Heerdegen
2021-10-23 11:05                 ` Stefan Kangas
2021-10-23 11:58                   ` Michael Heerdegen
2021-10-23 11:39                 ` Eli Zaretskii [this message]
2021-10-23 12:44                   ` Michael Heerdegen
2021-10-23 13:13                     ` Eli Zaretskii
2021-10-23 15:29                       ` Michael Heerdegen
2021-10-23 17:01                         ` Stefan Kangas
2021-10-26  9:26                           ` Michael Heerdegen
2021-10-26 20:24                             ` Stefan Kangas
2021-10-27  9:18                               ` Michael Heerdegen
2021-10-29  4:02                               ` Richard Stallman
2021-10-29 10:00                                 ` Michael Heerdegen
2021-10-23 17:54                         ` Eli Zaretskii
2021-10-23 13:14                     ` Stefan Kangas
2021-10-23 15:38                       ` Michael Heerdegen
2021-10-23 17:57                         ` Eli Zaretskii
     [not found]           ` <<83tx746fgd.fsf@gnu.org>
2014-06-28 19:32             ` Drew Adams
2014-06-29 21:46           ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bl3g55t5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17623-done@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).