From unknown Tue Aug 19 10:09:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3249: 23.0.93; doc of transpose-subr and transpose-regions Reply-To: "Drew Adams" , 3249@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 09 May 2009 16:00:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 3249 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124188461932696 (code B ref -1); Sat, 09 May 2009 16:00:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 9 May 2009 15:56:59 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.7 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n49FutaG032675 for ; Sat, 9 May 2009 08:56:56 -0700 Received: from mail.gnu.org ([199.232.76.166]:58843 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1M2ov0-0005YV-Tn for emacs-pretest-bug@gnu.org; Sat, 09 May 2009 11:56:55 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1M2ouz-0003vg-FW for emacs-pretest-bug@gnu.org; Sat, 09 May 2009 11:56:54 -0400 Received: from rcsinet11.oracle.com ([148.87.113.123]:45795 helo=rgminet11.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M2ouz-0003vK-4E for emacs-pretest-bug@gnu.org; Sat, 09 May 2009 11:56:53 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n49Fv9W3013857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 9 May 2009 15:57:10 GMT Received: from abhmt004.oracle.com (abhmt004.oracle.com [141.146.116.13]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n49FvCAj005050 for ; Sat, 9 May 2009 15:57:12 GMT Received: from dradamslap1 (/141.144.72.19) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 09 May 2009 08:56:47 -0700 From: "Drew Adams" To: Date: Sat, 9 May 2009 08:56:59 -0700 Message-ID: <009f01c9d0be$ca2f9750$0200a8c0@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcnQvslKHnvRDsGlS6+e6gFvg4UiWg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: abhmt004.oracle.com [141.146.116.13] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4A05A7C0.021A:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) It seems that all transpose functions in Emacs are defined using `transpose-subr'. If you want to define your own transpose function, then you will presumably use `transpose-subr' too. But `transpose-subr' is not even documented, making it that much harder to try to use it to define your own transpose function. Please add a helpful doc string. It's apparently not as simple as providing a `forward-*' function and a numeric arg N to `transpose-subr'. That's what `transpose-chars', `transpose-words', `transpose-paragraphs', and `transpose-sentences do (using `forward-char' etc.), but that apparently is not adequate for `transpose-lines' or `transpose-sexps'. So it would, in particular, be helpful to know just what is needed as the MOVER arg of `transpose-subr'. Also, the Elisp manual, node Transposition, mentions only `transpose-regions', saying that it is used by the transposition commands. But it is not - the transposition commands all use `transpose-subr', and that doesn't even call `transpose-regions' indirectly. `transpose-regions' is used in the Elisp source code in only 4 places, in deuglify.el, mule-diag.el, and hanoi.el - never to define a transpose command. And `transpose-subr' is used in just as many files, not counting simple.el. So what is the correct advice to give Elisp programmers who want to define transpose functions? Shouldn't `transpose-subr' be documented in the Elisp manual, in addition to getting a doc string? Also, why is `transpose-regions' still defined in C code? Is that necessary for performance? In GNU Emacs 23.0.93.1 (i386-mingw-nt5.1.2600) of 2009-05-02 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' From unknown Tue Aug 19 10:09:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3249: 23.0.93; doc of transpose-subr and transpose-regions Reply-To: Andreas =?UTF-8?Q?R=C3=B6hler?= , 3249@debbugs.gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 09 May 2009 20:30:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3249 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3249-submit@emacsbugs.donarmstrong.com id=B3249.124190068115817 (code B ref 3249); Sat, 09 May 2009 20:30:05 +0000 Received: (at 3249) by emacsbugs.donarmstrong.com; 9 May 2009 20:24:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n49KOZL7015789 for <3249@emacsbugs.donarmstrong.com>; Sat, 9 May 2009 13:24:38 -0700 Received: from [192.168.178.27] (p54BE9EC0.dip0.t-ipconnect.de [84.190.158.192]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MKv1o-1M2t5w3Wik-000jMj; Sat, 09 May 2009 22:24:29 +0200 Message-ID: <4A05E6C0.1020009@easy-emacs.de> Date: Sat, 09 May 2009 22:25:36 +0200 From: Andreas =?UTF-8?Q?R=C3=B6hler?= User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: Drew Adams , 3249@debbugs.gnu.org References: <009f01c9d0be$ca2f9750$0200a8c0@us.oracle.com> In-Reply-To: <009f01c9d0be$ca2f9750$0200a8c0@us.oracle.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Provags-ID: V01U2FsdGVkX18UC4yzW+Z0gYGg1Qh8Im+MJyQldGSuzRCCVBx yJMG39hrLnKr4yKBWSR+VyyKZB5Ks8Hb2WajSQaeSFOiyKy2jL psYRwHO+TQTYYQHQdLzzOsBybFonGH/2ATfFEKFjrQ= Drew Adams wrote: > It seems that all transpose functions in Emacs are defined using > `transpose-subr'. If you want to define your own transpose function, > then you will presumably use `transpose-subr' too. > > But `transpose-subr' is not even documented, making it that much > harder to try to use it to define your own transpose function. Please > add a helpful doc string. > > It's apparently not as simple as providing a `forward-*' function and > a numeric arg N to `transpose-subr'. That's what `transpose-chars', > `transpose-words', `transpose-paragraphs', and `transpose-sentences do > (using `forward-char' etc.), but that apparently is not adequate for > `transpose-lines' or `transpose-sexps'. > > So it would, in particular, be helpful to know just what is needed as > the MOVER arg of `transpose-subr'. > > Also, the Elisp manual, node Transposition, mentions only > `transpose-regions', saying that it is used by the transposition > commands. But it is not - the transposition commands all use > `transpose-subr', and that doesn't even call `transpose-regions' > indirectly. > > `transpose-regions' is used in the Elisp source code in only 4 places, > in deuglify.el, mule-diag.el, and hanoi.el - never to define a > transpose command. And `transpose-subr' is used in just as many > files, not counting simple.el. > > So what is the correct advice to give Elisp programmers who want to > define transpose functions? Shouldn't `transpose-subr' be documented > in the Elisp manual, in addition to getting a doc string? > > Also, why is `transpose-regions' still defined in C code? Is that > necessary for performance? > > > In GNU Emacs 23.0.93.1 (i386-mingw-nt5.1.2600) > of 2009-05-02 on SOFT-MJASON > Windowing system distributor `Microsoft Corp.', version 5.1.2600 > configured using `configure --with-gcc (3.4)' > > > > > > > > Would assume sorting faster with transpose-regions' than with present `sort-subr'. Thanks pointing at it. Employed it for the stuff at https://code.launchpad.net/s-x-emacs-werkstatt/ Andreas Röhler From rgm@gnu.org Wed Nov 4 14:01:42 2009 Received: (at control) by emacsbugs.donarmstrong.com; 4 Nov 2009 22:01:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,ONEWORD,VALID_BTS_CONTROL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA4M1e7A002782 for ; Wed, 4 Nov 2009 14:01:42 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1N5nv9-0000E4-Ub; Wed, 04 Nov 2009 17:01:39 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19185.63939.653937.427902@fencepost.gnu.org> Date: Wed, 4 Nov 2009 17:01:39 -0500 From: Glenn Morris To: control Subject: control severity 3631 minor severity 3267 minor reassign 3267 emacsbugs.donarmstrong.com severity 3481 minor severity 3644 minor severity 3722 wishlist severity 4360 minor tags 3613 wontfix tags 2134 = severity 4731 minor severity 3849 wishlist close 3564 merge 4668 3227 tags 2792 wontfix minor severity 4433 minor severity 4668 minor severity 4562 minor severity 3934 minor severity 3856 minor severity 3801 minor severity 3615 minor severity 3599 minor severity 3598 minor severity 3575 minor severity 3566 minor severity 3550 minor severity 3549 minor severity 3527 minor severity 3525 minor severity 3524 minor severity 3523 minor severity 3519 minor severity 3509 minor severity 3503 minor severity 3393 minor severity 3371 minor severity 3320 minor severity 3313 minor severity 3249 minor severity 3227 minor severity 3138 minor severity 3135 minor severity 3137 minor severity 3052 minor severity 3042 minor severity 2974 minor severity 2946 minor severity 2792 minor severity 1749 minor severity 1375 minor severity 1144 minor From unknown Tue Aug 19 10:09:37 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Drew Adams" Subject: bug#3249: closed (Re: 23.0.93; doc of transpose-subr and transpose-regions) Message-ID: References: <87y5sslbt5.fsf@gnu.org> <009f01c9d0be$ca2f9750$0200a8c0@us.oracle.com> X-Gnu-PR-Message: they-closed 3249 X-Gnu-PR-Package: emacs Reply-To: 3249@debbugs.gnu.org Date: Sat, 28 Jan 2012 03:58:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1327723081-13075-1" This is a multi-part message in MIME format... ------------=_1327723081-13075-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #3249: 23.0.93; doc of transpose-subr and transpose-regions which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 3249@debbugs.gnu.org. --=20 3249: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D3249 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1327723081-13075-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 3249-done) by debbugs.gnu.org; 28 Jan 2012 03:57:27 +0000 Received: from localhost ([127.0.0.1]:47274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RqzPr-0003NX-HZ for submit@debbugs.gnu.org; Fri, 27 Jan 2012 22:57:27 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:37811 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RqzPp-0003NP-Jd for 3249-done@debbugs.gnu.org; Fri, 27 Jan 2012 22:57:26 -0500 Received: from bb121-7-229-168.singnet.com.sg ([121.7.229.168]:38663 helo=furball) by fencepost.gnu.org with esmtpa (Exim 4.71) (envelope-from ) id 1RqzP9-0005mv-Dy for 3249-done@debbugs.gnu.org; Fri, 27 Jan 2012 22:56:44 -0500 From: Chong Yidong To: 3249-done@debbugs.gnu.org Subject: Re: 23.0.93; doc of transpose-subr and transpose-regions Date: Sat, 28 Jan 2012 11:56:38 +0800 Message-ID: <87y5sslbt5.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 3249-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) > `transpose-subr' is not even documented, making it that much harder to > try to use it to define your own transpose function. Please add a > helpful doc string. Glenn wrote a docstring for transpose-subr several months ago. Closing. ------------=_1327723081-13075-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 9 May 2009 15:56:59 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.7 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n49FutaG032675 for ; Sat, 9 May 2009 08:56:56 -0700 Received: from mail.gnu.org ([199.232.76.166]:58843 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1M2ov0-0005YV-Tn for emacs-pretest-bug@gnu.org; Sat, 09 May 2009 11:56:55 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1M2ouz-0003vg-FW for emacs-pretest-bug@gnu.org; Sat, 09 May 2009 11:56:54 -0400 Received: from rcsinet11.oracle.com ([148.87.113.123]:45795 helo=rgminet11.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M2ouz-0003vK-4E for emacs-pretest-bug@gnu.org; Sat, 09 May 2009 11:56:53 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n49Fv9W3013857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 9 May 2009 15:57:10 GMT Received: from abhmt004.oracle.com (abhmt004.oracle.com [141.146.116.13]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n49FvCAj005050 for ; Sat, 9 May 2009 15:57:12 GMT Received: from dradamslap1 (/141.144.72.19) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 09 May 2009 08:56:47 -0700 From: "Drew Adams" To: Subject: 23.0.93; doc of transpose-subr and transpose-regions Date: Sat, 9 May 2009 08:56:59 -0700 Message-ID: <009f01c9d0be$ca2f9750$0200a8c0@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcnQvslKHnvRDsGlS6+e6gFvg4UiWg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: abhmt004.oracle.com [141.146.116.13] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4A05A7C0.021A:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) It seems that all transpose functions in Emacs are defined using `transpose-subr'. If you want to define your own transpose function, then you will presumably use `transpose-subr' too. But `transpose-subr' is not even documented, making it that much harder to try to use it to define your own transpose function. Please add a helpful doc string. It's apparently not as simple as providing a `forward-*' function and a numeric arg N to `transpose-subr'. That's what `transpose-chars', `transpose-words', `transpose-paragraphs', and `transpose-sentences do (using `forward-char' etc.), but that apparently is not adequate for `transpose-lines' or `transpose-sexps'. So it would, in particular, be helpful to know just what is needed as the MOVER arg of `transpose-subr'. Also, the Elisp manual, node Transposition, mentions only `transpose-regions', saying that it is used by the transposition commands. But it is not - the transposition commands all use `transpose-subr', and that doesn't even call `transpose-regions' indirectly. `transpose-regions' is used in the Elisp source code in only 4 places, in deuglify.el, mule-diag.el, and hanoi.el - never to define a transpose command. And `transpose-subr' is used in just as many files, not counting simple.el. So what is the correct advice to give Elisp programmers who want to define transpose functions? Shouldn't `transpose-subr' be documented in the Elisp manual, in addition to getting a doc string? Also, why is `transpose-regions' still defined in C code? Is that necessary for performance? In GNU Emacs 23.0.93.1 (i386-mingw-nt5.1.2600) of 2009-05-02 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' ------------=_1327723081-13075-1--