From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: torys.anderson@gmail.com (Tory S. Anderson) Newsgroups: gmane.emacs.help Subject: Re: emacsclient command line use existing client Date: Sat, 20 Sep 2014 06:42:36 -0400 Message-ID: <87a95ulgir.fsf@gmail.com> References: <87zje671q3.fsf@gmail.com> <87egvhk19v.fsf@web.de> <87lhppvxsj.fsf@gmail.com> <87iokpuo0j.fsf@gmail.com> <87iokjmt54.fsf@gmail.com> <87vbojdomm.fsf@karnak.MagnumOpus.khem> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411209788 18135 80.91.229.3 (20 Sep 2014 10:43:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Sep 2014 10:43:08 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Charles Philip Chan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 20 12:43:02 2014 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 1XVI84-0007XW-SZ for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Sep 2014 12:43:00 +0200 Original-Received: from localhost ([::1]:34112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVI84-00037a-Hw for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Sep 2014 06:43:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVI7q-00037V-AA for help-gnu-emacs@gnu.org; Sat, 20 Sep 2014 06:42:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVI7p-0003eh-Bv for help-gnu-emacs@gnu.org; Sat, 20 Sep 2014 06:42:46 -0400 Original-Received: from mail-yk0-x22b.google.com ([2607:f8b0:4002:c07::22b]:47060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVI7p-0003eO-8a for help-gnu-emacs@gnu.org; Sat, 20 Sep 2014 06:42:45 -0400 Original-Received: by mail-yk0-f171.google.com with SMTP id 79so468760ykr.2 for ; Sat, 20 Sep 2014 03:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=uLG3EMvmrIK9YRPR/TQ3ynenJGFxrV9ZFlZWKqAzOgU=; b=t9/+PDRoBRT6A+WQogUbX7UyD3dGvzWXKo6Vh2/Cn6hmmNmWa8ut6rSo3pwo/K6JuI bQQVhktendsm3408jtu9D2AMfZyLaZFm6wHqdP27KHRGwl+Sq+uGaXKClGWT7biUYF6m XejrK6xhD0vtXh53Bywepwd2SKeUnFArssS0qulq6W+SmecNApkY1uOVHVAiaFeotBqI 7CWXglTYzYT2g9TELK3TspJbEMrebraoZ2+jToZc8nQrb3JReYmbasrSTk3pHiMuoX4a qoQDn5YihyX42KeEhZT9Aju+48TAd5KitzWOLb3qrKX7k+tpwyG1rf76peg7rzBz/7/t 9URQ== X-Received: by 10.236.81.201 with SMTP id m49mr8978698yhe.27.1411209759099; Sat, 20 Sep 2014 03:42:39 -0700 (PDT) Original-Received: from localhost.localdomain ([2601:0:a000:4a1:ee55:f9ff:feb5:5589]) by mx.google.com with ESMTPSA id 33sm1865111yhu.42.2014.09.20.03.42.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Sep 2014 03:42:37 -0700 (PDT) In-Reply-To: <87vbojdomm.fsf@karnak.MagnumOpus.khem> (Charles Philip Chan's message of "Fri, 19 Sep 2014 22:14:41 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::22b 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:100065 Archived-At: Ok. I did the following tests: - Tried your script. From Firefox, it doesn't seem to run at all. From the command-line, it opens TWO emacs windows, one in a blank "server" buffer and another with the email I want. Both are connected to the correct server, though. - My old script (as listed below) does exactly what it should from the command line; it's, apparently, just from Mozilla that it creates a new server. Charles Philip Chan writes: > On 19 Sep 2014, torys.anderson@gmail.com wrote: > >> << full contents of email.so >> >> ------------------------------- >> #!/bin/sh >> # emacs-mailto-handler >> >> mailto=$1 >> mailto="mailto:${mailto#mailto:}" >> mailto=$(printf '%s\n' "$mailto" | sed -e 's/[\"]/\\&/g') >> emacs_server="server" >> elisp_expr="(mailto-compose-mail \"$mailto\")" >> >> /usr/bin/emacsclient -a "" -c -n -s "$emacs_server" --eval >> "$elisp_expr" \ '(set-window-dedicated-p (selected-window) t)' > > This is the small script that I have been using with Firefox's mailto > handler for years with no problems: > > > > Charles