* bug#24147: emacsclient should pass frame-parameters to tty frames
@ 2016-08-03 23:51 Michael Shields
2016-08-06 10:06 ` Eli Zaretskii
2019-06-25 11:58 ` Lars Ingebrigtsen
0 siblings, 2 replies; 7+ messages in thread
From: Michael Shields @ 2016-08-03 23:51 UTC (permalink / raw)
To: 24147
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
Currently, emacsclient's --frame-parameters argument is silently
ignored when creating frames on a tty. This prevents emacsclient from
giving the new frame a name.
I've attached a patch that corrects this.
My employer, Google, has an existing contributor license agreement
that covers this change.
[-- Attachment #2: 0001-Pass-frame-parameters-to-server-create-tty-frame.patch --]
[-- Type: application/octet-stream, Size: 1955 bytes --]
From 52afa89b994d73275738e78baf0442b2cd995003 Mon Sep 17 00:00:00 2001
From: Michael Shields <shields@msrl.com>
Date: Wed, 3 Aug 2016 16:17:05 -0700
Subject: [PATCH 1/1] Pass frame-parameters to server-create-tty-frame
This is useful for, at least, naming frames:
emacsclient -c -F '((name . "foo"))'
* lisp/server.el: Pass frame-parameters when creating frames, even on a
tty.
---
lisp/server.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/server.el b/lisp/server.el
index e4cf431..9c4b53d 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -792,7 +792,7 @@ This handles splitting the command if it would be bigger than
(setq prefix "-print-nonl "))
(server-send-string proc (concat prefix qtext "\n"))))
-(defun server-create-tty-frame (tty type proc)
+(defun server-create-tty-frame (tty type proc parameters)
(unless tty
(error "Invalid terminal device"))
(unless type
@@ -825,7 +825,8 @@ This handles splitting the command if it would be bigger than
;; envvars, and then to change the
;; C functions `child_setup' and
;; `getenv_internal' accordingly.
- (environment . ,(process-get proc 'env)))))))
+ (environment . ,(process-get proc 'env))
+ ,@parameters)))))
;; ttys don't use the `display' parameter, but callproc.c does to set
;; the DISPLAY environment on subprocesses.
@@ -1241,7 +1242,8 @@ The following commands are accepted by the client:
frame-parameters))
;; When resuming on a tty, tty-name is nil.
(tty-name
- (server-create-tty-frame tty-name tty-type proc))))
+ (server-create-tty-frame tty-name tty-type proc
+ frame-parameters))))
(process-put
proc 'continuation
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#24147: emacsclient should pass frame-parameters to tty frames
2016-08-03 23:51 bug#24147: emacsclient should pass frame-parameters to tty frames Michael Shields
@ 2016-08-06 10:06 ` Eli Zaretskii
2016-08-24 15:08 ` Michael Shields
2019-06-25 11:58 ` Lars Ingebrigtsen
1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2016-08-06 10:06 UTC (permalink / raw)
To: Michael Shields; +Cc: 24147
> From: Michael Shields <shields@msrl.com>
> Date: Wed, 3 Aug 2016 16:51:06 -0700
>
> Currently, emacsclient's --frame-parameters argument is silently
> ignored when creating frames on a tty. This prevents emacsclient from
> giving the new frame a name.
>
> I've attached a patch that corrects this.
Thanks. But I think, for compatibility with the GUI use case, the
additional parameter should be &optional, not mandatory.
Are there other arguments we currently pass to GUI frames, but not to
TTY frames, which might make sense on TTY frames as well? If so, I
think we should make these two types of use more similar.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#24147: emacsclient should pass frame-parameters to tty frames
2016-08-06 10:06 ` Eli Zaretskii
@ 2016-08-24 15:08 ` Michael Shields
2016-08-24 15:15 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Michael Shields @ 2016-08-24 15:08 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 24147
On Sat, Aug 6, 2016 at 3:06 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> Thanks. But I think, for compatibility with the GUI use case, the
> additional parameter should be &optional, not mandatory.
Isn't server-process-filter the only caller of server-create-tty-frame?
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#24147: emacsclient should pass frame-parameters to tty frames
2016-08-24 15:08 ` Michael Shields
@ 2016-08-24 15:15 ` Eli Zaretskii
2016-08-24 15:20 ` Michael Shields
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2016-08-24 15:15 UTC (permalink / raw)
To: Michael Shields; +Cc: 24147
> From: Michael Shields <shields@msrl.com>
> Date: Wed, 24 Aug 2016 08:08:15 -0700
> Cc: 24147@debbugs.gnu.org
>
> On Sat, Aug 6, 2016 at 3:06 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Thanks. But I think, for compatibility with the GUI use case, the
> > additional parameter should be &optional, not mandatory.
>
> Isn't server-process-filter the only caller of server-create-tty-frame?
Sorry, I don't see how that fact is relevant. As I said, I'd like
server-create-window-system-frame and server-create-tty-frame be
compatible wrt their argument lists. I think it's better for
long-term maintainability.
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#24147: emacsclient should pass frame-parameters to tty frames
2016-08-24 15:15 ` Eli Zaretskii
@ 2016-08-24 15:20 ` Michael Shields
2016-08-24 15:57 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Michael Shields @ 2016-08-24 15:20 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 24147
On Wed, Aug 24, 2016 at 8:15 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> Sorry, I don't see how that fact is relevant. As I said, I'd like
> server-create-window-system-frame and server-create-tty-frame be
> compatible wrt their argument lists. I think it's better for
> long-term maintainability.
I don't know why the argument is optional in either of them. There is
only one caller, and it always passes all the arguments.
But, I'll change it if you like.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#24147: emacsclient should pass frame-parameters to tty frames
2016-08-24 15:20 ` Michael Shields
@ 2016-08-24 15:57 ` Eli Zaretskii
0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2016-08-24 15:57 UTC (permalink / raw)
To: Michael Shields; +Cc: 24147
> From: Michael Shields <shields@msrl.com>
> Date: Wed, 24 Aug 2016 08:20:37 -0700
> Cc: 24147@debbugs.gnu.org
>
> On Wed, Aug 24, 2016 at 8:15 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Sorry, I don't see how that fact is relevant. As I said, I'd like
> > server-create-window-system-frame and server-create-tty-frame be
> > compatible wrt their argument lists. I think it's better for
> > long-term maintainability.
>
> I don't know why the argument is optional in either of them. There is
> only one caller, and it always passes all the arguments.
That argument was optional since it was introduced 5 years ago, so I
see no reason to change it now.
> But, I'll change it if you like.
Please do, and thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#24147: emacsclient should pass frame-parameters to tty frames
2016-08-03 23:51 bug#24147: emacsclient should pass frame-parameters to tty frames Michael Shields
2016-08-06 10:06 ` Eli Zaretskii
@ 2019-06-25 11:58 ` Lars Ingebrigtsen
1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-25 11:58 UTC (permalink / raw)
To: Michael Shields; +Cc: 24147
Michael Shields <shields@msrl.com> writes:
> Currently, emacsclient's --frame-parameters argument is silently
> ignored when creating frames on a tty. This prevents emacsclient from
> giving the new frame a name.
>
> I've attached a patch that corrects this.
I've now applied the patch to the Emacs trunk, adjusting for Eli's
comments about the PARAMETERS argument being optional.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-06-25 11:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03 23:51 bug#24147: emacsclient should pass frame-parameters to tty frames Michael Shields
2016-08-06 10:06 ` Eli Zaretskii
2016-08-24 15:08 ` Michael Shields
2016-08-24 15:15 ` Eli Zaretskii
2016-08-24 15:20 ` Michael Shields
2016-08-24 15:57 ` Eli Zaretskii
2019-06-25 11:58 ` Lars Ingebrigtsen
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).