Subject: Re: bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs

From: Visuwesh <[email-masked]>
Date: Sun, 12 Jun 2022 13:22:25 +0530

[ஞாயிறு ஜூன் 12, 2022 10:03] Eli Zaretskii wrote:

>> From: Po Lu <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Sun, 12 Jun 2022 14:40:11 +0800
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > In addition, I don't think I understand what is the feature (in
>> > user-level terms, not in terms of X-specific internal details) is
>> > being sought out here.
>> >
>> > The discussion mentioned various options of Emacs and emacsclient,
>> > which are meant to support multiple Emacs servers running on the same
>> > system and the ability of emacsclient to connect to one specific
>> > server.  This functionality does work, so if that is not what is being
>> > requested here, then what is?  IOW, why is important what is the
>> > WM_CLASS of Emacs?
>> 
>> I think what Vladmir wants is for two copies of Emacs to be displayed as
>> two "different" applications by pagers and window managers, which rely
>> on the WM_CLASS property of a window to associate it with an
>> application.
>
> Why?  What would that gain in user-level terms?

WM_CLASS and WM_NAME are commonly matched against in "window manager
rules."  For example, I have a script that essentially calls
`make-frame' with a specific frame `name' [*] which I then match against
in my window manager configuration to move the frame to the top right
corner of my screen.

[*] I see that Emacs sets WM_CLASS and WM_NAME to the `name' frame
parameter.

        % xprop |grep wm_'\(class\|name\)'
        _NET_WM_NAME(UTF8_STRING) = "vz/calendar-frame"
        WM_CLASS(STRING) = "vz_calendar-frame", "Emacs"
        WM_NAME(STRING) = "vz/calendar-frame"