From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: DWIM when yanking strings with leading or trailing spaces - an idea Date: Fri, 04 Mar 2016 10:11:41 +0100 Message-ID: <874mcmobea.fsf@mbork.pl> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1457083066 6761 80.91.229.3 (4 Mar 2016 09:17:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Mar 2016 09:17:46 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Joost Kremers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 04 10:17:34 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ablrV-0004Bo-Kb for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Mar 2016 10:17:29 +0100 Original-Received: from localhost ([::1]:39805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ablrU-0006bW-Tb for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Mar 2016 04:17:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ablrA-0006ZM-5R for help-gnu-emacs@gnu.org; Fri, 04 Mar 2016 04:17:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ablr6-0005p1-1u for help-gnu-emacs@gnu.org; Fri, 04 Mar 2016 04:17:08 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:40418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ablr5-0005ov-SV for help-gnu-emacs@gnu.org; Fri, 04 Mar 2016 04:17:03 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id E8B4E9D2003; Fri, 4 Mar 2016 10:11:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U69-UGLUpypR; Fri, 4 Mar 2016 10:11:57 +0100 (CET) Original-Received: from localhost (unknown [62.3.162.129]) by mail.mojserwer.eu (Postfix) with ESMTPSA id EE9439D2002; Fri, 4 Mar 2016 10:11:56 +0100 (CET) User-agent: mu4e 0.9.13; emacs 25.1.50.6 In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 195.110.48.8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109434 Archived-At: On 2016-03-04, at 09:50, Joost Kremers wrote: > EN:SiS(9) > Marcin Borkowski wrote: >> OK, I can also prove that every permutation can be decomposed into >> a superposition of transpositions. >> >> ;-) > > By all means. ;-) > > I just wanted to say (but perhaps I should actually have said it ;-) > that I personally rarely find myself wishing Emacs would insert that > extra space. I either use transpose-words couple of times, with or > without prefix arguments, or I kill the relevant word together with a > space before or after and yank it in such a way that that space is in > the right position. (I admit I get it wrong sometimes...) And in my case, the problem happens more often. The reason is that I work in a journal as a copyeditor/proofreader, and I move around whole clauses quite a lot. > What I do run into from time to time, is wanting to transpose clauses > within a sentence and having to manually adjust the punctuation and > possibly an "and" or an "or". But I suspect we'll have to plug Emacs > into Skynet first before it can be taught to autocorrect such cases. In one case, it's easy: I have a function which inserts a dash, killing any other punctuation in that place, and if region is active, it surrounds it with dashes. /Extremely/ useful. Also, this: http://mbork.pl/2015-10-31_Smart_comma_and_other_punctuation . > Anyway, my opinion shouldn't stop you from creating such a package, of > course. I mean, it bugs you, so that should be enough of a reason, > > right? ;-) Yes and no. It's on the limit of the "automation horizon" (see https://xkcd.com/1205/) ;-) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University