A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01745.html below:

Re: How to get DISPLAY of emacsclient?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] 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.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4