unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Boruch Baum <boruch_baum@gmx.com>
To: 33219@debbugs.gnu.org
Subject: bug#33219: 25.2; crontab -e doesn't connect to existing emacs daemon
Date: Wed, 31 Oct 2018 17:44:32 -0400	[thread overview]
Message-ID: <20181031214432.mpreomzpovm4zo5j@E15-2016.optimum.net> (raw)

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





             reply	other threads:[~2018-10-31 21:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 21:44 Boruch Baum [this message]
2018-11-01 16:25 ` bug#33219: 25.2; crontab -e doesn't connect to existing emacs daemon Glenn Morris
2018-11-01 17:31   ` Boruch Baum
2018-11-27  5:56     ` Glenn Morris
2018-11-27 20:47       ` Boruch Baum
2018-11-28 20:11         ` Glenn Morris
2018-11-27 20:46 ` bug#33219: " Boruch Baum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181031214432.mpreomzpovm4zo5j@E15-2016.optimum.net \
    --to=boruch_baum@gmx.com \
    --cc=33219@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).