From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Syntax of "-" in shell-mode Date: Sat, 25 Jun 2016 10:06:05 +0300 Message-ID: <83h9ch21eq.fsf@gnu.org> References: <87y45ucnyx.fsf@secretsauce.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1466838426 18123 80.91.229.3 (25 Jun 2016 07:07:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jun 2016 07:07:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dima Kogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 25 09:07:01 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bGhgC-0000Li-UW for ged-emacs-devel@m.gmane.org; Sat, 25 Jun 2016 09:07:01 +0200 Original-Received: from localhost ([::1]:48823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGhgC-0000VH-9a for ged-emacs-devel@m.gmane.org; Sat, 25 Jun 2016 03:07:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGhg5-0000VC-3g for emacs-devel@gnu.org; Sat, 25 Jun 2016 03:06:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGhg0-0002X0-Sg for emacs-devel@gnu.org; Sat, 25 Jun 2016 03:06:52 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGhg0-0002Wn-PG; Sat, 25 Jun 2016 03:06:48 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4552 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bGhfy-0001ta-UT; Sat, 25 Jun 2016 03:06:47 -0400 In-reply-to: <87y45ucnyx.fsf@secretsauce.net> (message from Dima Kogan on Fri, 24 Jun 2016 13:48:38 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204747 Archived-At: > From: Dima Kogan > Date: Fri, 24 Jun 2016 13:48:38 -0700 > > Hi. What do people think about giving "-" a syntax of "word" in > shell-mode? The rationale is that in this mode one is generally editing > shell commands where "-" precedes commandline options, and strings such > as "--help" generally represent a single semantic token. > > More specifically if I have something like "xxx --yyy" with the point in > the whitespace, and I invoke (transpose-words) I want the result to be > "--yyy xxx" and not "yyy --xxx". The latter means something very > different in a shell command. If the problem is with transpose-words, then a possible solution might be a new shell-transpose-words command, which is smart enough to DTRT in these cases, at least as a user option? Would you like to propose such an addition to sh-script.el?