From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Francis Belliveau Newsgroups: gmane.emacs.help Subject: Re: Keybinding to transpose current line with next line Date: Tue, 22 Sep 2020 15:39:36 -0400 Message-ID: <05AE0910-27F2-48DF-AC48-5AB787BF5827@comcast.net> References: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21015"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 22 21:40:41 2020 Return-path: Envelope-to: geh-help-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 1kKo9Z-0005Mm-0S for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 22 Sep 2020 21:40:41 +0200 Original-Received: from localhost ([::1]:54628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKo9Y-0003qA-1H for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 22 Sep 2020 15:40:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKo8f-0003nQ-Ls for help-gnu-emacs@gnu.org; Tue, 22 Sep 2020 15:39:45 -0400 Original-Received: from resqmta-ch2-05v.sys.comcast.net ([2001:558:fe21:29:69:252:207:37]:42434) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKo8c-0002kj-PG for help-gnu-emacs@gnu.org; Tue, 22 Sep 2020 15:39:44 -0400 Original-Received: from resomta-ch2-01v.sys.comcast.net ([69.252.207.97]) by resqmta-ch2-05v.sys.comcast.net with ESMTP id Ko3skWNIdHdxAKo8ZkRfjI; Tue, 22 Sep 2020 19:39:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1600803579; bh=oGT4f9YaSqxVB2ORToqVZYAffcwifjYb0P0v3spMT8s=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To; b=yskyh3VVUXsyYrB3ZwX8/0oH8Z18mH6/aj7yrk0KQboqutg4GNJYMgqbmlTKG9Yr2 n8avPNCfy95jRqryduPVkeR3S0BmkPnAVLrTngwxhp4/DMJPz6JYHAVCi/QQRDyVdr CXZ4+pY1RJIZvKTflpAmO8paXQYA0nzHVJbRkyrm06+VR0ZYpw/z5bQsVCY/CZ7hVc VT8grptFaI0ZJTgduESBFVF3wInZWYSfZ5o+a4vAQOOGvP7lJ74kN8N9v970qr1HgI +S5NOEbcdxnj1Fx9IB2auQA+/heKfNaupwINgfZUyS37whHSUiKtlpmTEULBYtpiXD /QF40XilBeXGQ== Original-Received: from [192.168.1.105] ([73.119.168.97]) by resomta-ch2-01v.sys.comcast.net with ESMTPSA id Ko8WkLnNa893HKo8YkOxOe; Tue, 22 Sep 2020 19:39:39 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedujedrudeggddufeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurheptggguffhrfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpefhrhgrnhgtihhsuceuvghllhhivhgvrghuuceofhdrsggvlhhlihhvvggruhestghomhgtrghsthdrnhgvtheqnecuggftrfgrthhtvghrnhepueehleffuefhveetffejgeejheegjedvheduvedvkeejfeeggefgueehhefgleeknecukfhppeejfedrudduledrudeikedrleejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplgduledvrdduieekrddurddutdehngdpihhnvghtpeejfedrudduledrudeikedrleejpdhmrghilhhfrhhomhepfhdrsggvlhhlihhvvggruhestghomhgtrghsthdrnhgvthdprhgtphhtthhopeguihhmvggthhesghhmgidrtghomhdprhgtphhtthhopehhvghlphdqghhnuhdqvghmrggtshesghhnuhdrohhrgh X-Xfinity-VMeta: sc=-100.00;st=legit X-Priority: 3 In-Reply-To: X-Mailer: Apple Mail (2.3608.120.23.2.1) Received-SPF: pass client-ip=2001:558:fe21:29:69:252:207:37; envelope-from=f.belliveau@comcast.net; helo=resqmta-ch2-05v.sys.comcast.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/22 15:39:39 X-ACL-Warn: Detected OS = ??? 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, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124144 Archived-At: You could either bind a macro or create a simple elisp function that = moves to the next line first. It could also move to previous afterward if you feel that it = appropriate. C-n C-t or C-n C-t C-p > On Sep 22, 2020, at 10:31, Christopher Dimech wrote: >=20 >=20 > I have written the following keybinding to swap lines. If I have > the cursor on one line, the command swaps the current line with > the previous line. What can I do for the keybinding to swap > the current line with the next line, rather than with the previous = one. >=20 > (global-set-key (kbd "C-t l") 'transpose-lines) >=20 >=20 >=20