GNU bug report logs - #25547
25.1.91; emacsclient -c creates frames on the wrong display

Previous Next

Package: emacs;

Reported by: Alex Hutcheson <alexhutcheson <at> google.com>

Date: Thu, 26 Jan 2017 18:11:01 UTC

Severity: normal

Merged with 30382

Found in versions 25.1.91, 27.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #37 received at 25547 <at> debbugs.gnu.org (full text, mbox):

From: Eliza Velasquez <exv <at> google.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25547 <at> debbugs.gnu.org, Alex Hutcheson <alexhutcheson <at> google.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#25547: 25.1.91;
 emacsclient -c creates frames on the wrong display
Date: Fri, 6 Nov 2020 11:14:42 -0800
To answer your second question first, if we try to use
server-create-tty-frame, Emacs will try to run display the frame in
the terminal of the calling client, which it can't do in the case of a
dumb terminal. The next best thing would be to allocate a new frame on
an existing frame's terminal, whether that is on the tty or window
system. Currently a dumb terminal running `emacsclient -c` can only
create new frames on the window system, and this patch should allow it
to create new frames on an existing tty terminal as well (once it's
working correctly). As the initial report suggests, most of the time a
dumb terminal is running `emacsclient -c`, its because it was called
as part of a script in an Emacs subprocess.

Also, I'll rename the function to something like
(server-create-frame-on-selected-terminal) since I agree its purpose
is not clear from the name.

On Thu, Nov 5, 2020 at 9:39 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > Cc: 25547 <at> debbugs.gnu.org, Alex Hutcheson <alexhutcheson <at> google.com>
> > Date: Thu, 5 Nov 2020 15:41:08 -0800
> > From: Eliza Velasquez via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >
> > +(defun server-create-frame (nowait proc &optional parameters)
>
> This function's name is too general, and therefore will confuse
> someone who tries to learn how server.el works.  Please name it
> according to the convention used by 2 other functions in server.el
> that create GUI and TTY frames.
>
> Btw, why can't you use server-create-tty-frame here?  IOW, I don't
> think I understand this comment:
>
> > +                   ((equal tty-type "dumb")
> > +                    ;; Dumb terminals should create frames without
> > +                    ;; preference for tty or window system (bug#25547)
> > +                    (server-create-frame nowait proc frame-parameters))
>
> Thanks.




This bug report was last modified 4 years and 249 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.