unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26310: 25.1; Emacsclient to emacs --daemon frame/connection error
@ 2017-03-30 14:31 Live System User
  2017-03-31  1:26 ` npostavs
  0 siblings, 1 reply; 6+ messages in thread
From: Live System User @ 2017-03-30 14:31 UTC (permalink / raw)
  To: 26310


Hi,

        I currently have an Emacs daemon that wont popup a new
        emacsclient frame initially using the emacsclient binary.

        Executing from the command line:

             emacsclient -c file.txt

        displays a quick momentary frame that disappears and shows
        on the command line:

           $ emacsclient -c file.txt
           emacsclient: can't find socket; have you started the server?
           To start the server in Emacs, type "M-x server-start".
           Waiting for Emacs...
           *ERROR*: Wrong type argument: stringp, nil
           $ 


        To try to track down why this was happening I "spoke" the
        Emacs server protocol to the Emacs daemon, created a GUI
        frame and enabled "debug-on-error" and server logging.

        Trying to connect again using "emacsclient -c", I see again
        a momentary newly-created frame that quickly disappears and
        I see in the " *server*" buffer (from my previously-created
        frame of the Daemon):

Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: Status changed to open: open from 127.0.0.1
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: server-delete-client
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: Received -auth
<ommitted> -env TERM=xterm-256color [...] -dir /home/liveuser/ -display :0 -tty /dev/pts/1 xterm-256color -window-system -file file.txt 
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: Authentication successful
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: Sent -emacs-pid 10797
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: New file: /home/liveuser/file.txt 
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: #<frame emacs@localhost.localdomain 0x710d2e8> created
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: Sent -error Wrong&_type&_argument:&_stringp,&_nil
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: Wrong type argument: stringp, nil
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: Status changed to closed: connection broken by remote peer
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: server-delete-client
Thu Mar 30 06:43:33 2017 server <127.0.0.1:44966>: Deleted

    There's nothing new in the *Messages* buffer except:
    
        Debug on Error enabled globally

    Executing "emacsclient -t" yields the same error results.


    Strangely enough, although I get the same error message on the
    command line and very similar error messages in the " *server*"
    buffer:
    
Thu Mar 30 08:36:39 2017 server <127.0.0.1:45582>: New file: /home/liveuser/file.txt 
Thu Mar 30 08:36:39 2017 server <127.0.0.1:45582>: #<frame emacs@localhost.localdomain 0x3a83450> created
Thu Mar 30 08:36:39 2017 server <127.0.0.1:45582>: Sent -error Wrong&_type&_argument:&_stringp,&_nil
Thu Mar 30 08:36:39 2017 server <127.0.0.1:45582>: Wrong type argument: stringp, nil
Thu Mar 30 08:36:39 2017 server <127.0.0.1:45582>: Status changed to closed: connection broken by remote peer
Thu Mar 30 08:36:39 2017 server <127.0.0.1:45582>: server-delete-client
Thu Mar 30 08:36:39 2017 server <127.0.0.1:45582>: Deleted


    it DOES popup a new frame if I execute "emacsclient -nc file.txt"
    that doesn't disappear -- although it DOES NOT CREATE the file.txt
    buffer/window -- a new frame is created just as if I executed
    "C-x 5 2" `(make-frame-command)'.

    So a couple of questions this raise for me:
    
    What is different about using "--no-wait" with emacsclient that
    one is able to get past invocation errors (and at least get a
    new frame) that you can't get without "--no-wait"?

    What is the cause of the "stringp" error and why doesn't
    "debug-on-error" give further diagnostics on its cause?
    The " *server*" buffer logging information appears to show
    the correct passing of the protocol parameters so what is
    the argument(s) that the Emacs server belives is nil or
    missing?

    Although the new frame popped up (ONLY when using "--no-wait"),
    why didn't the specified buffer/window  get created?

    This just started happening about 4 hours ago although my
    "emacs --daemon" has been up for 3 days with frequent use
    in that timespan.
    
    How cam I track these errors down?

    I can leave the Emacs daemon up for a while.

    Thanks.




In GNU Emacs 25.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.20.9)
 of 2016-10-13 built on buildvm-05.phx2.fedoraproject.org
Windowing system distributor 'Fedora Project', version 11.0.11803000
Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no --with-xwidgets build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
 -m64 -mtune=generic' LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XWIDGETS

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Summary

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
nnimap read 105k from imap.aim.com
nnimap read 113k from imap.aim.com
nnimap read 128k from imap.aim.com
Fetching headers for nnimap+aol:INBOX...done
Scoring...done
Sorting threads...done
Generating summary...done
Auto-saving...done
previous-line: Beginning of buffer
Making completion list...

Load-path shadows:
None found.

Features:
(shr-color color shr dom subr-x browse-url gnus-dup mailalias smtpmail
apropos thingatpt pp shadow emacsbug sendmail sort gnus-cite smiley
ansi-color mail-extr gnus-async gnus-bcklg qp gnus-ml disp-table
cursor-sensor nndraft nnmh mm-archive jka-compr timezone url-http url-gw
url-cache url-auth url-handlers utf-7 rfc2104 nnfolder nnagent nnml
network-stream nsm starttls gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg nntp gnus-cache epa-file epa derived nnreddit mm-url
url url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core
cl-macs url-vars json map seq byte-opt bytecomp byte-compile cl-extra
cconv gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap cl gv
sieve sieve-mode sieve-manage nnir gnus-sum gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc
parse-time gnus-spec gnus-int gnus-range message dired format-spec
rfc822 mml mml-sec password-cache epg epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader gnus-win gnus gnus-ems wid-edit nnoo nnheader
gnus-util mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib
mail-prsvr mail-utils time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
xwidget-internal move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 29211754 184124)
 (symbols 48 32156 42)
 (miscs 40 259 831)
 (strings 32 60692 34416)
 (string-bytes 1 1913637)
 (vectors 16 28888)
 (vector-slots 8 890936 133424)
 (floats 8 577 933)
 (intervals 56 5300 1106)
 (buffers 976 55)
 (heap 1024 571864 23349))





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#26310: 25.1; Emacsclient to emacs --daemon frame/connection error
  2017-03-30 14:31 bug#26310: 25.1; Emacsclient to emacs --daemon frame/connection error Live System User
@ 2017-03-31  1:26 ` npostavs
  2017-03-31  7:51   ` Live System User
  0 siblings, 1 reply; 6+ messages in thread
From: npostavs @ 2017-03-31  1:26 UTC (permalink / raw)
  To: Live System User; +Cc: 26310

Live System User <nyc4bos@aol.com> writes:

>     What is the cause of the "stringp" error and why doesn't
>     "debug-on-error" give further diagnostics on its cause?
>     The " *server*" buffer logging information appears to show
>     the correct passing of the protocol parameters so what is
>     the argument(s) that the Emacs server belives is nil or
>     missing?

The error happens inside a condition-case, so the debugger is not
invoked.  Can you try setting debug-on-signal?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#26310: 25.1; Emacsclient to emacs --daemon frame/connection error
  2017-03-31  1:26 ` npostavs
@ 2017-03-31  7:51   ` Live System User
  2017-04-01  3:50     ` npostavs
  0 siblings, 1 reply; 6+ messages in thread
From: Live System User @ 2017-03-31  7:51 UTC (permalink / raw)
  To: npostavs; +Cc: 26310

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

npostavs@users.sourceforge.net writes:

> Live System User <nyc4bos@aol.com> writes:
>
>>     What is the cause of the "stringp" error and why doesn't
>>     "debug-on-error" give further diagnostics on its cause?
>>     The " *server*" buffer logging information appears to show
>>     the correct passing of the protocol parameters so what is
>>     the argument(s) that the Emacs server belives is nil or
>>     missing?
>
> The error happens inside a condition-case, so the debugger is not
> invoked.  Can you try setting debug-on-signal?

  Here is the backtrace, as an attachment.

  Thanks.


[-- Attachment #2: emacsclient debug-on-signal --]
[-- Type: text/plain, Size: 27201 bytes --]

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  isearch-done(t)
  isearch-cancel()
  (progn (isearch-cancel))
  (if (and (boundp (quote isearch-mode)) isearch-mode) (progn (isearch-cancel)))
  (save-current-buffer (set-buffer buffer) (if (and (boundp (quote isearch-mode)) isearch-mode) (progn (isearch-cancel))))
  (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (if (and (boundp (quote isearch-mode)) isearch-mode) (progn (isearch-cancel)))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (while --dolist-tail-- (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (if (and (boundp (quote isearch-mode)) isearch-mode) (progn (isearch-cancel)))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (let ((--dolist-tail-- (buffer-list))) (while --dolist-tail-- (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (if (and (boundp (quote isearch-mode)) isearch-mode) (progn (isearch-cancel)))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  (condition-case nil (let ((--dolist-tail-- (buffer-list))) (while --dolist-tail-- (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (if (and (boundp ...) isearch-mode) (progn (isearch-cancel)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (quit (message nil)))
  server-goto-toplevel(#<process server <127.0.0.1:51916>>)
  (progn (server-goto-toplevel proc))
  (if (or frame files) (progn (server-goto-toplevel proc)))
  (let ((request (substring string 0 (match-beginning 0))) (coding-system (and (default-value (quote enable-multibyte-characters)) (or file-name-coding-system default-file-name-coding-system))) nowait frame display parent-id dontkill commands dir use-current-frame frame-parameters tty-name tty-type files filepos args-left) (setq string (substring string (match-end 0))) (setq args-left (mapcar (quote server-unquote-arg) (split-string request " " t))) (while args-left (let* ((val (car-safe (prog1 args-left (setq args-left ...))))) (cond ((equal val (quote "-version")) (let nil (car-safe (prog1 args-left ...)))) ((equal val (quote "-nowait")) (let nil (setq nowait t))) ((equal val (quote "-current-frame")) (let nil (setq use-current-frame t))) ((equal val (quote "-frame-parameters")) (let nil (let (...) (if coding-system ...) (setq frame-parameters ...)))) ((equal val (quote "-display")) (let nil (setq display (car-safe ...)) (if (= 0 ...) (setq display nil)))) ((equal val (quote "-parent-id")) (let nil (setq parent-id (car-safe ...)) (if (= 0 ...) (setq parent-id nil)))) ((equal val (quote "-window-system")) (let nil (if (fboundp ...) (setq dontkill t tty-name ...)))) ((equal val (quote "-resume")) (let nil (let (...) (setq dontkill t) (setq commands ...)))) ((equal val (quote "-suspend")) (let nil (let (...) (setq dontkill t) (setq commands ...)))) ((equal val (quote "-ignore")) (let nil (setq dontkill t) (car-safe (prog1 args-left ...)))) ((equal val (quote "-tty")) (let nil (setq tty-name (car-safe ...) tty-type (car-safe ...) dontkill (or dontkill ...)) (if (and ... ...) (progn ...)))) ((equal val (quote "-position")) (let nil (if (not ...) (error "Invalid -position command in client args")) (let (...) (setq filepos ...)))) ((equal val (quote "-file")) (let nil (let (...) (if coding-system ...) (if ... ...) (setq file ...) (setq files ...) (server-log ... proc)) (setq filepos nil))) ((equal val (quote "-eval")) (let nil (if use-current-frame (setq use-current-frame ...)) (let (...) (if coding-system ...) (setq commands ...) (setq filepos nil)))) ((equal val (quote "-env")) (let nil (let (...) (process-put proc ... ...)))) ((equal val (quote "-dir")) (let nil (setq dir (car-safe ...)) (if coding-system (setq dir ...)) (setq dir (command-line-normalize-file-name dir)) (process-put proc (quote server-client-directory) dir))) (t (let ((arg val)) (error "Unknown command: %s" arg)))))) (and nowait (not (eq tty-name (quote window-system))) (or files commands) (setq use-current-frame t)) (setq frame (cond ((and use-current-frame (or (eq use-current-frame (quote always)) (not (and ... ... ...)))) (setq tty-name nil tty-type nil) (if display (server-select-display display))) ((or (and (eq system-type (quote windows-nt)) (daemonp) (setq display "w32")) (eq tty-name (quote window-system))) (server-create-window-system-frame display nowait proc parent-id frame-parameters)) (tty-name (server-create-tty-frame tty-name tty-type proc)))) (process-put proc (quote continuation) (function (lambda nil (save-current-buffer (set-buffer (get-buffer-create server-buffer)) (let ((default-directory ...)) (server-execute proc files nowait commands dontkill frame tty-name)))))) (if (or frame files) (progn (server-goto-toplevel proc))) (server-execute-continuation proc))
  (if (not (string-match "\n" string)) (if (> (length string) 0) (progn (process-put proc (quote previous-string) string))) (progn (or (eq (match-end 0) (length string)) (cl--assertion-failed (quote (eq (match-end 0) (length string))))) nil) (let ((request (substring string 0 (match-beginning 0))) (coding-system (and (default-value (quote enable-multibyte-characters)) (or file-name-coding-system default-file-name-coding-system))) nowait frame display parent-id dontkill commands dir use-current-frame frame-parameters tty-name tty-type files filepos args-left) (setq string (substring string (match-end 0))) (setq args-left (mapcar (quote server-unquote-arg) (split-string request " " t))) (while args-left (let* ((val (car-safe (prog1 args-left ...)))) (cond ((equal val (quote "-version")) (let nil (car-safe ...))) ((equal val (quote "-nowait")) (let nil (setq nowait t))) ((equal val (quote "-current-frame")) (let nil (setq use-current-frame t))) ((equal val (quote "-frame-parameters")) (let nil (let ... ... ...))) ((equal val (quote "-display")) (let nil (setq display ...) (if ... ...))) ((equal val (quote "-parent-id")) (let nil (setq parent-id ...) (if ... ...))) ((equal val (quote "-window-system")) (let nil (if ... ...))) ((equal val (quote "-resume")) (let nil (let ... ... ...))) ((equal val (quote "-suspend")) (let nil (let ... ... ...))) ((equal val (quote "-ignore")) (let nil (setq dontkill t) (car-safe ...))) ((equal val (quote "-tty")) (let nil (setq tty-name ... tty-type ... dontkill ...) (if ... ...))) ((equal val (quote "-position")) (let nil (if ... ...) (let ... ...))) ((equal val (quote "-file")) (let nil (let ... ... ... ... ... ...) (setq filepos nil))) ((equal val (quote "-eval")) (let nil (if use-current-frame ...) (let ... ... ... ...))) ((equal val (quote "-env")) (let nil (let ... ...))) ((equal val (quote "-dir")) (let nil (setq dir ...) (if coding-system ...) (setq dir ...) (process-put proc ... dir))) (t (let (...) (error "Unknown command: %s" arg)))))) (and nowait (not (eq tty-name (quote window-system))) (or files commands) (setq use-current-frame t)) (setq frame (cond ((and use-current-frame (or (eq use-current-frame ...) (not ...))) (setq tty-name nil tty-type nil) (if display (server-select-display display))) ((or (and (eq system-type ...) (daemonp) (setq display "w32")) (eq tty-name (quote window-system))) (server-create-window-system-frame display nowait proc parent-id frame-parameters)) (tty-name (server-create-tty-frame tty-name tty-type proc)))) (process-put proc (quote continuation) (function (lambda nil (save-current-buffer (set-buffer (get-buffer-create server-buffer)) (let (...) (server-execute proc files nowait commands dontkill frame tty-name)))))) (if (or frame files) (progn (server-goto-toplevel proc))) (server-execute-continuation proc)))
  (progn (server-add-client proc) (server-send-string proc (concat "-emacs-pid " (number-to-string (emacs-pid)) "\n")) (if (not (string-match "\n" string)) (if (> (length string) 0) (progn (process-put proc (quote previous-string) string))) (progn (or (eq (match-end 0) (length string)) (cl--assertion-failed (quote (eq (match-end 0) (length string))))) nil) (let ((request (substring string 0 (match-beginning 0))) (coding-system (and (default-value (quote enable-multibyte-characters)) (or file-name-coding-system default-file-name-coding-system))) nowait frame display parent-id dontkill commands dir use-current-frame frame-parameters tty-name tty-type files filepos args-left) (setq string (substring string (match-end 0))) (setq args-left (mapcar (quote server-unquote-arg) (split-string request " " t))) (while args-left (let* ((val (car-safe ...))) (cond ((equal val ...) (let nil ...)) ((equal val ...) (let nil ...)) ((equal val ...) (let nil ...)) ((equal val ...) (let nil ...)) ((equal val ...) (let nil ... ...)) ((equal val ...) (let nil ... ...)) ((equal val ...) (let nil ...)) ((equal val ...) (let nil ...)) ((equal val ...) (let nil ...)) ((equal val ...) (let nil ... ...)) ((equal val ...) (let nil ... ...)) ((equal val ...) (let nil ... ...)) ((equal val ...) (let nil ... ...)) ((equal val ...) (let nil ... ...)) ((equal val ...) (let nil ...)) ((equal val ...) (let nil ... ... ... ...)) (t (let ... ...))))) (and nowait (not (eq tty-name (quote window-system))) (or files commands) (setq use-current-frame t)) (setq frame (cond ((and use-current-frame (or ... ...)) (setq tty-name nil tty-type nil) (if display (server-select-display display))) ((or (and ... ... ...) (eq tty-name ...)) (server-create-window-system-frame display nowait proc parent-id frame-parameters)) (tty-name (server-create-tty-frame tty-name tty-type proc)))) (process-put proc (quote continuation) (function (lambda nil (save-current-buffer (set-buffer ...) (let ... ...))))) (if (or frame files) (progn (server-goto-toplevel proc))) (server-execute-continuation proc))))
  (condition-case err (progn (server-add-client proc) (server-send-string proc (concat "-emacs-pid " (number-to-string (emacs-pid)) "\n")) (if (not (string-match "\n" string)) (if (> (length string) 0) (progn (process-put proc (quote previous-string) string))) (progn (or (eq (match-end 0) (length string)) (cl--assertion-failed (quote (eq ... ...)))) nil) (let ((request (substring string 0 (match-beginning 0))) (coding-system (and (default-value ...) (or file-name-coding-system default-file-name-coding-system))) nowait frame display parent-id dontkill commands dir use-current-frame frame-parameters tty-name tty-type files filepos args-left) (setq string (substring string (match-end 0))) (setq args-left (mapcar (quote server-unquote-arg) (split-string request " " t))) (while args-left (let* ((val ...)) (cond (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (t ...)))) (and nowait (not (eq tty-name (quote window-system))) (or files commands) (setq use-current-frame t)) (setq frame (cond ((and use-current-frame ...) (setq tty-name nil tty-type nil) (if display ...)) ((or ... ...) (server-create-window-system-frame display nowait proc parent-id frame-parameters)) (tty-name (server-create-tty-frame tty-name tty-type proc)))) (process-put proc (quote continuation) (function (lambda nil (save-current-buffer ... ...)))) (if (or frame files) (progn (server-goto-toplevel proc))) (server-execute-continuation proc)))) (error (server-return-error proc err)))
  (catch (quote --cl-block-server-process-filter--) (server-log (concat "Received " string) proc) (if (process-get proc :authenticated) nil (if (and (string-match "-auth \\([!-~]+\\)\n?" string) (equal (match-string 1 string) (process-get proc :auth-key))) (progn (setq string (substring string (match-end 0))) (process-put proc :authenticated t) (server-log "Authentication successful" proc)) (server-log "Authentication failed" proc) (server-send-string proc (concat "-error " (server-quote-arg "Authentication failed"))) (sit-for 1) (delete-process proc) (throw (quote --cl-block-server-process-filter--) nil))) (let ((prev (process-get proc (quote previous-string)))) (if prev (progn (setq string (concat prev string)) (process-put proc (quote previous-string) nil)))) (condition-case err (progn (server-add-client proc) (server-send-string proc (concat "-emacs-pid " (number-to-string (emacs-pid)) "\n")) (if (not (string-match "\n" string)) (if (> (length string) 0) (progn (process-put proc (quote previous-string) string))) (progn (or (eq (match-end 0) (length string)) (cl--assertion-failed (quote ...))) nil) (let ((request (substring string 0 ...)) (coding-system (and ... ...)) nowait frame display parent-id dontkill commands dir use-current-frame frame-parameters tty-name tty-type files filepos args-left) (setq string (substring string (match-end 0))) (setq args-left (mapcar (quote server-unquote-arg) (split-string request " " t))) (while args-left (let* (...) (cond ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))) (and nowait (not (eq tty-name ...)) (or files commands) (setq use-current-frame t)) (setq frame (cond (... ... ...) (... ...) (tty-name ...))) (process-put proc (quote continuation) (function (lambda nil ...))) (if (or frame files) (progn (server-goto-toplevel proc))) (server-execute-continuation proc)))) (error (server-return-error proc err))))
  (closure (t) (proc string) "Process a request from the server to edit some files.\nPROC is the server process.  STRING consists of a sequence of\ncommands prefixed by a dash.  Some commands have arguments;\nthese are &-quoted and need to be decoded by `server-unquote-arg'.\nThe filter parses and executes these commands.\n\nTo illustrate the protocol, here is an example command that\nemacsclient sends to create a new X frame (note that the whole\nsequence is sent on a single line):\n\n	-env HOME=/home/lorentey\n	-env DISPLAY=:0.0\n	... lots of other -env commands\n	-display :0.0\n	-window-system\n\nThe following commands are accepted by the server:\n\n`-auth AUTH-STRING'\n  Authenticate the client using the secret authentication string\n  AUTH-STRING.\n\n`-env NAME=VALUE'\n  An environment variable on the client side.\n\n`-dir DIRNAME'\n  The current working directory of the client process.\n\n`-current-frame'\n  Forbid the creation of new frames.\n\n`-frame-parameters ALIST'\n  Set the parameters of the created frame.\n\n`-nowait'\n  Request that the next frame created should not be\n  associated with this client.\n\n`-display DISPLAY'\n  Set the display name to open X frames on.\n\n`-position LINE[:COLUMN]'\n  Go to the given line and column number\n  in the next file opened.\n\n`-file FILENAME'\n  Load the given file in the current frame.\n\n`-eval EXPR'\n  Evaluate EXPR as a Lisp expression and return the\n  result in -print commands.\n\n`-window-system'\n  Open a new X frame.\n\n`-tty DEVICENAME TYPE'\n  Open a new tty frame at the client.\n\n`-suspend'\n  Suspend this tty frame.  The client sends this string in\n  response to SIGTSTP and SIGTTOU.  The server must cease all I/O\n  on this tty until it gets a -resume command.\n\n`-resume'\n  Resume this tty frame.  The client sends this string when it\n  gets the SIGCONT signal and it is the foreground process on its\n  controlling tty.\n\n`-ignore COMMENT'\n  Do nothing, but put the comment in the server log.\n  Useful for debugging.\n\n\nThe following commands are accepted by the client:\n\n`-emacs-pid PID'\n  Describes the process id of the Emacs process;\n  used to forward window change signals to it.\n\n`-window-system-unsupported'\n  Signals that the server does not support creating X frames;\n  the client must try again with a tty frame.\n\n`-print STRING'\n  Print STRING on stdout.  Used to send values\n  returned by -eval.\n\n`-print-nonl STRING'\n  Print STRING on stdout.  Used to continue a\n  preceding -print command that would be too big to send\n  in a single message.\n\n`-error DESCRIPTION'\n  Signal an error and delete process PROC.\n\n`-suspend'\n  Suspend this terminal, i.e., stop the client process.\n  Sent when the user presses C-z." (catch (quote --cl-block-server-process-filter--) (server-log (concat "Received " string) proc) (if (process-get proc :authenticated) nil (if (and (string-match "-auth \\([!-~]+\\)\n?" string) (equal (match-string 1 string) (process-get proc :auth-key))) (progn (setq string (substring string (match-end 0))) (process-put proc :authenticated t) (server-log "Authentication successful" proc)) (server-log "Authentication failed" proc) (server-send-string proc (concat "-error " (server-quote-arg "Authentication failed"))) (sit-for 1) (delete-process proc) (throw (quote --cl-block-server-process-filter--) nil))) (let ((prev (process-get proc (quote previous-string)))) (if prev (progn (setq string (concat prev string)) (process-put proc (quote previous-string) nil)))) (condition-case err (progn (server-add-client proc) (server-send-string proc (concat "-emacs-pid " (number-to-string (emacs-pid)) "\n")) (if (not (string-match "\n" string)) (if (> (length string) 0) (progn (process-put proc ... string))) (progn (or (eq ... ...) (cl--assertion-failed ...)) nil) (let ((request ...) (coding-system ...) nowait frame display parent-id dontkill commands dir use-current-frame frame-parameters tty-name tty-type files filepos args-left) (setq string (substring string ...)) (setq args-left (mapcar ... ...)) (while args-left (let* ... ...)) (and nowait (not ...) (or files commands) (setq use-current-frame t)) (setq frame (cond ... ... ...)) (process-put proc (quote continuation) (function ...)) (if (or frame files) (progn ...)) (server-execute-continuation proc)))) (error (server-return-error proc err)))))(#<process server <127.0.0.1:51916>> "-auth CeLJjxqPh;g)}c&lFS%D/n<X!18j6o%s{`3%-&=k1loW-aoAa(!otMOTY>\\H~I8? -dir /home/liveuser/ -current-frame -tty /dev/pts/1 xterm-256color -file file.txt \n")
  ad-Advice-server-process-filter((closure (t) (proc string) "Process a request from the server to edit some files.\nPROC is the server process.  STRING consists of a sequence of\ncommands prefixed by a dash.  Some commands have arguments;\nthese are &-quoted and need to be decoded by `server-unquote-arg'.\nThe filter parses and executes these commands.\n\nTo illustrate the protocol, here is an example command that\nemacsclient sends to create a new X frame (note that the whole\nsequence is sent on a single line):\n\n	-env HOME=/home/lorentey\n	-env DISPLAY=:0.0\n	... lots of other -env commands\n	-display :0.0\n	-window-system\n\nThe following commands are accepted by the server:\n\n`-auth AUTH-STRING'\n  Authenticate the client using the secret authentication string\n  AUTH-STRING.\n\n`-env NAME=VALUE'\n  An environment variable on the client side.\n\n`-dir DIRNAME'\n  The current working directory of the client process.\n\n`-current-frame'\n  Forbid the creation of new frames.\n\n`-frame-parameters ALIST'\n  Set the parameters of the created frame.\n\n`-nowait'\n  Request that the next frame created should not be\n  associated with this client.\n\n`-display DISPLAY'\n  Set the display name to open X frames on.\n\n`-position LINE[:COLUMN]'\n  Go to the given line and column number\n  in the next file opened.\n\n`-file FILENAME'\n  Load the given file in the current frame.\n\n`-eval EXPR'\n  Evaluate EXPR as a Lisp expression and return the\n  result in -print commands.\n\n`-window-system'\n  Open a new X frame.\n\n`-tty DEVICENAME TYPE'\n  Open a new tty frame at the client.\n\n`-suspend'\n  Suspend this tty frame.  The client sends this string in\n  response to SIGTSTP and SIGTTOU.  The server must cease all I/O\n  on this tty until it gets a -resume command.\n\n`-resume'\n  Resume this tty frame.  The client sends this string when it\n  gets the SIGCONT signal and it is the foreground process on its\n  controlling tty.\n\n`-ignore COMMENT'\n  Do nothing, but put the comment in the server log.\n  Useful for debugging.\n\n\nThe following commands are accepted by the client:\n\n`-emacs-pid PID'\n  Describes the process id of the Emacs process;\n  used to forward window change signals to it.\n\n`-window-system-unsupported'\n  Signals that the server does not support creating X frames;\n  the client must try again with a tty frame.\n\n`-print STRING'\n  Print STRING on stdout.  Used to send values\n  returned by -eval.\n\n`-print-nonl STRING'\n  Print STRING on stdout.  Used to continue a\n  preceding -print command that would be too big to send\n  in a single message.\n\n`-error DESCRIPTION'\n  Signal an error and delete process PROC.\n\n`-suspend'\n  Suspend this terminal, i.e., stop the client process.\n  Sent when the user presses C-z." (catch (quote --cl-block-server-process-filter--) (server-log (concat "Received " string) proc) (if (process-get proc :authenticated) nil (if (and (string-match "-auth \\([!-~]+\\)\n?" string) (equal (match-string 1 string) (process-get proc :auth-key))) (progn (setq string (substring string (match-end 0))) (process-put proc :authenticated t) (server-log "Authentication successful" proc)) (server-log "Authentication failed" proc) (server-send-string proc (concat "-error " (server-quote-arg "Authentication failed"))) (sit-for 1) (delete-process proc) (throw (quote --cl-block-server-process-filter--) nil))) (let ((prev (process-get proc (quote previous-string)))) (if prev (progn (setq string (concat prev string)) (process-put proc (quote previous-string) nil)))) (condition-case err (progn (server-add-client proc) (server-send-string proc (concat "-emacs-pid " (number-to-string (emacs-pid)) "\n")) (if (not (string-match "\n" string)) (if (> (length string) 0) (progn (process-put proc ... string))) (progn (or (eq ... ...) (cl--assertion-failed ...)) nil) (let ((request ...) (coding-system ...) nowait frame display parent-id dontkill commands dir use-current-frame frame-parameters tty-name tty-type files filepos args-left) (setq string (substring string ...)) (setq args-left (mapcar ... ...)) (while args-left (let* ... ...)) (and nowait (not ...) (or files commands) (setq use-current-frame t)) (setq frame (cond ... ... ...)) (process-put proc (quote continuation) (function ...)) (if (or frame files) (progn ...)) (server-execute-continuation proc)))) (error (server-return-error proc err))))) #<process server <127.0.0.1:51916>> "-auth CeLJjxqPh;g)}c&lFS%D/n<X!18j6o%s{`3%-&=k1loW-aoAa(!otMOTY>\\H~I8? -dir /home/liveuser/ -current-frame -tty /dev/pts/1 xterm-256color -file file.txt \n")
  apply(ad-Advice-server-process-filter (closure (t) (proc string) "Process a request from the server to edit some files.\nPROC is the server process.  STRING consists of a sequence of\ncommands prefixed by a dash.  Some commands have arguments;\nthese are &-quoted and need to be decoded by `server-unquote-arg'.\nThe filter parses and executes these commands.\n\nTo illustrate the protocol, here is an example command that\nemacsclient sends to create a new X frame (note that the whole\nsequence is sent on a single line):\n\n	-env HOME=/home/lorentey\n	-env DISPLAY=:0.0\n	... lots of other -env commands\n	-display :0.0\n	-window-system\n\nThe following commands are accepted by the server:\n\n`-auth AUTH-STRING'\n  Authenticate the client using the secret authentication string\n  AUTH-STRING.\n\n`-env NAME=VALUE'\n  An environment variable on the client side.\n\n`-dir DIRNAME'\n  The current working directory of the client process.\n\n`-current-frame'\n  Forbid the creation of new frames.\n\n`-frame-parameters ALIST'\n  Set the parameters of the created frame.\n\n`-nowait'\n  Request that the next frame created should not be\n  associated with this client.\n\n`-display DISPLAY'\n  Set the display name to open X frames on.\n\n`-position LINE[:COLUMN]'\n  Go to the given line and column number\n  in the next file opened.\n\n`-file FILENAME'\n  Load the given file in the current frame.\n\n`-eval EXPR'\n  Evaluate EXPR as a Lisp expression and return the\n  result in -print commands.\n\n`-window-system'\n  Open a new X frame.\n\n`-tty DEVICENAME TYPE'\n  Open a new tty frame at the client.\n\n`-suspend'\n  Suspend this tty frame.  The client sends this string in\n  response to SIGTSTP and SIGTTOU.  The server must cease all I/O\n  on this tty until it gets a -resume command.\n\n`-resume'\n  Resume this tty frame.  The client sends this string when it\n  gets the SIGCONT signal and it is the foreground process on its\n  controlling tty.\n\n`-ignore COMMENT'\n  Do nothing, but put the comment in the server log.\n  Useful for debugging.\n\n\nThe following commands are accepted by the client:\n\n`-emacs-pid PID'\n  Describes the process id of the Emacs process;\n  used to forward window change signals to it.\n\n`-window-system-unsupported'\n  Signals that the server does not support creating X frames;\n  the client must try again with a tty frame.\n\n`-print STRING'\n  Print STRING on stdout.  Used to send values\n  returned by -eval.\n\n`-print-nonl STRING'\n  Print STRING on stdout.  Used to continue a\n  preceding -print command that would be too big to send\n  in a single message.\n\n`-error DESCRIPTION'\n  Signal an error and delete process PROC.\n\n`-suspend'\n  Suspend this terminal, i.e., stop the client process.\n  Sent when the user presses C-z." (catch (quote --cl-block-server-process-filter--) (server-log (concat "Received " string) proc) (if (process-get proc :authenticated) nil (if (and (string-match "-auth \\([!-~]+\\)\n?" string) (equal (match-string 1 string) (process-get proc :auth-key))) (progn (setq string (substring string (match-end 0))) (process-put proc :authenticated t) (server-log "Authentication successful" proc)) (server-log "Authentication failed" proc) (server-send-string proc (concat "-error " (server-quote-arg "Authentication failed"))) (sit-for 1) (delete-process proc) (throw (quote --cl-block-server-process-filter--) nil))) (let ((prev (process-get proc (quote previous-string)))) (if prev (progn (setq string (concat prev string)) (process-put proc (quote previous-string) nil)))) (condition-case err (progn (server-add-client proc) (server-send-string proc (concat "-emacs-pid " (number-to-string (emacs-pid)) "\n")) (if (not (string-match "\n" string)) (if (> (length string) 0) (progn (process-put proc ... string))) (progn (or (eq ... ...) (cl--assertion-failed ...)) nil) (let ((request ...) (coding-system ...) nowait frame display parent-id dontkill commands dir use-current-frame frame-parameters tty-name tty-type files filepos args-left) (setq string (substring string ...)) (setq args-left (mapcar ... ...)) (while args-left (let* ... ...)) (and nowait (not ...) (or files commands) (setq use-current-frame t)) (setq frame (cond ... ... ...)) (process-put proc (quote continuation) (function ...)) (if (or frame files) (progn ...)) (server-execute-continuation proc)))) (error (server-return-error proc err))))) (#<process server <127.0.0.1:51916>> "-auth CeLJjxqPh;g)}c&lFS%D/n<X!18j6o%s{`3%-&=k1loW-aoAa(!otMOTY>\\H~I8? -dir /home/liveuser/ -current-frame -tty /dev/pts/1 xterm-256color -file file.txt \n"))
  server-process-filter(#<process server <127.0.0.1:51916>> "-auth CeLJjxqPh;g)}c&lFS%D/n<X!18j6o%s{`3%-&=k1loW-aoAa(!otMOTY>\\H~I8? -dir /home/liveuser/ -current-frame -tty /dev/pts/1 xterm-256color -file file.txt \n")

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#26310: 25.1; Emacsclient to emacs --daemon frame/connection error
  2017-03-31  7:51   ` Live System User
@ 2017-04-01  3:50     ` npostavs
  2017-04-15  3:24       ` uLive System User
  0 siblings, 1 reply; 6+ messages in thread
From: npostavs @ 2017-04-01  3:50 UTC (permalink / raw)
  To: Live System User; +Cc: 26310

Live System User <nyc4bos@aol.com> writes:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   isearch-done(t)
>   isearch-cancel()

Ah, that one.  This should be fixed already in 25.2, since #21091
"`isearch-done' called before `isearch-update' raises wrong-type-arg
error" was fixed.

Do you happen to know how you got into this state though?  That
isearch-cancel is being called at all might be a bug in itself, although
I never found out how to reproduce it...





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#26310: 25.1; Emacsclient to emacs --daemon frame/connection error
  2017-04-01  3:50     ` npostavs
@ 2017-04-15  3:24       ` uLive System User
  2017-04-15 14:29         ` npostavs
  0 siblings, 1 reply; 6+ messages in thread
From: uLive System User @ 2017-04-15  3:24 UTC (permalink / raw)
  To: npostavs; +Cc: 26310

npostavs@users.sourceforge.net writes:

> Live System User <nyc4bos@aol.com> writes:
>>
>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>   isearch-done(t)
>>   isearch-cancel()
>
> Ah, that one.  This should be fixed already in 25.2, since #21091
> "`isearch-done' called before `isearch-update' raises wrong-type-arg
> error" was fixed.

  I eval'ed your patched version of isearch.el into my Emacs daemon
  and "emacsclient <file>" started working again, so thank you for
  the fix.
  
>
> Do you happen to know how you got into this state though?  That
> isearch-cancel is being called at all might be a bug in itself, although
> I never found out how to reproduce it...

  I don't recall what I was doing specifically.  I keep a long-running
  Emacs daemon around and use emacsclient to connect to it regularly
  to edit files and update my Gnu ELPA packages.

 Thanks.
 





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#26310: 25.1; Emacsclient to emacs --daemon frame/connection error
  2017-04-15  3:24       ` uLive System User
@ 2017-04-15 14:29         ` npostavs
  0 siblings, 0 replies; 6+ messages in thread
From: npostavs @ 2017-04-15 14:29 UTC (permalink / raw)
  To: uLive System User; +Cc: 26310

tags 26310 fixed
close 26310 25.2
quit

uLive System User <nyc4bos@aol.com> writes:

> npostavs@users.sourceforge.net writes:
>
>> Live System User <nyc4bos@aol.com> writes:
>>>
>>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>>   isearch-done(t)
>>>   isearch-cancel()
>>
>> Ah, that one.  This should be fixed already in 25.2, since #21091
>> "`isearch-done' called before `isearch-update' raises wrong-type-arg
>> error" was fixed.
>
>   I eval'ed your patched version of isearch.el into my Emacs daemon
>   and "emacsclient <file>" started working again, so thank you for
>   the fix.

Thanks for confirming.
   
>>
>> Do you happen to know how you got into this state though?  That
>> isearch-cancel is being called at all might be a bug in itself, although
>> I never found out how to reproduce it...
>
>   I don't recall what I was doing specifically.  I keep a long-running
>   Emacs daemon around and use emacsclient to connect to it regularly
>   to edit files and update my Gnu ELPA packages.

Yeah, the problem is that you wouldn't notice the state change
immediately, makes it pretty much impossible to catch this...






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-15 14:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-30 14:31 bug#26310: 25.1; Emacsclient to emacs --daemon frame/connection error Live System User
2017-03-31  1:26 ` npostavs
2017-03-31  7:51   ` Live System User
2017-04-01  3:50     ` npostavs
2017-04-15  3:24       ` uLive System User
2017-04-15 14:29         ` npostavs

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).