From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.devel Subject: Re: Add function to rotate/transpose all windows Date: Wed, 25 Sep 2024 04:00:40 +0200 Message-ID: <87jzf0v6ev.fsf@dataswamp.org> References: <87setpdv21.fsf@gmail.com> <17501184-0483-48EB-AAA1-D3B84F5F9A6F@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16233"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Cancel-Lock: sha1:b7BnNqPanxLUidVJFgz5cWCwJDs= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 25 04:23:30 2024 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 1stHgf-00045c-UK for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Sep 2024 04:23:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stHfv-0002CQ-8n; Tue, 24 Sep 2024 22:22:43 -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 1stHKm-0006Jq-Sz for emacs-devel@gnu.org; Tue, 24 Sep 2024 22:00:52 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stHKl-00071i-5T for emacs-devel@gnu.org; Tue, 24 Sep 2024 22:00:52 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1stHKi-0003lD-1H for emacs-devel@gnu.org; Wed, 25 Sep 2024 04:00:48 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 24 Sep 2024 22:22:42 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324048 Archived-At: Charles Choi wrote: > As a side note, I received an issue that a package that > I had recently published on MELPA required a dependency on > transpose-frame. Investigating further, it seems that > transpose-frame was ad-hoc packaged and it is unclear who > actually maintains this code. > > https://github.com/emacsorphanage/transpose-frame/blob/master/transpose-frame.el > > My observation is that what transpose-frame is trying to do > is so useful, that it would nice to have such behavior be > "built-in" to Emacs core. I am not saying that this package > should be included "as-is" though. I leave it to the core > team to determine how to best implement this behavior. There is a lot of transpose already in core Emacs: transpose-chars transpose-lines transpose-paragraphs transpose-regions transpose-sentences transpose-sexps transpose-sexps-default-function transpose-subr transpose-subr-1 transpose-words Slime has a general list transposer: (defun slime-transpose-lists (list-of-lists) (let ((ncols (length (car list-of-lists)))) (cl-loop for col-index below ncols collect (cl-loop for row in list-of-lists collect (elt row col-index))))) And I have a transposer that works for nested elements, here: https://dataswamp.org/~incal/bad/class/elem/bad-rotate.el -- underground experts united https://dataswamp.org/~incal