From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.devel Subject: Re: Syntax of "-" in shell-mode Date: Fri, 24 Jun 2016 14:05:31 -0700 Message-ID: <87wplecn6s.fsf@secretsauce.net> References: <87y45ucnyx.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466802400 27510 80.91.229.3 (24 Jun 2016 21:06:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2016 21:06:40 +0000 (UTC) Cc: Emacs developers To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 24 23:06:29 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 1bGYJ2-0000tE-RR for ged-emacs-devel@m.gmane.org; Fri, 24 Jun 2016 23:06:28 +0200 Original-Received: from localhost ([::1]:47332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGYJ2-0003PG-2t for ged-emacs-devel@m.gmane.org; Fri, 24 Jun 2016 17:06:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGYIQ-0003Am-GT for emacs-devel@gnu.org; Fri, 24 Jun 2016 17:05:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGYIK-0001GE-GT for emacs-devel@gnu.org; Fri, 24 Jun 2016 17:05:49 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:34947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGYII-0001EA-4T for emacs-devel@gnu.org; Fri, 24 Jun 2016 17:05:44 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4B5CF2116B; Fri, 24 Jun 2016 17:05:33 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Fri, 24 Jun 2016 17:05:33 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=XveD9 PXpeoB5mhMi8Tbl0X1GJOc=; b=dNeY7PvbFhmyqm3sx+wvDV/FXJLmfM7+E2SHs 58bhGP4kBz8BHWXHlK3ebvKmb+E/Kpl3sD2ZeaCc2ODVv0JUk+38t0LR3lIoVVmS SnS+IaQDFt0u4CGEVsWchkgXTIuHJ0lODW/JROIr8baGbuHOOHTjR6+khgcJUWi9 93jWJ0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=XveD9PXpeoB5mhMi8Tbl0X1GJOc=; b=hb6Lu 4WTIUdEj/LFaRnjO1j9+p4shkRotBlhBwy6l8o5V3adTXRQW6I0PLgKTaNbvei7/ GU/EqhZW3VcDCCqmTNuUtpM8lNjZu45YVH2yGOyC+AdDRSSmxbvv+iRQ1q1/qQyY GijxKZnNTT9AzVACx0V2DKzrQQ6F/IssWm9VJs= X-Sasl-enc: cDZrkS9VvC5Wb4Xk2m0KV6WBmJkiOPfM8W0RPlIZ4Y4+ 1466802332 Original-Received: from shorty.local (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id CD36ACCD88; Fri, 24 Jun 2016 17:05:32 -0400 (EDT) Original-Received: from dima by shorty.local with local (Exim 4.87) (envelope-from ) id 1bGYI7-0006RM-K1; Fri, 24 Jun 2016 14:05:31 -0700 User-agent: mu4e 0.9.17; emacs 25.0.94.1 In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 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:204738 Archived-At: Drew Adams writes: >> 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. > > Maybe not so simple. A shell command can involve lots of stuff, > including arguments to commands that use their own syntax (think > `find'). Of course the true syntax depends on context, but in my experience, in shell commands "-" is a word far more often than it isn't.