From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.emacs.help Subject: Re: Bizarre behavior of emacsclient on OS/X Date: Wed, 5 Jun 2013 11:52:19 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1370458376 28985 80.91.229.3 (5 Jun 2013 18:52:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Jun 2013 18:52:56 +0000 (UTC) To: GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 05 20:52:57 2013 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 1UkIpI-00055e-99 for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Jun 2013 20:52:52 +0200 Original-Received: from localhost ([::1]:59279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkIpH-0006ZP-Vt for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Jun 2013 14:52:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkIp8-0006ZK-2B for help-gnu-emacs@gnu.org; Wed, 05 Jun 2013 14:52:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkIp6-0007gc-P0 for help-gnu-emacs@gnu.org; Wed, 05 Jun 2013 14:52:42 -0400 Original-Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:52137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkIp6-0007gY-Je for help-gnu-emacs@gnu.org; Wed, 05 Jun 2013 14:52:40 -0400 Original-Received: by mail-we0-f174.google.com with SMTP id q58so1582255wes.5 for ; Wed, 05 Jun 2013 11:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=zPJ0woXRp+o7HpQp/31bRkGGG0AhiURXlmLYpWXleZk=; b=H2UKAuHWXVrAW0ZyYkFjx/W7Ty3uFn582wFMTTH3Gn3Zr2dahDYf1sE8l5VfDiakxy x49vGjJM0JBDZUiTqcMVHejGTXnx/v/l6BJj6vXQrHPq953VluN9d9u+ZPnAsCMIlWOV jUfbOqCcMuJLA+6aBmb6IdUod+Xq1EdL7GgYWPGmG7mYQMZQvs4NGFaivyVAHw4BkS/l KboJOyYbH3oWN4CkbnhpBu9Ep2FvrE30pqpgQVO0ufPVlKjgVhVEx3nAYzs0ILpUieeg wYB6suPjFyh4QCK4jdss1Wo5mU4BDzU0gGcFT1KSUMJmGKPEw2Et0AaBd+gsWdTYewbi Muig== X-Received: by 10.180.160.170 with SMTP id xl10mr7925259wib.56.1370458359760; Wed, 05 Jun 2013 11:52:39 -0700 (PDT) Original-Received: by 10.194.87.68 with HTTP; Wed, 5 Jun 2013 11:52:19 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::22e 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:91331 Archived-At: Problem solved. To use emacsclient successfully you must not only figure out which temp directory to use, you must also use the correct client because the distributed default "emacsclient" won't talk to the emacs fired up via the application's icon. SO: > ec=$(find /Applications/Emacs.app -name emacsclient) > tmpdir=$(getconf DARWIN_USER_TEMP_DIR) > uid=$(id -u) > $ec -s $tmpdir/emacs$uid/emacs ${1+"$@"} Maybe this could be made a little easier? Like emacs squawking that some unknown message came in on the socket and emacsclient testing the possibilities for TMPDIR? Thank you!! On Wed, Jun 5, 2013 at 10:03 AM, Bruce Korb wrote: >> $ getconf DARWIN_USER_TEMP_DIR >> /var/folders/22/_6n21qmj3rgfqtrqy2nd81d8898tm8/T/ >> $ id -u >> 278162056 >> $ f=$(getconf DARWIN_USER_TEMP_DIR)/emacs$(id -u)/emacs >> $ file $f >> /var/folders/22/_6n21qmj3rgfqtrqy2nd81d8898tm8/T//emacs278162056/emacs: socket >> $ emacsclient -n -s $f myfile >> $ > > I'm writing because: > > 1. emacsclient does not default to the same temp directory, and > 2. when I force it to use the correct temp directory, the emacs daemon (server) > does *not* open "myfile". > > How do I chase down the cause?