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#73431: Add `setf` support for `stream.el` in ELPA Date: Tue, 29 Oct 2024 19:06:14 +0200 Message-ID: <86a5em6dq1.fsf@gnu.org> References: <827cc7fc-10be-4b93-bd67-f275193e5d84@protonmail.com> <87a5fic3om.fsf@posteo.net> <7de379ab-a4f2-4853-96dc-cdf05dd7218e@protonmail.com> <09504d12-9ca6-4b4d-84ff-c7f9d1087192@protonmail.com> <87o73dmp7q.fsf@web.de> <87ed48mgbu.fsf@web.de> <87ttcwimw8.fsf@web.de> <5d5ae196-f7f2-4b30-aafe-daed980680f1@protonmail.com> <87plnjqli7.fsf@web.de> <87ldy7qjs1.fsf@web.de> <861pzz6pvh.fsf@gnu.org> <87zfmnujbd.fsf@web.de> <86h68u6hjk.fsf@gnu.org> <87r07yvqlb.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8138"; mail-complaints-to="usenet@ciao.gmane.io" Cc: okamsn@protonmail.com, philipk@posteo.net, nicolas@petton.fr, monnier@iro.umontreal.ca, 73431@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 29 18:07:25 2024 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 1t5pgi-0001qk-TI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Oct 2024 18:07:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5pgT-0003Y8-EX; Tue, 29 Oct 2024 13:07:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5pgO-0003WW-62 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 13:07:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5pgN-0004pN-BE for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 13:07:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=W7hEPGqMVUpr12G55jfZOFl2P7MAHhA8R8njIErZC6E=; b=SotFt22iMHvcCS4yLSEwRQShEll0FoEmsod9R73z8hfItouZNvuY4DZtHXvWn0iY0+xOBQa+CbrlHS3DsaPyCdXmfmwzfGAkNMBuzRMpyFFCscac+q6BDX13faJdjmsNPBHrabHcsyP+cg7vAagbJyCHrC4Fp2bWM6Xcvnz8UXmlgp4S6bwycxZgJAiGuKbNcCAAzSjiAUUPqsCRmS0nHWJMkmPLdoUXae0+cfp6y0ntrIz8SpS9pbVsD4Ny4BSyRtXN6fRgh8MPZ+g8HFcP7omnLgWUwwDRi0oG3oUxbbNZJvjhHa8lGEaM6PYh0MFx004qpZPtLaB17XAHyZygUA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5pgN-0003E0-4n for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 13:07:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2024 17:07:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73431 X-GNU-PR-Package: emacs Original-Received: via spool by 73431-submit@debbugs.gnu.org id=B73431.173022159112353 (code B ref 73431); Tue, 29 Oct 2024 17:07:03 +0000 Original-Received: (at 73431) by debbugs.gnu.org; 29 Oct 2024 17:06:31 +0000 Original-Received: from localhost ([127.0.0.1]:57473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5pfq-0003DB-4d for submit@debbugs.gnu.org; Tue, 29 Oct 2024 13:06:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5pfn-0003D2-8i for 73431@debbugs.gnu.org; Tue, 29 Oct 2024 13:06:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5pfe-0004nH-7G; Tue, 29 Oct 2024 13:06:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=W7hEPGqMVUpr12G55jfZOFl2P7MAHhA8R8njIErZC6E=; b=WHx73ZxPTtzAUrYUeIcA xtNXfL/YPPgwoqH8DGWS9ePsVsHCcQwvyDGhqp2f/kzPpgzg8wjQOkAV1hEOyJ9L8Ezgr6FNCpi66 zY0vwx3Ws/3NYUqCylx3xjP6xGhXV+0cROqc2Aogsl9WA0tFEYtqbmoYqJPFQ99bC2l5j9HfbfsMP 1jhopLeC2YvyNbVhxWKza98iFuwKhQ/Al/P1klZy4yYNCTwgW5BlBC43zt7JZ2UBNtNVZlYOzzobw QbDOzE7xqRsMpaKorsZr47aMokZkcdBZ/FwZgz31p/6KrgxCS+z1TnSY4H2UlqfsIpdloHUrCdw2k FLhgzrHkHv6taQ==; In-Reply-To: <87r07yvqlb.fsf@web.de> (message from Michael Heerdegen on Tue, 29 Oct 2024 17:09:04 +0100) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294511 Archived-At: > From: Michael Heerdegen > Cc: monnier@iro.umontreal.ca, okamsn@protonmail.com, philipk@posteo.net, > nicolas@petton.fr, 73431@debbugs.gnu.org > Date: Tue, 29 Oct 2024 17:09:04 +0100 > > Eli Zaretskii writes: > > > > So I guess we want to follow the rule here. But then - how to provide > > > the nice example here, without repeating the first sentence of the > > > generic. Any idea? > > > > Can you point me to the doc strings you are talking about, so I could > > see their text and the examples you'd like to keep? > > We are discussing the docstring of the implementation of `seq-mapn' for > streams in "stream.el" (line 342). Thanks. But I'm not sure I understand the problem. If I load both seq.el and stream.el, and then type "C-h f seq-mapn", I see this: seq-mapn is a byte-code-function in ‘seq.el’. (seq-mapn FUNCTION SEQUENCES...) Return the result of applying FUNCTION to each element of SEQUENCEs. Like ‘seq-map’, but FUNCTION is mapped over all SEQUENCEs. The arity of FUNCTION must match the number of SEQUENCEs, and the mapping stops on the shortest sequence. Return a list of the results. This is a generic function. Implementations: (seq-mapn ARG0 (ARG1 stream) &rest CL--ARGS) in ‘~/data/stream-2.3.0/stream.el’. Map FUNCTION over the STREAMS. Example: this prints the first ten Fibonacci numbers: (letrec ((fibs (stream-cons 1 (stream-cons 1 (seq-mapn #’+ fibs (stream-rest fibs)))))) (seq-do #’print (seq-take fibs 10))) (seq-mapn FUNCTION SEQUENCE &rest SEQUENCES) in ‘seq.el’. Undocumented The "Undocumented" part at the end aside, I see both the doc string of defgeneric and the doc string of the implementation for streams, complete with the example. The only aspect of this I'd change is the first line of the doc string for the streams implementation: I'd make it say Implementation of `seq-mapn' for streams. Other than that, everything looks good, and "M-x apropos" shows only the generic function. What problem did you try to solve?