|
From: | Jim Porter |
Subject: | Re: How to get DISPLAY of emacsclient? |
Date: | Sun, 27 Nov 2022 12:36:34 -0800 |
On 11/25/2022 7:36 PM, Max Nikulin wrote:
On 25/11/2022 23:57, Stefan Monnier wrote:- you can check the `display` parameter of the selected frame (should handle the `emacsclient --display` case).emacsclient --display "$DISPLAY" \ --eval "(frame-parameter (selected-frame) 'display)"may be a workaround, thank you for the idea. A caveat is that --display parameter becomes mandatory, DISPLAY environment is not enough...
Looking through the emacsclient.c code, I think this is intentional, and if you want to do something like this, the above workaround is exactly what you're supposed to do:
If the -c option is used (without -t) and no --display argument is provided, try $DISPLAY. Without the -c option, we used to set 'display' to $DISPLAY by default, but this changed the default behavior and is sometimes inconvenient. So we force users to use "--display $DISPLAY" if they want Emacs to connect to their current display.
[Prev in Thread] | Current Thread | [Next in Thread] |