From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Transpose-words or transpose-sexps change? Date: Sat, 17 Dec 2022 13:36:50 +0100 Message-ID: <87h6xutdel.fsf@thornhill.no> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33316"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 17 13:37:40 2022 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 1p6WRf-0008RG-5v for ged-emacs-devel@m.gmane-mx.org; Sat, 17 Dec 2022 13:37:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6WR1-0004HS-6b; Sat, 17 Dec 2022 07:36:59 -0500 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 1p6WQy-0004H1-RY for emacs-devel@gnu.org; Sat, 17 Dec 2022 07:36:57 -0500 Original-Received: from out-55.mta0.migadu.com ([91.218.175.55]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6WQw-00016c-PN for emacs-devel@gnu.org; Sat, 17 Dec 2022 07:36:56 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1671280612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=a9EkeBL4Q/ZaeVYBx/acpW/hp28ZfgSSwBE5VsgU5J0=; b=vQcVK2InFet59qqmCaz1eIWggwPrcXhNs6Re+IGT14GZQ9jr8MtQkDiy+sc92aTHgwp9Nn 7mWH+iRLhkIDDSyVRh6m292chID3w0AFjmzaA5FLLtJRazATbcK4FQZLQjEpPcyOR734x6 rYzBZbt0YnHWqW+0lqk0TloF+puNSkbAmvKdl2MG+/3eHwIQsj3IGxnvhkG6OaFDtGWnzT 5vGlm3difZZOAJ0aWGOudPSmFpjHQqYPl2fFcQk+c4+yDNmb+Cfs2StihyDkAm8Gz3HMJ3 7F6Z36OXJtCcZ31Qv6fxNqkP1DqxWh18qbIibM/itYIm3MuyYQoxMXZP0p15PA== X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.55; envelope-from=theo@thornhill.no; helo=out-55.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:301558 Archived-At: Hi! In the current Emacs master, 'transpose-words' has a fixme: ;; FIXME: `foo a!nd bar' should transpose into `bar and foo'. To me this looks like a job for transpose-sexps, not transpose-words. Would you consider a patch to transpose-sexps that would behave like this: 1. `foo a!nd bar' should transpose into `bar and foo'. 2. `foo !and bar' should transpose into `and foo bar'. 3. `foo! and bar' should transpose into `and foo bar'. 4. `foo a!nd bar baz' should transpose into `baz and bar foo'. (if prefix arg is 2) I plan to make the function to create the input points for 'transpose-subr-1' such as this for case 1: foo a|nd bar ^ ^ ^ ^ instead of: foo a|nd bar ^ ^^ ^ What do you think? Would this have some adverse impact to other languages, such as lisp or others? Theo