From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Scott Turner Newsgroups: gmane.emacs.bugs Subject: bug#11474: Patch for Emacsclient --eval bug Date: Wed, 2 Apr 2014 11:34:13 -0400 Message-ID: References: <86ehqmm2u2.fsf@dickson.st> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf30334bfd41e10204f611042a X-Trace: ger.gmane.org 1396526153 1802 80.91.229.3 (3 Apr 2014 11:55:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Apr 2014 11:55:53 +0000 (UTC) Cc: 11474@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 03 13:55:47 2014 Return-path: Envelope-to: geb-bug-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 1WVeKP-00075K-5v for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Apr 2014 11:52:57 +0200 Original-Received: from localhost ([::1]:39334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVNCC-0007LC-3C for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Apr 2014 11:35:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVNC3-00075L-Hb for bug-gnu-emacs@gnu.org; Wed, 02 Apr 2014 11:35:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVNBw-0005iC-6I for bug-gnu-emacs@gnu.org; Wed, 02 Apr 2014 11:35:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVNBw-0005hY-3j for bug-gnu-emacs@gnu.org; Wed, 02 Apr 2014 11:35:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WVNBu-0003iH-Oo for bug-gnu-emacs@gnu.org; Wed, 02 Apr 2014 11:35:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Scott Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Apr 2014 15:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11474 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 11474-submit@debbugs.gnu.org id=B11474.139645285714200 (code B ref 11474); Wed, 02 Apr 2014 15:35:02 +0000 Original-Received: (at 11474) by debbugs.gnu.org; 2 Apr 2014 15:34:17 +0000 Original-Received: from localhost ([127.0.0.1]:33099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVNBB-0003gx-4E for submit@debbugs.gnu.org; Wed, 02 Apr 2014 11:34:17 -0400 Original-Received: from mail-ig0-f178.google.com ([209.85.213.178]:60427) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVNB7-0003gm-Rm for 11474@debbugs.gnu.org; Wed, 02 Apr 2014 11:34:14 -0400 Original-Received: by mail-ig0-f178.google.com with SMTP id hn18so470247igb.17 for <11474@debbugs.gnu.org>; Wed, 02 Apr 2014 08:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gZocS19TDKf/9AZV+y/5DHq5oztBJkEIHnoePt+3dYA=; b=Dm/C9XLq+VOKJdm815AqjNlgt3K8m5Cbvq52qkc230zovvjE46i95y7RAr1qM+xiyy F9XznpoAa+zmajc0NwqLpWYOs/flmA6vInzjSmcHj2G6lCIa9l+wCw2QDccFVI58eZul s/4dndPS3v/+kLizTc8Ksjg64MvE6TnWv+DZp+LuxSGpfRkwnGk6IZtKHjQQRz9TJOsG sL2k/Eoh++nOqf6P856NoRXJ0uVvt8TnWzH1O7vU4WjxrJNKGe5mXsKFelLqHMnS9SPF naMtG3s0eCrW7uZosiMH9MO7ukakISBOvIpV/J6jQzLjVRMKRRTvd1JqZhKiJ0fi6bCe IYtQ== X-Received: by 10.42.67.130 with SMTP id t2mr1143489ici.17.1396452853144; Wed, 02 Apr 2014 08:34:13 -0700 (PDT) Original-Received: by 10.64.233.200 with HTTP; Wed, 2 Apr 2014 08:34:13 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87692 Archived-At: --20cf30334bfd41e10204f611042a Content-Type: text/plain; charset=ISO-8859-1 On Wed, Apr 2, 2014 at 10:57 AM, Stefan Monnier wrote: > Silently dropping arguments is not very polite, so I'm not really happy > with your solution. > I think as long as it is documented that the alternate_editor is not passed the arguments intended for Emacs, that behavior is not terrible. > I think the "right" behavior would be to call the alternate editor while > preserving most arguments; IOW the right fix > in this case would be to add a "--eval" argument, so that your > alternate_editor can decide whether to drop args when it gets an "--eval" > or to prepend all other args with a "--eval=" (or do whatever else it > fancies). > On a practical level, I doubt the alternate_editor is going to be prepared to deal with Emacs flags, so that's not terribly useful. Maybe the best solution would be to have something like "--alternate-editor-arguments" so that the user can specifically provide the arguments to use with the alternate editor? --20cf30334bfd41e10204f611042a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On W= ed, Apr 2, 2014 at 10:57 AM, Stefan Monnier <monnier@iro.umontrea= l.ca> wrote:
Silently dropping arguments is not very polite, so I'm not = really happy with your solution. =A0

I think as long as it is documented that t= he alternate_editor is not passed the arguments intended for Emacs, that be= havior is not terrible.
=A0
I think the "r= ight" behavior would be to call the alternate editor while preserving = most arguments; IOW the right fix
in this case would be to add a "--eval" argument, so that your al= ternate_editor can decide whether to drop args when it gets an "--eval= " or to prepend all other args with a "--eval=3D" (or do wha= tever else it fancies).

On a practical level, I doubt the al= ternate_editor is going to be prepared to deal with Emacs flags, so that= 9;s not terribly useful.

Maybe the best solution would be= to have something like "--alternate-editor-arguments" so that th= e user can specifically provide the arguments to use with the alternate edi= tor?


--20cf30334bfd41e10204f611042a--