From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8757 invoked by alias); 20 Sep 2015 15:32:11 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36570 Received: (qmail 24389 invoked from network); 20 Sep 2015 15:32:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=ztKT0d0Q+6/ckpTRuFWSg9weI/GmPO0rab+0uutLV+k=; b=a2Vmy5Kr0ZkT4ip6kC+1Sl1h1BENk1PcCt+EAqV5l44lAOOhU1aaoe13p5CJ6oI5Xy g7t3pRF0ps/QO6vTgs43wF1fxc0nK+7CHnRnLj6Bc9YbRjFhy6AvQpyJMPIWqgaemup8 13md1xnDyw/qYSOy9yxKd9GYTcrvS6Rh8tkhXEtbEMTLNabCP+B/QWLXv85YwRvqu2/4 DpIjjl/mniulpXtdoYwY/LnVaqI0NwNMFg78RJizcITl8io+8ryiNsqhkyIdt8fz/c+8 O57/bJQh9k2c7GSKXJzm2+yTOTKVw8u58l/GGMDSwrwGOF15paadqm6eQFdziDcWJIJq 774g== X-Gm-Message-State: ALoCoQkYjuMsIYeC+liwltpxmCPNCxluzfnjn+7nFXBdJDfKbhIzmZEgDl0AJk9bARd3xoGVBfCE X-Received: by 10.182.60.196 with SMTP id j4mr8913252obr.10.1442763125583; Sun, 20 Sep 2015 08:32:05 -0700 (PDT) From: Bart Schaefer Message-Id: <150920083202.ZM31587@torch.brasslantern.com> Date: Sun, 20 Sep 2015 08:32:02 -0700 In-Reply-To: <55FE9C92.7030203@petervasil.net> Comments: In reply to Peter Vasil "edit-command-line problem with emacsclient" (Sep 20, 1:46pm) References: <55FE9C92.7030203@petervasil.net> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Peter Vasil , zsh-workers@zsh.org Subject: Re: edit-command-line problem with emacsclient MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 20, 1:46pm, Peter Vasil wrote: } } This is implemented for vim and emacs, however if I set my EDITOR or } VISUAL to emacsclient, the *emacs* condition gets called which does not } work for emacsclient. The arguments specidied for emacs work only for } Emacs but not for emacsclient. So as I read this, for emacsclient the -eval option is mutually exclusive with opening a file. It's been a long time since I used emacsclient. Does this work? diff --git a/Functions/Zle/edit-command-line b/Functions/Zle/edit-command-line index 2c7f34b..bdd7b0b 100644 --- a/Functions/Zle/edit-command-line +++ b/Functions/Zle/edit-command-line @@ -17,7 +17,7 @@ local editor=${${VISUAL:-${EDITOR:-vi}}} case $editor in (*vim*) ${=editor} -c "normal! ${byteoffset}go" -- $1;; - (*emacs*) ${=editor} $1 -eval "(goto-char ${byteoffset})";; + (*emacs*) ${=editor} -eval "(progn (find-alternate-file ${(qqq)1}) (goto-char ${byteoffset}))";; (*) ${=editor} $1;; esac