From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#33219: 25.2; crontab -e doesn't connect to existing emacs daemon Date: Wed, 31 Oct 2018 17:44:32 -0400 Message-ID: <20181031214432.mpreomzpovm4zo5j@E15-2016.optimum.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1541022191 31827 195.159.176.226 (31 Oct 2018 21:43:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 Oct 2018 21:43:11 +0000 (UTC) User-Agent: NeoMutt/20180716 To: 33219@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 31 22:43:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHyGY-0008BR-Py for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Oct 2018 22:43:07 +0100 Original-Received: from localhost ([::1]:33632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHyIf-0008K7-B7 for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Oct 2018 17:45:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHyIV-0008HE-1W for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 17:45:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHyIR-00049H-28 for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 17:45:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53266) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHyIQ-00049B-T5 for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 17:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gHyIQ-0007gm-MA for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 17:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Oct 2018 21:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Emacs Bug Reporting Original-Received: via spool by submit@debbugs.gnu.org id=B.154102229229519 (code B ref -1); Wed, 31 Oct 2018 21:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Oct 2018 21:44:52 +0000 Original-Received: from localhost ([127.0.0.1]:57524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHyIG-0007g3-B3 for submit@debbugs.gnu.org; Wed, 31 Oct 2018 17:44:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHyIF-0007fo-CS for submit@debbugs.gnu.org; Wed, 31 Oct 2018 17:44:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHyI9-00042b-FP for submit@debbugs.gnu.org; Wed, 31 Oct 2018 17:44:46 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35774) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gHyI9-00042V-BK for submit@debbugs.gnu.org; Wed, 31 Oct 2018 17:44:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHyI8-0008GW-BQ for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 17:44:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHyI4-00040q-At for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 17:44:44 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:33039) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHyI3-0003zV-30 for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 17:44:40 -0400 Original-Received: from E15-2016.optimum.net ([108.6.168.221]) by mail.gmx.com (mrgmx003 [212.227.17.184]) with ESMTPSA (Nemesis) id 0MH0eg-1gLnmr1yLq-00Dn5j for ; Wed, 31 Oct 2018 22:44:35 +0100 Original-Received: from E15-2016.optimum.net ([108.6.168.221]) by mail.gmx.com (mrgmx003 [212.227.17.184]) with ESMTPSA (Nemesis) id 0MH0eg-1gLnmr1yLq-00Dn5j for ; Wed, 31 Oct 2018 22:44:35 +0100 Content-Disposition: inline X-Provags-ID: V03:K1:0fALT+KswDDKWD4pLslodgBguk+n9CJ4eocFfyTldg3dew5NiW6 +rPmL8KCT6llt11K1bhFIofEuh5hgCW/MFlWQDnLcmoNdeVE+u1vaaGGBNxryYkVBXnBORP MnNF7C9Qbnqf6NiC8EgILW/hCSbe/mSANVGMSvC63zf6cTlMve2/9jNIkXwFyOnpLNi79WR pxmd/pXCWAb06TYiTcIAg== X-UI-Out-Filterresults: notjunk:1;V01:K0:YB6mRKNHaHU=:dipGDWkRJHaH0SvQYr4Y5M 8BFkVRrTFMaHTXb8pbZMetMOYnXX7BMqbiJtbNqvcoC4o3WPF3lYRts3TWoZCD1xS527O+/va g92ov3Z4D639A5d+R/wb2N4MD1TD/o6mj1zW5uF4f9bKJfDuzRY/jYOw8xeob3w9cSbmROujO XrFDKkpDze6WCSXAyQaBmJ5/1CKMdQv9IqpAfzcgPu1GRWG0KYhJDTfoWNDTfZdzqAAgIBiPE z5vxjYlVShE91+RKScIL4ZOEI9VXYoam9orC2rcvdh7CXOSy+M+RBegujwG+g7CHgTnV6lBgK /gZ2Qb0aZdZNun8gOlG8+ny0LFJpCbLeWe9TBj4pTifNl9D3S3pd5KwWUs02m8UEtfqVnJZkF TEID+tLX3REMEceNCRJrnmhI7nyQJn59vsiRAlNjFOjVQDDZ1byNJhVi6RstmTWTPdoJ/+iwZ h+ZmqUievY37XQYPOXLa92OuZHewZ0MDlB2QEHO/x/cTiBBn0B7q9BZac/lWZqBk6P0YWEiVn pKFWtw9JUa1mMe6ND3fGjfENQ0Huy9oLfvo5sGix+bqGZuG3Vz3p5zpewrMeThr4TmFG+P+pk eIBUZunvLrTkuA1L2r41nJ5T9ONB4boa1lSM9HCEVbfV3K2RSP5FzkB2dMMZjBGq2YazX3mcc n13hZeK5DaVuQV4fJQvsHLJD/0YGqej52wEZAWKfgDloVIiDg6ssqFW87xMZop510ZKfRCwz6 htBKJ17bMq7TdMWoUruNvj6pgMmZP2iwn4X+A633LVYjLfNwaIVGpGbq+EfNTovntzZ3w6E5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:151873 Archived-At: When running 'crontab -e' with $EDITOR set to emacsclient -nw -c --alternate-editor="" emacsclient issues an error that it had failed to locate the emacs daemon socket file, so it spawns a new emacs daemon. On this distribution (Devuan Ascii/Ceres, a derviative of Debian 9 without systemd), the socket file is located at: /tmp/user/${UID}/emacs${UID}/server which in this case the emacsclient binary isn't finding or looking for. However, in other uses of emacsclient via $EDITOR (eg. mutt, newbeuter, w3m) the client does find the socket file and does connect to the existing daemon. A work-around has been to define: export EDITOR="$HOME/.local/bin/emacsclient_wrapper" alias emacs="emacsclient_wrapper " #!/bin/sh # emacsclient_wrapper SOCKET_FILE="$(lsof -c emacs -u $USER | grep -m1 -o "[^[:blank:]]\+server")" [ -z "$SOCKET_FILE" ] \ && emacsclient -nw -c --alternate-editor="" $@ \ || emacsclient -nw -c --alternate-editor="" -s "$SOCKET_FILE" $@ In GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-08-26, modified by Debian built on x86-csail-01 System Description: Devuan GNU/Linux 2.0.0 (ascii) Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs-7bZ65w/emacs-25.2+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0