unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* emacsclient in 25 branch: error opening any file
@ 2016-06-01 19:10 Joseph Mingrone
  2016-06-01 19:34 ` Joseph Mingrone
  2016-06-04  9:06 ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Joseph Mingrone @ 2016-06-01 19:10 UTC (permalink / raw)
  To: emacs-devel

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

Hi,

After starting an Emacs daemon, everything works as expected, but after some
time (or event I'm unaware of), trying to open a file from a shell gives an
error.

% emacsclient some_file
Waiting for Emacs...
*ERROR*: Wrong type argument: stringp, nil

I can create new frames, so the daemon is alive and reachable, but the error is
still reported.

% emacsclient -nc
*ERROR*: Wrong type argument: stringp, nil
(new frame opens)

Creating a new frame without the -n flag fails.

% emacsclient -nc
*ERROR*: Wrong type argument: stringp, nil
(no new frame)

How should I debug this?  Using (setq debug-on-error t) doesn't help.

This is with the 5th pretest for 25, but the problem has been around earlier in
the 25 branch.

Regards,

Joseph

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: emacsclient in 25 branch: error opening any file
  2016-06-01 19:10 emacsclient in 25 branch: error opening any file Joseph Mingrone
@ 2016-06-01 19:34 ` Joseph Mingrone
  2016-06-04  9:06 ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: Joseph Mingrone @ 2016-06-01 19:34 UTC (permalink / raw)
  To: emacs-devel

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

Joseph Mingrone <jrm@ftfl.ca> writes:
> After starting an Emacs daemon, everything works as expected, but after some
> time (or event I'm unaware of), trying to open a file from a shell gives an
> error.

> % emacsclient some_file Waiting for Emacs...  *ERROR*: Wrong type argument:
> stringp, nil

> I can create new frames, so the daemon is alive and reachable, but the error
> is still reported.

> % emacsclient -nc *ERROR*: Wrong type argument: stringp, nil (new frame opens)

> Creating a new frame without the -n flag fails.

> % emacsclient -nc *ERROR*: Wrong type argument: stringp, nil (no new frame)

> How should I debug this?  Using (setq debug-on-error t) doesn't help.

> This is with the 5th pretest for 25, but the problem has been around earlier
> in the 25 branch.

After the problem has been triggered, this still works without an error.

% emacsclient -e '(find-file "~/some_file")'

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: emacsclient in 25 branch: error opening any file
  2016-06-01 19:10 emacsclient in 25 branch: error opening any file Joseph Mingrone
  2016-06-01 19:34 ` Joseph Mingrone
@ 2016-06-04  9:06 ` Eli Zaretskii
  2016-06-05  5:32   ` Joseph Mingrone
  2016-11-28 18:46   ` Joseph Mingrone
  1 sibling, 2 replies; 7+ messages in thread
From: Eli Zaretskii @ 2016-06-04  9:06 UTC (permalink / raw)
  To: Joseph Mingrone; +Cc: emacs-devel

> From: Joseph Mingrone <jrm@ftfl.ca>
> Date: Wed, 01 Jun 2016 16:10:49 -0300
> 
> After starting an Emacs daemon, everything works as expected, but after some
> time (or event I'm unaware of), trying to open a file from a shell gives an
> error.
> 
> % emacsclient some_file
> Waiting for Emacs...
> *ERROR*: Wrong type argument: stringp, nil

Please try to figure out which Emacs function signals this error.

Thanks.



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

* Re: emacsclient in 25 branch: error opening any file
  2016-06-04  9:06 ` Eli Zaretskii
@ 2016-06-05  5:32   ` Joseph Mingrone
  2016-11-28 18:46   ` Joseph Mingrone
  1 sibling, 0 replies; 7+ messages in thread
From: Joseph Mingrone @ 2016-06-05  5:32 UTC (permalink / raw)
  To: Eli Zaretskii, Andrés Ramírez; +Cc: emacs-devel

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

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Joseph Mingrone <jrm@ftfl.ca> Date: Wed, 01 Jun 2016 16:10:49 -0300

>> After starting an Emacs daemon, everything works as expected, but after some
>> time (or event I'm unaware of), trying to open a file from a shell gives an
>> error.

>> % emacsclient some_file Waiting for Emacs...  *ERROR*: Wrong type argument:
>> stringp, nil

> Please try to figure out which Emacs function signals this error.

I managed to trigger the issue again today.  I tried instrumenting various
functions in server.el and was able to enter the function server-add-client
before the error was displayed at the terminal.  I know the error occurs
somewhere inside the add-to-list call, but I foolishly killed the frame before I
was clear on the exact error.  After closing the frame, the debugger wouldn't
stop in server-add-client.

Andrés Ramírez <sunshavi@fastmail.fm> writes:
> Does 'emacsclient -c -t' works for You?

Same error.

Another issue (or my misunderstanding)...

% emacs -Q --daemon (setq server-log t)
% emacsclient -nc some_file.txt

No matter what client/server activity I try, no *server* buffer is created.
Instrumenting server-log shows that the function is being called and the (when
server-log... is true.

I'll write more when I know more.

Joseph

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: emacsclient in 25 branch: error opening any file
@ 2016-06-05 13:18 Live System User
  0 siblings, 0 replies; 7+ messages in thread
From: Live System User @ 2016-06-05 13:18 UTC (permalink / raw)
  To: emacs-devel


Joseph Mingrone writes:

> Another issue (or my misunderstanding)...

> % emacs -Q --daemon (setq server-log t)

  That should be:

          % emacs -Q --daemon --eval '(setq server-log t)'

> % emacsclient -nc some_file.txt
> 
> No matter what client/server activity I try, no *server* buffer is created.
> Instrumenting server-log shows that the function is being called and the (when
> server-log... is true.

  The  *server* buffer created is " *server*", that is *server* with
  a leading space character before the first "*" character.

 





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

* Re: emacsclient in 25 branch: error opening any file
  2016-06-04  9:06 ` Eli Zaretskii
  2016-06-05  5:32   ` Joseph Mingrone
@ 2016-11-28 18:46   ` Joseph Mingrone
  2016-11-28 19:08     ` Noam Postavsky
  1 sibling, 1 reply; 7+ messages in thread
From: Joseph Mingrone @ 2016-11-28 18:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

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

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Joseph Mingrone <jrm@ftfl.ca>
>> Date: Wed, 01 Jun 2016 16:10:49 -0300

>> After starting an Emacs daemon, everything works as expected, but after some
>> time (or event I'm unaware of), trying to open a file from a shell gives an
>> error.

>> % emacsclient some_file
>> Waiting for Emacs...
>> *ERROR*: Wrong type argument: stringp, nil

> Please try to figure out which Emacs function signals this error.

Joel Rosdahl (joel@rosdahl.net) has done some detective work:
> Here's how to reproduce (at least my version of) the problem:

> emacs -q --daemon
> emacsclient -nc
> In Emacs: C-s                         ; enter isearch-mode
> emacsclient -e '(find-file ".")'
> In Emacs: C-x b RET
> emacsclient .

> What seems to happen is that isearch-mode can be left in a bad state after
> using "emacsclient -e", and then server-goto-toplevel tries to perform
> isearch-cancel on the buffer, which fails since isearch--current-buffer is
> nil (while isearch-mode is non-nil).

> This part of isearch-done seems to have been added to Emacs 25, and that's
> what fails when isearch--current-buffer is nil:

> (with-current-buffer isearch--current-buffer
>   (setq isearch--current-buffer nil)
>   (setq cursor-sensor-inhibit (delq 'isearch cursor-sensor-inhibit)))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 930 bytes --]

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

* Re: emacsclient in 25 branch: error opening any file
  2016-11-28 18:46   ` Joseph Mingrone
@ 2016-11-28 19:08     ` Noam Postavsky
  0 siblings, 0 replies; 7+ messages in thread
From: Noam Postavsky @ 2016-11-28 19:08 UTC (permalink / raw)
  To: Joseph Mingrone; +Cc: Eli Zaretskii, Emacs developers

On Mon, Nov 28, 2016 at 1:46 PM, Joseph Mingrone <jrm@ftfl.ca> wrote:
> Joel Rosdahl (joel@rosdahl.net) has done some detective work:
>> Here's how to reproduce (at least my version of) the problem:
>
>> emacs -q --daemon
>> emacsclient -nc
>> In Emacs: C-s                         ; enter isearch-mode
>> emacsclient -e '(find-file ".")'
>> In Emacs: C-x b RET
>> emacsclient .
>
>> What seems to happen is that isearch-mode can be left in a bad state after
>> using "emacsclient -e", and then server-goto-toplevel tries to perform
>> isearch-cancel on the buffer, which fails since isearch--current-buffer is
>> nil (while isearch-mode is non-nil).
>
>> This part of isearch-done seems to have been added to Emacs 25, and that's
>> what fails when isearch--current-buffer is nil:
>
>> (with-current-buffer isearch--current-buffer
>>   (setq isearch--current-buffer nil)
>>   (setq cursor-sensor-inhibit (delq 'isearch cursor-sensor-inhibit)))

isearch-done in the current emacs-25 branch checks that
isearch--current-buffer is a live buffer, see also
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21091

Not sure if having isearch--current-buffer be nil in this case is
actually an additional bug.



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

end of thread, other threads:[~2016-11-28 19:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 19:10 emacsclient in 25 branch: error opening any file Joseph Mingrone
2016-06-01 19:34 ` Joseph Mingrone
2016-06-04  9:06 ` Eli Zaretskii
2016-06-05  5:32   ` Joseph Mingrone
2016-11-28 18:46   ` Joseph Mingrone
2016-11-28 19:08     ` Noam Postavsky
  -- strict thread matches above, loose matches on Subject: below --
2016-06-05 13:18 Live System User

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