unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
@ 2020-06-05  3:09 Vladimir Lomov
  2020-06-05 11:14 ` Basil L. Contovounesios
                   ` (3 more replies)
  0 siblings, 4 replies; 34+ messages in thread
From: Vladimir Lomov @ 2020-06-05  3:09 UTC (permalink / raw)
  To: 41719


The 'emacs' allows to set the so-called 'instance' when run in X window
system using '--name' option. The same time the 'emacsclient' doesn't
have such option and if 'emacs' is run in daemon mode ('emacs
--daemon=...') it is impossible (?) to change the 'instance' of emacs
window (frame in Emacs terminology) created by 'emacsclient'.

I tried to use '-F' option of 'emacsclient' but I didn't get desire
result, WM_CLASS isn't changed, only WM_ICON_NAME. It is possible that I
do things wrong,

  $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") (title . "USER@HOST"))'

but this topic is covered by manual (Emacs, 21.11 "Frame Parameters" and
Emacs Lisp 29.4.3 "Window Frame Parameters") very unclear.

Even if it is possible to change the 'instance' of Emacs window created
by 'emacsclient' using the '-F' option it would be nice to have more
simple way to achieve this. On the other hand, if Emacs is run in daemon
mode it is the purpose of emacsclient to (allow to) set the 'instance'
and 'title' of created window.



In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.17.3)
 of 2020-06-04 built on node2-smoon7.bkoty.ru
Repository revision: 638ef457876c14b9d713e2fa991f5db3ad53c4f9
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Arch Linux

Recent messages:
Entering debugger...
Back to top level
Entering debugger...
Back to top level
Entering debugger...
Back to top level
When done with this frame, type C-x 5 0
kill-line: End of buffer
When done with this frame, type C-x 5 0 [2 times]
Making completion list...

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
 --libexecdir=/usr/lib --with-x-toolkit=gtk3 --with-cairo --with-xft
 --with-modules --with-xml2 --enable-link-time-optimization
 --without-imagemagick --without-gconf 'CFLAGS=-march=x86-64
 -mtune=generic -O2 -pipe -fno-plt'
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
 CPPFLAGS=-D_FORTIFY_SOURCE=2'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD PDUMPER
LCMS2 GMP

Important settings:
  value of $LC_COLLATE: en_US.UTF-8
  value of $LANG: ru_RU.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  recentf-mode: t
  pdf-occur-global-minor-mode: t
  shell-dirtrack-mode: t
  global-undo-tree-mode: t
  show-paren-mode: t
  savehist-mode: t
  ido-everywhere: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/usr/share/emacs/site-lisp/org/ox hides /usr/share/emacs/28.0.50/lisp/org/ox
/usr/share/emacs/site-lisp/org/ox-texinfo hides /usr/share/emacs/28.0.50/lisp/org/ox-texinfo
/usr/share/emacs/site-lisp/org/ox-publish hides /usr/share/emacs/28.0.50/lisp/org/ox-publish
/usr/share/emacs/site-lisp/org/ox-org hides /usr/share/emacs/28.0.50/lisp/org/ox-org
/usr/share/emacs/site-lisp/org/ox-odt hides /usr/share/emacs/28.0.50/lisp/org/ox-odt
/usr/share/emacs/site-lisp/org/ox-md hides /usr/share/emacs/28.0.50/lisp/org/ox-md
/usr/share/emacs/site-lisp/org/ox-man hides /usr/share/emacs/28.0.50/lisp/org/ox-man
/usr/share/emacs/site-lisp/org/ox-latex hides /usr/share/emacs/28.0.50/lisp/org/ox-latex
/usr/share/emacs/site-lisp/org/ox-icalendar hides /usr/share/emacs/28.0.50/lisp/org/ox-icalendar
/usr/share/emacs/site-lisp/org/ox-html hides /usr/share/emacs/28.0.50/lisp/org/ox-html
/usr/share/emacs/site-lisp/org/ox-beamer hides /usr/share/emacs/28.0.50/lisp/org/ox-beamer
/usr/share/emacs/site-lisp/org/ox-ascii hides /usr/share/emacs/28.0.50/lisp/org/ox-ascii
/usr/share/emacs/site-lisp/org/org hides /usr/share/emacs/28.0.50/lisp/org/org
/usr/share/emacs/site-lisp/org/org-version hides /usr/share/emacs/28.0.50/lisp/org/org-version
/usr/share/emacs/site-lisp/org/org-timer hides /usr/share/emacs/28.0.50/lisp/org/org-timer
/usr/share/emacs/site-lisp/org/org-tempo hides /usr/share/emacs/28.0.50/lisp/org/org-tempo
/usr/share/emacs/site-lisp/org/org-table hides /usr/share/emacs/28.0.50/lisp/org/org-table
/usr/share/emacs/site-lisp/org/org-src hides /usr/share/emacs/28.0.50/lisp/org/org-src
/usr/share/emacs/site-lisp/org/org-protocol hides /usr/share/emacs/28.0.50/lisp/org/org-protocol
/usr/share/emacs/site-lisp/org/org-plot hides /usr/share/emacs/28.0.50/lisp/org/org-plot
/usr/share/emacs/site-lisp/org/org-pcomplete hides /usr/share/emacs/28.0.50/lisp/org/org-pcomplete
/usr/share/emacs/site-lisp/org/org-num hides /usr/share/emacs/28.0.50/lisp/org/org-num
/usr/share/emacs/site-lisp/org/org-mouse hides /usr/share/emacs/28.0.50/lisp/org/org-mouse
/usr/share/emacs/site-lisp/org/org-mobile hides /usr/share/emacs/28.0.50/lisp/org/org-mobile
/usr/share/emacs/site-lisp/org/org-macs hides /usr/share/emacs/28.0.50/lisp/org/org-macs
/usr/share/emacs/site-lisp/org/org-macro hides /usr/share/emacs/28.0.50/lisp/org/org-macro
/usr/share/emacs/site-lisp/org/org-loaddefs hides /usr/share/emacs/28.0.50/lisp/org/org-loaddefs
/usr/share/emacs/site-lisp/org/org-list hides /usr/share/emacs/28.0.50/lisp/org/org-list
/usr/share/emacs/site-lisp/org/org-lint hides /usr/share/emacs/28.0.50/lisp/org/org-lint
/usr/share/emacs/site-lisp/org/org-keys hides /usr/share/emacs/28.0.50/lisp/org/org-keys
/usr/share/emacs/site-lisp/org/org-install hides /usr/share/emacs/28.0.50/lisp/org/org-install
/usr/share/emacs/site-lisp/org/org-inlinetask hides /usr/share/emacs/28.0.50/lisp/org/org-inlinetask
/usr/share/emacs/site-lisp/org/org-indent hides /usr/share/emacs/28.0.50/lisp/org/org-indent
/usr/share/emacs/site-lisp/org/org-id hides /usr/share/emacs/28.0.50/lisp/org/org-id
/usr/share/emacs/site-lisp/org/org-habit hides /usr/share/emacs/28.0.50/lisp/org/org-habit
/usr/share/emacs/site-lisp/org/org-goto hides /usr/share/emacs/28.0.50/lisp/org/org-goto
/usr/share/emacs/site-lisp/org/org-footnote hides /usr/share/emacs/28.0.50/lisp/org/org-footnote
/usr/share/emacs/site-lisp/org/org-feed hides /usr/share/emacs/28.0.50/lisp/org/org-feed
/usr/share/emacs/site-lisp/org/org-faces hides /usr/share/emacs/28.0.50/lisp/org/org-faces
/usr/share/emacs/site-lisp/org/org-entities hides /usr/share/emacs/28.0.50/lisp/org/org-entities
/usr/share/emacs/site-lisp/org/org-element hides /usr/share/emacs/28.0.50/lisp/org/org-element
/usr/share/emacs/site-lisp/org/org-duration hides /usr/share/emacs/28.0.50/lisp/org/org-duration
/usr/share/emacs/site-lisp/org/org-datetree hides /usr/share/emacs/28.0.50/lisp/org/org-datetree
/usr/share/emacs/site-lisp/org/org-ctags hides /usr/share/emacs/28.0.50/lisp/org/org-ctags
/usr/share/emacs/site-lisp/org/org-crypt hides /usr/share/emacs/28.0.50/lisp/org/org-crypt
/usr/share/emacs/site-lisp/org/org-compat hides /usr/share/emacs/28.0.50/lisp/org/org-compat
/usr/share/emacs/site-lisp/org/org-colview hides /usr/share/emacs/28.0.50/lisp/org/org-colview
/usr/share/emacs/site-lisp/org/org-clock hides /usr/share/emacs/28.0.50/lisp/org/org-clock
/usr/share/emacs/site-lisp/org/org-capture hides /usr/share/emacs/28.0.50/lisp/org/org-capture
/usr/share/emacs/site-lisp/org/org-attach hides /usr/share/emacs/28.0.50/lisp/org/org-attach
/usr/share/emacs/site-lisp/org/org-attach-git hides /usr/share/emacs/28.0.50/lisp/org/org-attach-git
/usr/share/emacs/site-lisp/org/org-archive hides /usr/share/emacs/28.0.50/lisp/org/org-archive
/usr/share/emacs/site-lisp/org/org-agenda hides /usr/share/emacs/28.0.50/lisp/org/org-agenda
/usr/share/emacs/site-lisp/org/ol hides /usr/share/emacs/28.0.50/lisp/org/ol
/usr/share/emacs/site-lisp/org/ol-w3m hides /usr/share/emacs/28.0.50/lisp/org/ol-w3m
/usr/share/emacs/site-lisp/org/ol-rmail hides /usr/share/emacs/28.0.50/lisp/org/ol-rmail
/usr/share/emacs/site-lisp/org/ol-mhe hides /usr/share/emacs/28.0.50/lisp/org/ol-mhe
/usr/share/emacs/site-lisp/org/ol-irc hides /usr/share/emacs/28.0.50/lisp/org/ol-irc
/usr/share/emacs/site-lisp/org/ol-info hides /usr/share/emacs/28.0.50/lisp/org/ol-info
/usr/share/emacs/site-lisp/org/ol-gnus hides /usr/share/emacs/28.0.50/lisp/org/ol-gnus
/usr/share/emacs/site-lisp/org/ol-eww hides /usr/share/emacs/28.0.50/lisp/org/ol-eww
/usr/share/emacs/site-lisp/org/ol-eshell hides /usr/share/emacs/28.0.50/lisp/org/ol-eshell
/usr/share/emacs/site-lisp/org/ol-docview hides /usr/share/emacs/28.0.50/lisp/org/ol-docview
/usr/share/emacs/site-lisp/org/ol-bibtex hides /usr/share/emacs/28.0.50/lisp/org/ol-bibtex
/usr/share/emacs/site-lisp/org/ol-bbdb hides /usr/share/emacs/28.0.50/lisp/org/ol-bbdb
/usr/share/emacs/site-lisp/org/ob hides /usr/share/emacs/28.0.50/lisp/org/ob
/usr/share/emacs/site-lisp/org/ob-vala hides /usr/share/emacs/28.0.50/lisp/org/ob-vala
/usr/share/emacs/site-lisp/org/ob-tangle hides /usr/share/emacs/28.0.50/lisp/org/ob-tangle
/usr/share/emacs/site-lisp/org/ob-table hides /usr/share/emacs/28.0.50/lisp/org/ob-table
/usr/share/emacs/site-lisp/org/ob-stan hides /usr/share/emacs/28.0.50/lisp/org/ob-stan
/usr/share/emacs/site-lisp/org/ob-sqlite hides /usr/share/emacs/28.0.50/lisp/org/ob-sqlite
/usr/share/emacs/site-lisp/org/ob-sql hides /usr/share/emacs/28.0.50/lisp/org/ob-sql
/usr/share/emacs/site-lisp/org/ob-shen hides /usr/share/emacs/28.0.50/lisp/org/ob-shen
/usr/share/emacs/site-lisp/org/ob-shell hides /usr/share/emacs/28.0.50/lisp/org/ob-shell
/usr/share/emacs/site-lisp/org/ob-sed hides /usr/share/emacs/28.0.50/lisp/org/ob-sed
/usr/share/emacs/site-lisp/org/ob-screen hides /usr/share/emacs/28.0.50/lisp/org/ob-screen
/usr/share/emacs/site-lisp/org/ob-scheme hides /usr/share/emacs/28.0.50/lisp/org/ob-scheme
/usr/share/emacs/site-lisp/org/ob-sass hides /usr/share/emacs/28.0.50/lisp/org/ob-sass
/usr/share/emacs/site-lisp/org/ob-ruby hides /usr/share/emacs/28.0.50/lisp/org/ob-ruby
/usr/share/emacs/site-lisp/org/ob-ref hides /usr/share/emacs/28.0.50/lisp/org/ob-ref
/usr/share/emacs/site-lisp/org/ob-python hides /usr/share/emacs/28.0.50/lisp/org/ob-python
/usr/share/emacs/site-lisp/org/ob-processing hides /usr/share/emacs/28.0.50/lisp/org/ob-processing
/usr/share/emacs/site-lisp/org/ob-plantuml hides /usr/share/emacs/28.0.50/lisp/org/ob-plantuml
/usr/share/emacs/site-lisp/org/ob-picolisp hides /usr/share/emacs/28.0.50/lisp/org/ob-picolisp
/usr/share/emacs/site-lisp/org/ob-perl hides /usr/share/emacs/28.0.50/lisp/org/ob-perl
/usr/share/emacs/site-lisp/org/ob-org hides /usr/share/emacs/28.0.50/lisp/org/ob-org
/usr/share/emacs/site-lisp/org/ob-octave hides /usr/share/emacs/28.0.50/lisp/org/ob-octave
/usr/share/emacs/site-lisp/org/ob-ocaml hides /usr/share/emacs/28.0.50/lisp/org/ob-ocaml
/usr/share/emacs/site-lisp/org/ob-mscgen hides /usr/share/emacs/28.0.50/lisp/org/ob-mscgen
/usr/share/emacs/site-lisp/org/ob-maxima hides /usr/share/emacs/28.0.50/lisp/org/ob-maxima
/usr/share/emacs/site-lisp/org/ob-matlab hides /usr/share/emacs/28.0.50/lisp/org/ob-matlab
/usr/share/emacs/site-lisp/org/ob-makefile hides /usr/share/emacs/28.0.50/lisp/org/ob-makefile
/usr/share/emacs/site-lisp/org/ob-lua hides /usr/share/emacs/28.0.50/lisp/org/ob-lua
/usr/share/emacs/site-lisp/org/ob-lob hides /usr/share/emacs/28.0.50/lisp/org/ob-lob
/usr/share/emacs/site-lisp/org/ob-lisp hides /usr/share/emacs/28.0.50/lisp/org/ob-lisp
/usr/share/emacs/site-lisp/org/ob-lilypond hides /usr/share/emacs/28.0.50/lisp/org/ob-lilypond
/usr/share/emacs/site-lisp/org/ob-ledger hides /usr/share/emacs/28.0.50/lisp/org/ob-ledger
/usr/share/emacs/site-lisp/org/ob-latex hides /usr/share/emacs/28.0.50/lisp/org/ob-latex
/usr/share/emacs/site-lisp/org/ob-js hides /usr/share/emacs/28.0.50/lisp/org/ob-js
/usr/share/emacs/site-lisp/org/ob-java hides /usr/share/emacs/28.0.50/lisp/org/ob-java
/usr/share/emacs/site-lisp/org/ob-io hides /usr/share/emacs/28.0.50/lisp/org/ob-io
/usr/share/emacs/site-lisp/org/ob-hledger hides /usr/share/emacs/28.0.50/lisp/org/ob-hledger
/usr/share/emacs/site-lisp/org/ob-haskell hides /usr/share/emacs/28.0.50/lisp/org/ob-haskell
/usr/share/emacs/site-lisp/org/ob-groovy hides /usr/share/emacs/28.0.50/lisp/org/ob-groovy
/usr/share/emacs/site-lisp/org/ob-gnuplot hides /usr/share/emacs/28.0.50/lisp/org/ob-gnuplot
/usr/share/emacs/site-lisp/org/ob-fortran hides /usr/share/emacs/28.0.50/lisp/org/ob-fortran
/usr/share/emacs/site-lisp/org/ob-forth hides /usr/share/emacs/28.0.50/lisp/org/ob-forth
/usr/share/emacs/site-lisp/org/ob-exp hides /usr/share/emacs/28.0.50/lisp/org/ob-exp
/usr/share/emacs/site-lisp/org/ob-eval hides /usr/share/emacs/28.0.50/lisp/org/ob-eval
/usr/share/emacs/site-lisp/org/ob-eshell hides /usr/share/emacs/28.0.50/lisp/org/ob-eshell
/usr/share/emacs/site-lisp/org/ob-emacs-lisp hides /usr/share/emacs/28.0.50/lisp/org/ob-emacs-lisp
/usr/share/emacs/site-lisp/org/ob-ebnf hides /usr/share/emacs/28.0.50/lisp/org/ob-ebnf
/usr/share/emacs/site-lisp/org/ob-dot hides /usr/share/emacs/28.0.50/lisp/org/ob-dot
/usr/share/emacs/site-lisp/org/ob-ditaa hides /usr/share/emacs/28.0.50/lisp/org/ob-ditaa
/usr/share/emacs/site-lisp/org/ob-css hides /usr/share/emacs/28.0.50/lisp/org/ob-css
/usr/share/emacs/site-lisp/org/ob-core hides /usr/share/emacs/28.0.50/lisp/org/ob-core
/usr/share/emacs/site-lisp/org/ob-coq hides /usr/share/emacs/28.0.50/lisp/org/ob-coq
/usr/share/emacs/site-lisp/org/ob-comint hides /usr/share/emacs/28.0.50/lisp/org/ob-comint
/usr/share/emacs/site-lisp/org/ob-clojure hides /usr/share/emacs/28.0.50/lisp/org/ob-clojure
/usr/share/emacs/site-lisp/org/ob-calc hides /usr/share/emacs/28.0.50/lisp/org/ob-calc
/usr/share/emacs/site-lisp/org/ob-awk hides /usr/share/emacs/28.0.50/lisp/org/ob-awk
/usr/share/emacs/site-lisp/org/ob-asymptote hides /usr/share/emacs/28.0.50/lisp/org/ob-asymptote
/usr/share/emacs/site-lisp/org/ob-abc hides /usr/share/emacs/28.0.50/lisp/org/ob-abc
/usr/share/emacs/site-lisp/org/ob-R hides /usr/share/emacs/28.0.50/lisp/org/ob-R
/usr/share/emacs/site-lisp/org/ob-J hides /usr/share/emacs/28.0.50/lisp/org/ob-J
/usr/share/emacs/site-lisp/org/ob-C hides /usr/share/emacs/28.0.50/lisp/org/ob-C

Features:
(shadow sort spook cookie1 mail-extr emacsbug message rmc rfc822 mml
mml-sec epa epg epg-config mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail recentf tree-widget
help-fns radix-tree cl-print debug backtrace mhtml-mode css-mode eww
mm-url url-queue shr puny svg xml color js cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode
dom htmlize ox-org ox-odt rng-loc rng-uri rng-parse rng-match rng-dt
rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex
ox-html table ox-ascii ox-publish ox sh-script smie executable rx vc-git
diff-mode cl-extra org-protocol ol-info org-id org-habit ol-docview
doc-view ol-bibtex bibtex ol-bbdb ffap thingatpt server calfw-ical url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap icalendar diary-lib diary-loaddefs calfw-org
org-capture org-element avl-tree generator org-agenda org-refile calfw
holidays hol-loaddefs cl auto-loads tex-site pdf-sync pdf-outline
pdf-occur ibuf-ext ibuffer ibuffer-loaddefs pdf-links pdf-isearch
let-alist pdf-history pdf-annot tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet org org-macro org-footnote org-pcomplete
org-list org-faces org-entities noutline outline org-version ob-shell
shell pcomplete ob-R ob-perl ob-asymptote ob-gnuplot ob ob-tangle
org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-emacs-lisp ob-core
ob-eval org-table ol org-keys org-compat org-macs org-loaddefs find-func
cal-menu calendar cal-loaddefs pdf-misc imenu pdf-tools package
browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs json map url-vars compile comint ansi-color
cus-edit pdf-view password-cache jka-compr pdf-cache pdf-info tq
pdf-util dired+ image-dired image-mode exif format-spec image-file
dired-aux bookmark+ bookmark+-key easy-mmode derived dired-x dired
dired-loaddefs bookmark+-1 bookmark+-bmu bookmark+-lit bookmark pp
advice undo-tree diff ace-window avy ring company edmacro kmacro pcase
quail help-mode easymenu paren savehist ido gnus nnheader gnus-util
rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search
time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mail-utils
mm-util mail-prsvr wid-edit cl-loaddefs cl-lib time cus-start cus-load
cyril-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 339893 26002)
 (symbols 48 35688 2)
 (strings 32 120824 5563)
 (string-bytes 1 3997014)
 (vectors 16 59972)
 (vector-slots 8 1396971 132706)
 (floats 8 306 136)
 (intervals 56 669 185)
 (buffers 992 18))


--
WBR, Vladimir Lomov

Content:  80% POLYESTER, 20% DACRONi ... The waitress's UNIFORM sheds
TARTAR SAUCE like an 8" by 10" GLOSSY ...

Hamas H.N.P. National laboratory Cartel sweep Homeland security Cohiba
Hugo Chavez SGDN Colombia market Magnitude Rapid Reaction SGI warfare

-- 





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2020-06-05  3:09 bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs Vladimir Lomov
@ 2020-06-05 11:14 ` Basil L. Contovounesios
  2020-06-05 16:53   ` Vladimir Lomov
  2020-06-06 12:36 ` Dmitry Alexandrov
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 34+ messages in thread
From: Basil L. Contovounesios @ 2020-06-05 11:14 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: 41719

Vladimir Lomov <lomov.vl@yandex.ru> writes:

> The 'emacs' allows to set the so-called 'instance' when run in X window
> system using '--name' option. The same time the 'emacsclient' doesn't
> have such option and if 'emacs' is run in daemon mode ('emacs
> --daemon=...') it is impossible (?) to change the 'instance' of emacs
> window (frame in Emacs terminology) created by 'emacsclient'.
>
> I tried to use '-F' option of 'emacsclient' but I didn't get desire
> result, WM_CLASS isn't changed, only WM_ICON_NAME. It is possible that I
> do things wrong,
>
>   $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") (title . "USER@HOST"))'
>
> but this topic is covered by manual (Emacs, 21.11 "Frame Parameters" and
> Emacs Lisp 29.4.3 "Window Frame Parameters") very unclear.
>
> Even if it is possible to change the 'instance' of Emacs window created
> by 'emacsclient' using the '-F' option it would be nice to have more
> simple way to achieve this. On the other hand, if Emacs is run in daemon
> mode it is the purpose of emacsclient to (allow to) set the 'instance'
> and 'title' of created window.

Sorry if I misunderstood, but are you looking for emacsclient's
--socket-name=NAME argument?  This can be the same NAME passed as the
--daemon=NAME argument to emacs.

-- 
Basil





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2020-06-05 11:14 ` Basil L. Contovounesios
@ 2020-06-05 16:53   ` Vladimir Lomov
  0 siblings, 0 replies; 34+ messages in thread
From: Vladimir Lomov @ 2020-06-05 16:53 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: 41719

[-- Attachment #1: Type: text/plain, Size: 3591 bytes --]

Hello,
** Basil L. Contovounesios <contovob@tcd.ie> [2020-06-05 12:14:11 +0100]:

> Vladimir Lomov <lomov.vl@yandex.ru> writes:

>> The 'emacs' allows to set the so-called 'instance' when run in X window
>> system using '--name' option. The same time the 'emacsclient' doesn't
>> have such option and if 'emacs' is run in daemon mode ('emacs
>> --daemon=...') it is impossible (?) to change the 'instance' of emacs
>> window (frame in Emacs terminology) created by 'emacsclient'.
>>
>> I tried to use '-F' option of 'emacsclient' but I didn't get desire
>> result, WM_CLASS isn't changed, only WM_ICON_NAME. It is possible that I
>> do things wrong,
>>
>>   $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") (title . "USER@HOST"))'
>>
>> but this topic is covered by manual (Emacs, 21.11 "Frame Parameters" and
>> Emacs Lisp 29.4.3 "Window Frame Parameters") very unclear.
>>
>> Even if it is possible to change the 'instance' of Emacs window created
>> by 'emacsclient' using the '-F' option it would be nice to have more
>> simple way to achieve this. On the other hand, if Emacs is run in daemon
>> mode it is the purpose of emacsclient to (allow to) set the 'instance'
>> and 'title' of created window.

> Sorry if I misunderstood,

Yes, seems so.

> but are you looking for emacsclient's --socket-name=NAME argument?

From emacsclient(1)

-s, --socket-name=FILENAME
        use socket named FILENAME for communication.  This can also be
        specified via the EMACS_SOCKET_NAME environment variable.

> This can be the same NAME passed as the --daemon=NAME argument to emacs.

From emacs(1)

--daemon[=name], --bg-daemon[=name]
        Start Emacs as a daemon, enabling the Emacs server and disconnecting
        from the terminal. You can then use the emacsclient (see
        emacsclient(1)) command to connect to the server (with optional name).

So if I use

>>   $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") (title . "USER@HOST"))'

then I use socket it means I use '--daemon' for emacs. Indeed I use socket
activation provided by systemd.

From emacs(1)

--name=name
        Specify the name which should be assigned to the initial Emacs window.
        This controls looking up X resources as well as the window title.

-T name, --title=name
        Specify the title for the initial X window.

When Emacs is run by just running 'emacs' and querying X properties

$ xprop | grep 'WM_CLASS\|WM_NAME\|WM_ICON_NAME'

one gets

WM_CLASS(STRING) = "emacs", "Emacs"
WM_ICON_NAME(STRING) = "emacs@smoon.bkoty.ru"
_NET_WM_ICON_NAME(UTF8_STRING) = "emacs@smoon.bkoty.ru"
WM_NAME(STRING) = "emacs@smoon.bkoty.ru"
_NET_WM_NAME(UTF8_STRING) = "emacs@smoon.bkoty.ru"

While running Emacs by

$ emacs --name default --title USER@HOST

one gets

WM_CLASS(STRING) = "default", "Emacs"
WM_ICON_NAME(STRING) = "default"
_NET_WM_ICON_NAME(UTF8_STRING) = "USER@HOST"
WM_NAME(STRING) = "USER@HOST"
_NET_WM_NAME(UTF8_STRING) = "USER@HOST"

In other words, emacs has option to set instance name (first string of
WM_CLASS value) and set window title. On the other hand emacsclient doesn't
have such option so it is (seem) impossible to set 'instance'. I wonder why it
doesn't have such options.

I read Emacs and Emacs Lisp manuals about frame parameters but don't get if it
is possible to set instance (and possibly name) using frame parameters. I
tried to use -F option but don't get desired result.

---
Vladimir Lomov

-- 
Natural laws have no pity.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2020-06-05  3:09 bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs Vladimir Lomov
  2020-06-05 11:14 ` Basil L. Contovounesios
@ 2020-06-06 12:36 ` Dmitry Alexandrov
  2020-06-06 14:52   ` Vladimir Lomov
  2022-06-11 13:00 ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is Colin Horne
  2022-06-12  5:10 ` bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  3 siblings, 1 reply; 34+ messages in thread
From: Dmitry Alexandrov @ 2020-06-06 12:36 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: 41719

[-- Attachment #1: Type: text/plain, Size: 703 bytes --]

Vladimir Lomov <lomov.vl@yandex.ru> wrote:
> I tried to use '-F' option of 'emacsclient' but I didn't get desire result, WM_CLASS isn't changed, only WM_ICON_NAME.

Works for me (Emacs 28, no toolkit).

> It is possible that I do things wrong,
>
>   $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") (title . "USER@HOST"))'

FWIW, this command does not necessary create a _new_ frame.  Use ‘-c’, ‘--create-frame’ to force it.

> Even if it is possible to change the 'instance' of Emacs window created by 'emacsclient' using the '-F' option it would be nice to have more simple way to achieve this.

It would be nice to give some examples, how it can be useful.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2020-06-06 12:36 ` Dmitry Alexandrov
@ 2020-06-06 14:52   ` Vladimir Lomov
  2020-06-06 17:08     ` Dmitry Alexandrov
  0 siblings, 1 reply; 34+ messages in thread
From: Vladimir Lomov @ 2020-06-06 14:52 UTC (permalink / raw)
  To: Dmitry Alexandrov; +Cc: 41719

[-- Attachment #1: Type: text/plain, Size: 3350 bytes --]

Hello,
** Dmitry Alexandrov <dag@gnui.org> [2020-06-06 15:36:06 +0300]:

> Vladimir Lomov <lomov.vl@yandex.ru> wrote:

>> I tried to use '-F' option of 'emacsclient' but I didn't get desire result,
>> WM_CLASS isn't changed, only WM_ICON_NAME.

> Works for me (Emacs 28, no toolkit).

Do you able to change WM_CLASS?

>> It is possible that I do things wrong,
>>
>>   $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") (title . "USER@HOST"))'

> FWIW, this command does not necessary create a _new_ frame.  Use ‘-c’,
> ‘--create-frame’ to force it.

My fault, I didn't added it in example but of course use it (without it
emacsclient doesn't create window).

Let me give more details what I did and what I get.

1. Run Emacs without parameters

$ emacs

$ xprop | grep 'WM_CLASS\|WM_NAME\|WM_ICON_NAME'

WM_CLASS(STRING) = "emacs", "Emacs"
WM_ICON_NAME(STRING) = "emacs@smoon.bkoty.ru"
_NET_WM_ICON_NAME(UTF8_STRING) = "emacs@smoon.bkoty.ru"
WM_NAME(STRING) = "emacs@smoon.bkoty.ru"
_NET_WM_NAME(UTF8_STRING) = "emacs@smoon.bkoty.ru"

2. Run Emacs with parameters

$ emacs --name default --title USER@HOST

$ xprop | grep 'WM_CLASS\|WM_NAME\|WM_ICON_NAME'

WM_CLASS(STRING) = "default", "Emacs"
WM_ICON_NAME(STRING) = "default"
_NET_WM_ICON_NAME(UTF8_STRING) = "USER@HOST"
WM_NAME(STRING) = "USER@HOST"
_NET_WM_NAME(UTF8_STRING) = "USER@HOST"

3. Run emacsclient (the socket is created by systemd, emacs started by
service)

$ emacsclient -s /run/user/1000/emacs-default -c

$ xprop | grep 'WM_CLASS\|WM_NAME\|WM_ICON_NAME'

WM_CLASS(STRING) = "emacs", "Emacs"
WM_ICON_NAME(STRING) = "*scratch*"
_NET_WM_ICON_NAME(UTF8_STRING) = "*scratch*"
WM_NAME(STRING) = "*scratch*"
_NET_WM_NAME(UTF8_STRING) = "*scratch*"

But this time I already have openned Emacs windown. If I close it (C-x 5 0)
and run emacsclient again I get

WM_CLASS(STRING) = "emacs", "Emacs"
WM_ICON_NAME(STRING) = "emacs@smoon.bkoty.ru"
_NET_WM_ICON_NAME(UTF8_STRING) = "emacs@smoon.bkoty.ru"
WM_NAME(STRING) = "emacs@smoon.bkoty.ru"
_NET_WM_NAME(UTF8_STRING) = "emacs@smoon.bkoty.ru"

4. Run emacsclient with -F

$ emacsclient -s /run/user/1000/emacs-default -c -F '((name . "default") (title . "USER@HOST"))

$ xprop | grep 'WM_CLASS\|WM_NAME\|WM_ICON_NAME'

WM_CLASS(STRING) = "emacs", "Emacs"
WM_ICON_NAME(STRING) = "default"
_NET_WM_ICON_NAME(UTF8_STRING) = "USER@HOST"
WM_NAME(STRING) = "USER@HOST"
_NET_WM_NAME(UTF8_STRING) = "USER@HOST"

This time I don't have openned Emacs window. If I run the same command when
Emacs already has window (created by emacsclient) then I get

WM_CLASS(STRING) = "emacs", "Emacs"
WM_ICON_NAME(STRING) = "default"
_NET_WM_ICON_NAME(UTF8_STRING) = "USER@HOST"
WM_NAME(STRING) = "USER@HOST"
_NET_WM_NAME(UTF8_STRING) = "USER@HOST"

As one may see only emacs allows to set 'instance' (WM_CLASS, first string)
with --name option.

>> Even if it is possible to change the 'instance' of Emacs window created by
>> 'emacsclient' using the '-F' option it would be nice to have more simple
>> way to achieve this.

> It would be nice to give some examples, how it can be useful.

---
WBR, Vladimir Lomov

-- 
If you marry a man who cheats on his wife, you'll be married to a man who
cheats on his wife.
		-- Ann Landers

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2020-06-06 14:52   ` Vladimir Lomov
@ 2020-06-06 17:08     ` Dmitry Alexandrov
  2020-06-06 18:24       ` Dmitry Alexandrov
  0 siblings, 1 reply; 34+ messages in thread
From: Dmitry Alexandrov @ 2020-06-06 17:08 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: 41719

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

Vladimir Lomov <lomov.vl@yandex.ru> wrote:
> ** Dmitry Alexandrov <dag@gnui.org> [2020-06-06 15:36:06 +0300]:
>> Vladimir Lomov <lomov.vl@yandex.ru> wrote:
>
>>> I tried to use '-F' option of 'emacsclient' but I didn't get desire result, WM_CLASS isn't changed, only WM_ICON_NAME.
>
>> Works for me (Emacs 28, no toolkit).
>
> Do you able to change WM_CLASS?

Yes.

> 3. Run emacsclient (the socket is created by systemd, emacs started by service)

That is with all your customizations.  Try to reproduce it with

	$ emacs --quick --fg-daemon=test-wm-class

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2020-06-06 17:08     ` Dmitry Alexandrov
@ 2020-06-06 18:24       ` Dmitry Alexandrov
  2020-06-07 14:26         ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk328.0.50 (Was: [FR] emacsclient should provide '--name' option as emacs) Vladimir Lomov
  2022-02-10  7:17         ` Lars Ingebrigtsen
  0 siblings, 2 replies; 34+ messages in thread
From: Dmitry Alexandrov @ 2020-06-06 18:24 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: 41719

[-- Attachment #1: Type: text/plain, Size: 634 bytes --]

Control: retitle -1 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk3

Dmitry Alexandrov <dag@gnui.org> wrote:
> Vladimir Lomov <lomov.vl@yandex.ru> wrote:
>> ** Dmitry Alexandrov <dag@gnui.org> [2020-06-06 15:36:06 +0300]:
>>> Vladimir Lomov <lomov.vl@yandex.ru> wrote:
>>
>>>> I tried to use '-F' option of 'emacsclient' but I didn't get desire result, WM_CLASS isn't changed, only WM_ICON_NAME.
>>
>>> Works for me (Emacs 28, no toolkit).
>>
>> Do you able to change WM_CLASS?
>
> Yes.

Okay, itʼs ‘no toolkit’ that seems to be determinant.  With GTK build I indeed canʼt.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk328.0.50 (Was: [FR] emacsclient should provide '--name' option as emacs)
  2020-06-06 18:24       ` Dmitry Alexandrov
@ 2020-06-07 14:26         ` Vladimir Lomov
  2020-06-07 16:15           ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk3 Dmitry Alexandrov
  2022-02-10  7:17         ` Lars Ingebrigtsen
  1 sibling, 1 reply; 34+ messages in thread
From: Vladimir Lomov @ 2020-06-07 14:26 UTC (permalink / raw)
  To: Dmitry Alexandrov; +Cc: 41719

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

Hello,
** Dmitry Alexandrov <dag@gnui.org> [2020-06-06 21:24:22 +0300]:

> Control: retitle -1 28.0.50; emacsclient -c -F '((name . "NAME"))' is not
> respected --with-x-toolkit=gtk3

> Dmitry Alexandrov <dag@gnui.org> wrote:
>> Vladimir Lomov <lomov.vl@yandex.ru> wrote:
>>> ** Dmitry Alexandrov <dag@gnui.org> [2020-06-06 15:36:06 +0300]:
>>>> Vladimir Lomov <lomov.vl@yandex.ru> wrote:

>>>>> I tried to use '-F' option of 'emacsclient' but I didn't get desire
>>>>> result, WM_CLASS isn't changed, only WM_ICON_NAME.

>>>> Works for me (Emacs 28, no toolkit).

>>> Do you able to change WM_CLASS?

I didn't notice that you write 'no toolkit', I didn't realize that.

>> Yes.

> Okay, itʼs ‘no toolkit’ that seems to be determinant.  With GTK build I indeed canʼt.

So, emacsclient with -F should change 'instance' but when Emacs is build with
GTK/GTK3 emacs doesn't change it. Do I correctly understand this? Is it mean
that this is a bug?

---
WBR, Vladimir Lomov

-- 
Remove me from this land of slaves,
Where all are fools, and all are knaves,
Where every knave and fool is bought,
Yet kindly sells himself for nought;
		-- Jonathan Swift

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk3
  2020-06-07 14:26         ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk328.0.50 (Was: [FR] emacsclient should provide '--name' option as emacs) Vladimir Lomov
@ 2020-06-07 16:15           ` Dmitry Alexandrov
  2020-06-09  7:12             ` Vladimir Lomov
  0 siblings, 1 reply; 34+ messages in thread
From: Dmitry Alexandrov @ 2020-06-07 16:15 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: 41719

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]

Vladimir Lomov <lomov.vl@yandex.ru> wrote:
> So, emacsclient with -F

(make-frame '((name . "NAME"))), actually.

> should change 'instance' but when Emacs is build with GTK/GTK3 emacs doesn't change it. Do I correctly understand this?

Only with GTK3.  GTK2 is fine as well.

> Is it mean that this is a bug?

If a missing feature, that is present on a slightly different platform, is a bug.  Itʼs not necessary a bug in Emacs, though.  Maybe, besides declaring a ability to set a window class deprecated [1], GTK developers had actually broken it.


[1] <https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-set-wmclass>:

|	gtk_window_set_wmclass has been deprecated since version 3.22 and should not be used in newly-written code.
|
| Don’t use this function. It sets the X Window System “class” and “name” hints for a window. According to the ICCCM, you should always set these to the same value for all windows in an application, and GTK+ sets them to that value by default, so calling this function is sort of pointless. However, you may want to call gtk_window_set_role() on each window in your application, for the benefit of the session manager. Setting the role allows the window manager to restore window positions when loading a saved session.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk3
  2020-06-07 16:15           ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk3 Dmitry Alexandrov
@ 2020-06-09  7:12             ` Vladimir Lomov
  0 siblings, 0 replies; 34+ messages in thread
From: Vladimir Lomov @ 2020-06-09  7:12 UTC (permalink / raw)
  To: Dmitry Alexandrov; +Cc: 41719

[-- Attachment #1: Type: text/plain, Size: 2360 bytes --]

Hello,
** Dmitry Alexandrov <dag@gnui.org> [2020-06-07 19:15:40 +0300]:

> Vladimir Lomov <lomov.vl@yandex.ru> wrote:

>> So, emacsclient with -F

> (make-frame '((name . "NAME"))), actually.

>> should change 'instance' but when Emacs is build with GTK/GTK3 emacs
>> doesn't change it. Do I correctly understand this?

> Only with GTK3.  GTK2 is fine as well.

>> Is it mean that this is a bug?

> If a missing feature, that is present on a slightly different platform, is a
> bug. Itʼs not necessary a bug in Emacs, though. Maybe, besides declaring a
> ability to set a window class deprecated [1], GTK developers had actually
> broken it.

> [1] <https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-set-wmclass>:

> |	gtk_window_set_wmclass has been deprecated since version 3.22 and should not be used in newly-written code.
> |
> | Don’t use this function. It sets the X Window System “class” and “name”
> | hints for a window. According to the ICCCM, you should always set these to
> | the same value for all windows in an application, and GTK+ sets them to that
> | value by default, so calling this function is sort of pointless. However,
> | you may want to call gtk_window_set_role() on each window in your
> | application, for the benefit of the session manager. Setting the role allows
> | the window manager to restore window positions when loading a saved session.

So, this is dead-end but I'm glad that 'role' is still kept. Is it possible to
implement this ('role' instead of 'instance') in gtk backend and in
emacsclient?

---
WBR, Vladimir Lomov

-- 
Double Bucky, you're the one,
You make my keyboard so much fun,
Double Bucky, an additional bit or two, (Vo-vo-de-o)
Control and meta, side by side,
Augmented ASCII, 9 bits wide!
Double Bucky, a half a thousand glyphs, plus a few!

Oh, I sure wish that I,
Had a couple of bits more!
Perhaps a set of pedals to make the number of bits four.

Double Double Bucky!  Double Bucky left and right
OR'd together, outta sight!
Double Bucky, I'd like a whole word of,
Double Bucky, I'm happy I heard of,
Double Bucky, I'd like a whole word of you!
		-- to Nicholas Wirth, who suggested that an extra bit
		be added to terminal codes on 36-bit machines for use
		by screen editors.  [to the tune of "Rubber Ducky"]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk3
  2020-06-06 18:24       ` Dmitry Alexandrov
  2020-06-07 14:26         ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk328.0.50 (Was: [FR] emacsclient should provide '--name' option as emacs) Vladimir Lomov
@ 2022-02-10  7:17         ` Lars Ingebrigtsen
  2022-03-12 22:45           ` Lars Ingebrigtsen
  1 sibling, 1 reply; 34+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-10  7:17 UTC (permalink / raw)
  To: Dmitry Alexandrov; +Cc: Vladimir Lomov, 41719

Dmitry Alexandrov <dag@gnui.org> writes:

> Okay, itʼs ‘no toolkit’ that seems to be determinant.  With GTK build
> I indeed canʼt.

I'm unable to reproduce this on the current trunk (x86_64-pc-linux-gnu,
GTK+ Version 3.24.31, Debian/bookworm).

Do you still see this issue on the current trunk?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk3
  2022-02-10  7:17         ` Lars Ingebrigtsen
@ 2022-03-12 22:45           ` Lars Ingebrigtsen
  0 siblings, 0 replies; 34+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-12 22:45 UTC (permalink / raw)
  To: Dmitry Alexandrov; +Cc: Vladimir Lomov, 41719

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I'm unable to reproduce this on the current trunk (x86_64-pc-linux-gnu,
> GTK+ Version 3.24.31, Debian/bookworm).
>
> Do you still see this issue on the current trunk?

More information was requested, but no response was given within a
month, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is
  2020-06-05  3:09 bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs Vladimir Lomov
  2020-06-05 11:14 ` Basil L. Contovounesios
  2020-06-06 12:36 ` Dmitry Alexandrov
@ 2022-06-11 13:00 ` Colin Horne
  2022-06-11 13:46   ` Colin Horne
  2022-06-12  5:10 ` bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  3 siblings, 1 reply; 34+ messages in thread
From: Colin Horne @ 2022-06-11 13:00 UTC (permalink / raw)
  To: 41719

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]

> I'm unable to reproduce this on the current trunk (x86_64-pc-linux-gnu,
> GTK+ Version 3.24.31, Debian/bookworm).
>
> Do you still see this issue on the current trunk?

I can confirm that this is still an issue on trunk.

My Emacs welcome screen says:

GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.29,
 cairo version 1.16.0) of 2022-06-11

Invoked as:

  emacsclient -F '((name . "foobar") (title . "foobar-title"))'
--create-frame -a ""

xprop reports:

WM_CLASS(STRING) = "emacs", "Emacs"
WM_ICON_NAME(STRING) = "foobar"
_NET_WM_ICON_NAME(UTF8_STRING) = "foobar-title"
WM_NAME(STRING) = "foobar-title"
_NET_WM_NAME(UTF8_STRING) = "foobar-title"

This affects me in that I run simultaneous emacs instances as two different
users and have different icons configured for the different users. Now that
I can't change WM_CLASS, both emacs instances appear under the same icon
under my desktop manager, which is very frustrating.

Cheers,
  Colin

[-- Attachment #2: Type: text/html, Size: 1383 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is
  2022-06-11 13:00 ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is Colin Horne
@ 2022-06-11 13:46   ` Colin Horne
  0 siblings, 0 replies; 34+ messages in thread
From: Colin Horne @ 2022-06-11 13:46 UTC (permalink / raw)
  To: 41719

[-- Attachment #1: Type: text/plain, Size: 2033 bytes --]

Just to confirm, I've also verified this against GTK+ Version 3.24.34:

GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34,
 cairo version 1.16.0) of 2022-06-11

Emacs is built as follows:
./configure'
'--prefix=/home/hdiags/hdiags/spack/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-11.3.0/emacs-master-tvikd2njjgseq47ywpa5zrlksnz3pylz'
'--with-x' '--with-x-toolkit=gtk' '--with-gnutls'

For avoidance of doubt, the issue still occurs when the emacs is started as:

  # No server currently running
  emacs -q --fg-daemon
  emacsclient -F '((name . "foobar") (title . "foobar-title"))'
--create-frame

xprop reports:

WM_CLASS(STRING) = "emacs", "Emacs"
WM_ICON_NAME(STRING) = "foobar"
_NET_WM_ICON_NAME(UTF8_STRING) = "foobar-title"
WM_NAME(STRING) = "foobar-title"
_NET_WM_NAME(UTF8_STRING) = "foobar-title"

Using a previous version of emacs (26.3), the same steps produce:

WM_CLASS(STRING) = "foobar", "Emacs"



On Sat, 11 Jun 2022 at 14:00, Colin Horne <colin@cdfh.org.uk> wrote:

> > I'm unable to reproduce this on the current trunk (x86_64-pc-linux-gnu,
> > GTK+ Version 3.24.31, Debian/bookworm).
> >
> > Do you still see this issue on the current trunk?
>
> I can confirm that this is still an issue on trunk.
>
> My Emacs welcome screen says:
>
> GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.29,
>  cairo version 1.16.0) of 2022-06-11
>
> Invoked as:
>
>   emacsclient -F '((name . "foobar") (title . "foobar-title"))'
> --create-frame -a ""
>
> xprop reports:
>
> WM_CLASS(STRING) = "emacs", "Emacs"
> WM_ICON_NAME(STRING) = "foobar"
> _NET_WM_ICON_NAME(UTF8_STRING) = "foobar-title"
> WM_NAME(STRING) = "foobar-title"
> _NET_WM_NAME(UTF8_STRING) = "foobar-title"
>
> This affects me in that I run simultaneous emacs instances as two
> different users and have different icons configured for the
> different users. Now that I can't change WM_CLASS, both emacs instances
> appear under the same icon under my desktop manager, which is very
> frustrating.
>
> Cheers,
>   Colin
>

[-- Attachment #2: Type: text/html, Size: 3109 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2020-06-05  3:09 bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs Vladimir Lomov
                   ` (2 preceding siblings ...)
  2022-06-11 13:00 ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is Colin Horne
@ 2022-06-12  5:10 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-12  6:32   ` Eli Zaretskii
  3 siblings, 1 reply; 34+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-06-12  5:10 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: 41719

Vladimir Lomov <lomov.vl@yandex.ru> writes:

> The 'emacs' allows to set the so-called 'instance' when run in X window
> system using '--name' option. The same time the 'emacsclient' doesn't
> have such option and if 'emacs' is run in daemon mode ('emacs
> --daemon=...') it is impossible (?) to change the 'instance' of emacs
> window (frame in Emacs terminology) created by 'emacsclient'.
>
> I tried to use '-F' option of 'emacsclient' but I didn't get desire
> result, WM_CLASS isn't changed, only WM_ICON_NAME. It is possible that I
> do things wrong,
>
>   $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") (title . "USER@HOST"))'
>
> but this topic is covered by manual (Emacs, 21.11 "Frame Parameters" and
> Emacs Lisp 29.4.3 "Window Frame Parameters") very unclear.
>
> Even if it is possible to change the 'instance' of Emacs window created
> by 'emacsclient' using the '-F' option it would be nice to have more
> simple way to achieve this. On the other hand, if Emacs is run in daemon
> mode it is the purpose of emacsclient to (allow to) set the 'instance'
> and 'title' of created window.

Could you please show where in the manual it is unclear?
I don't think we have any support at all for setting the WM_CLASS of
Emacs on a per-frame basis.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  5:10 ` bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-12  6:32   ` Eli Zaretskii
  2022-06-12  6:40     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 34+ messages in thread
From: Eli Zaretskii @ 2022-06-12  6:32 UTC (permalink / raw)
  To: Po Lu; +Cc: lomov.vl, 41719

> Cc: 41719@debbugs.gnu.org
> Date: Sun, 12 Jun 2022 13:10:18 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Vladimir Lomov <lomov.vl@yandex.ru> writes:
> 
> > The 'emacs' allows to set the so-called 'instance' when run in X window
> > system using '--name' option. The same time the 'emacsclient' doesn't
> > have such option and if 'emacs' is run in daemon mode ('emacs
> > --daemon=...') it is impossible (?) to change the 'instance' of emacs
> > window (frame in Emacs terminology) created by 'emacsclient'.
> >
> > I tried to use '-F' option of 'emacsclient' but I didn't get desire
> > result, WM_CLASS isn't changed, only WM_ICON_NAME. It is possible that I
> > do things wrong,
> >
> >   $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") (title . "USER@HOST"))'
> >
> > but this topic is covered by manual (Emacs, 21.11 "Frame Parameters" and
> > Emacs Lisp 29.4.3 "Window Frame Parameters") very unclear.
> >
> > Even if it is possible to change the 'instance' of Emacs window created
> > by 'emacsclient' using the '-F' option it would be nice to have more
> > simple way to achieve this. On the other hand, if Emacs is run in daemon
> > mode it is the purpose of emacsclient to (allow to) set the 'instance'
> > and 'title' of created window.
> 
> Could you please show where in the manual it is unclear?
> I don't think we have any support at all for setting the WM_CLASS of
> Emacs on a per-frame basis.

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?





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  6:32   ` Eli Zaretskii
@ 2022-06-12  6:40     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-12  7:03       ` Eli Zaretskii
  0 siblings, 1 reply; 34+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-06-12  6:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: lomov.vl, 41719

Eli Zaretskii <eliz@gnu.org> 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.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  6:40     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-12  7:03       ` Eli Zaretskii
  2022-06-12  7:06         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
                           ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Eli Zaretskii @ 2022-06-12  7:03 UTC (permalink / raw)
  To: Po Lu; +Cc: lomov.vl, 41719

> From: Po Lu <luangruo@yahoo.com>
> Cc: lomov.vl@yandex.ru,  41719@debbugs.gnu.org
> Date: Sun, 12 Jun 2022 14:40:11 +0800
> 
> Eli Zaretskii <eliz@gnu.org> 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?





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  7:03       ` Eli Zaretskii
@ 2022-06-12  7:06         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-12  7:26           ` Eli Zaretskii
  2022-06-12  7:52         ` Visuwesh
  2022-06-14  3:04         ` Vladimir Lomov
  2 siblings, 1 reply; 34+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-06-12  7:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: lomov.vl, 41719

Eli Zaretskii <eliz@gnu.org> writes:

> Why?  What would that gain in user-level terms?

I don't know, you would have to ask him.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  7:06         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-12  7:26           ` Eli Zaretskii
  0 siblings, 0 replies; 34+ messages in thread
From: Eli Zaretskii @ 2022-06-12  7:26 UTC (permalink / raw)
  To: Po Lu; +Cc: lomov.vl, 41719

> From: Po Lu <luangruo@yahoo.com>
> Cc: lomov.vl@yandex.ru,  41719@debbugs.gnu.org
> Date: Sun, 12 Jun 2022 15:06:13 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Why?  What would that gain in user-level terms?
> 
> I don't know, you would have to ask him.

I just did ;-)  He is on the CC, and hopefully will respond.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  7:03       ` Eli Zaretskii
  2022-06-12  7:06         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-12  7:52         ` Visuwesh
  2022-06-12  8:00           ` Eli Zaretskii
                             ` (2 more replies)
  2022-06-14  3:04         ` Vladimir Lomov
  2 siblings, 3 replies; 34+ messages in thread
From: Visuwesh @ 2022-06-12  7:52 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Po Lu, lomov.vl, 41719

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

>> From: Po Lu <luangruo@yahoo.com>
>> Cc: lomov.vl@yandex.ru,  41719@debbugs.gnu.org
>> Date: Sun, 12 Jun 2022 14:40:11 +0800
>> 
>> Eli Zaretskii <eliz@gnu.org> 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"





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  7:52         ` Visuwesh
@ 2022-06-12  8:00           ` Eli Zaretskii
  2022-06-12  8:47             ` Visuwesh
  2022-06-12  8:02           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-12  8:27           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2 siblings, 1 reply; 34+ messages in thread
From: Eli Zaretskii @ 2022-06-12  8:00 UTC (permalink / raw)
  To: Visuwesh; +Cc: luangruo, lomov.vl, 41719

> From: Visuwesh <visuweshm@gmail.com>
> Cc: Po Lu <luangruo@yahoo.com>,  lomov.vl@yandex.ru,  41719@debbugs.gnu.org
> Date: Sun, 12 Jun 2022 13:22:25 +0530
> 
> >> 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.

Why cannot you do the same by invoking emacsclient?





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  7:52         ` Visuwesh
  2022-06-12  8:00           ` Eli Zaretskii
@ 2022-06-12  8:02           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-12  8:20             ` Andreas Schwab
  2022-06-12  8:49             ` Visuwesh
  2022-06-12  8:27           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2 siblings, 2 replies; 34+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-06-12  8:02 UTC (permalink / raw)
  To: Visuwesh; +Cc: Eli Zaretskii, lomov.vl, 41719

Visuwesh <visuweshm@gmail.com> writes:

> 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"

Class hints are only set by Emacs under X toolkit and no toolkit builds.
On GTK builds, it's set by GTK to a value set during GTK initialization.

BTW, the `name' frame parameter is rather special, since it's set by
`x-create-frame' binding special values to `x-resource-name' and
`x-resource-class' during frame creation.  So for the record, changing
the `name' parameter of a frame after it is created will not change the
values of the WM_CLASS and WM_NAME properties.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  8:02           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-12  8:20             ` Andreas Schwab
  2022-06-12  8:49             ` Visuwesh
  1 sibling, 0 replies; 34+ messages in thread
From: Andreas Schwab @ 2022-06-12  8:20 UTC (permalink / raw)
  To: 41719; +Cc: luangruo, eliz, lomov.vl, visuweshm

On Jun 12 2022, Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> BTW, the `name' frame parameter is rather special, since it's set by
> `x-create-frame' binding special values to `x-resource-name' and
> `x-resource-class' during frame creation.  So for the record, changing
> the `name' parameter of a frame after it is created will not change the
> values of the WM_CLASS and WM_NAME properties.

The WM_NAME property follows the name parameter for me.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  7:52         ` Visuwesh
  2022-06-12  8:00           ` Eli Zaretskii
  2022-06-12  8:02           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-12  8:27           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-12  8:54             ` Visuwesh
  2 siblings, 1 reply; 34+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-06-12  8:27 UTC (permalink / raw)
  To: Visuwesh; +Cc: Eli Zaretskii, lomov.vl, 41719

Visuwesh <visuweshm@gmail.com> writes:

> 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.

[...]

>         WM_CLASS(STRING) = "vz_calendar-frame", "Emacs"

BTW, that property looks very wrong to me.  Is the instance name of the
X resources you want to apply to that frame really "vz_calendar-frame"?

If it is not, then you will run into difficult-to-explain problems with
any customizations you make down the road.

If you need to set WM_NAME by itself, set the `title' parameter.  Most
people have no reason to set the `name' parameter at all.

Window managers that ask users to change the declared instance and/or
class names of random windows in their programs encourage sloppy
resource management.  They should ideally allow matching on all window
properties, which Lisp code can then set with
`x-change-window-property'.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  8:00           ` Eli Zaretskii
@ 2022-06-12  8:47             ` Visuwesh
  0 siblings, 0 replies; 34+ messages in thread
From: Visuwesh @ 2022-06-12  8:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: luangruo, lomov.vl, 41719

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

>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: Po Lu <luangruo@yahoo.com>,  lomov.vl@yandex.ru,  41719@debbugs.gnu.org
>> Date: Sun, 12 Jun 2022 13:22:25 +0530
>> 
>> 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.
>
> Why cannot you do the same by invoking emacsclient?

I admit that my example was quite poor, but there are some things that
are strictly out of control of Emacs like,

    1. Moving an Emacs frame to a specific virtual desktop / workspace /
       tag / group, etc.  People call the "workspace" feature by a
       billion different names.

    2. Make a specific Emacs frame "floating" in tiling window
       managers.

I'm not a heavy user of these "window manager rules" so I may not do
enough justification here.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  8:02           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-12  8:20             ` Andreas Schwab
@ 2022-06-12  8:49             ` Visuwesh
  1 sibling, 0 replies; 34+ messages in thread
From: Visuwesh @ 2022-06-12  8:49 UTC (permalink / raw)
  To: 41719; +Cc: luangruo, eliz, lomov.vl

[ஞாயிறு ஜூன் 12, 2022 16:02] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Visuwesh <visuweshm@gmail.com> writes:
>
>> 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"
>
> Class hints are only set by Emacs under X toolkit and no toolkit builds.
> On GTK builds, it's set by GTK to a value set during GTK initialization.
>

That checks out.  I use a lucid build.

> BTW, the `name' frame parameter is rather special, since it's set by
> `x-create-frame' binding special values to `x-resource-name' and
> `x-resource-class' during frame creation.  So for the record, changing
> the `name' parameter of a frame after it is created will not change the
> values of the WM_CLASS and WM_NAME properties.

Ah, thanks for the info.  I was afraid the WM_NAME property would change
when the frame title changes.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  8:27           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-12  8:54             ` Visuwesh
  2022-06-12  9:11               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 34+ messages in thread
From: Visuwesh @ 2022-06-12  8:54 UTC (permalink / raw)
  To: 41719; +Cc: luangruo, eliz, lomov.vl

[ஞாயிறு ஜூன் 12, 2022 16:27] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Visuwesh <visuweshm@gmail.com> writes:
>
>> 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.
>
> [...]
>
>>         WM_CLASS(STRING) = "vz_calendar-frame", "Emacs"
>
> BTW, that property looks very wrong to me.  Is the instance name of the
> X resources you want to apply to that frame really "vz_calendar-frame"?
>

I created the frame like so,

    (make-frame '((name . "vz/calendar-frame")
                  ;; (minibuffer . nil)
                  (vertical-scroll-bars . nil)
                  (font . "monospace-16")))

> If it is not, then you will run into difficult-to-explain problems with
> any customizations you make down the road.
>
> If you need to set WM_NAME by itself, set the `title' parameter.  Most
> people have no reason to set the `name' parameter at all.
>

Probably because I noticed the `name' parameter first in `(elisp) Frame
Parameters'.

> Window managers that ask users to change the declared instance and/or
> class names of random windows in their programs encourage sloppy
> resource management.  They should ideally allow matching on all window
> properties, which Lisp code can then set with
> `x-change-window-property'.

I don't really understand what any of you said means.  All I wanted was
a unique WM_NAME so that I can move the frame to the top right corner.
These frames are usually ephemeral so I haven't had any problems so far,
<shrug>.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  8:54             ` Visuwesh
@ 2022-06-12  9:11               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 34+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-06-12  9:11 UTC (permalink / raw)
  To: Visuwesh; +Cc: Eli Zaretskii, lomov.vl, 41719

Visuwesh <visuweshm@gmail.com> writes:

> I created the frame like so,
>
>     (make-frame '((name . "vz/calendar-frame")
>                   ;; (minibuffer . nil)
>                   (vertical-scroll-bars . nil)
>                   (font . "monospace-16")))

That's probably the wrong thing to do.  The instance name of the Emacs
session is `x-resource-name', not "vz/calendar-name".

> Probably because I noticed the `name' parameter first in `(elisp) Frame
> Parameters'.

I guess that part of the manual needs rewriting to warn against setting
the `name' parameter while creating a frame.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-12  7:03       ` Eli Zaretskii
  2022-06-12  7:06         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-12  7:52         ` Visuwesh
@ 2022-06-14  3:04         ` Vladimir Lomov
  2022-06-14  4:13           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-14 11:23           ` Eli Zaretskii
  2 siblings, 2 replies; 34+ messages in thread
From: Vladimir Lomov @ 2022-06-14  3:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Po Lu, 41719

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

Hello,
** Eli Zaretskii <eliz@gnu.org> [2022-06-12 10:03:24 +0300]:

>> From: Po Lu <luangruo@yahoo.com>
>> Cc: lomov.vl@yandex.ru,  41719@debbugs.gnu.org
>> Date: Sun, 12 Jun 2022 14:40:11 +0800
>> 
>> Eli Zaretskii <eliz@gnu.org> 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.

Yes, exactly that.

> Why?  What would that gain in user-level terms?

I'm using AwesomeWM and it allows me to set windows in different tags (think
of them as "workspaces"). I have two "instances" (two a bit different
configurations) of Emacs, one for programming and one for other tasks (i.e.
they use different packages). I prefer to run first instance ("other") on
"emacs" tag while second instance is placed in "misc" tag.

Of course, this is WM (X actually) dependent feature and I'm not sure if it
would work on Wayland. Now I build emacs with 'pgtk' and didn't check how it
works.

---
WBR, Vladimir Lomov

-- 
McGowan's Madison Avenue Axiom:
	If an item is advertised as "under $50", you can bet it's not $19.95.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-14  3:04         ` Vladimir Lomov
@ 2022-06-14  4:13           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-14  6:00             ` Vladimir Lomov
  2022-06-14 11:23           ` Eli Zaretskii
  1 sibling, 1 reply; 34+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-06-14  4:13 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: Eli Zaretskii, 41719

Vladimir Lomov <lomov.vl@yandex.ru> writes:

> I'm using AwesomeWM and it allows me to set windows in different tags (think
> of them as "workspaces"). I have two "instances" (two a bit different
> configurations) of Emacs, one for programming and one for other tasks (i.e.
> they use different packages). I prefer to run first instance ("other") on
> "emacs" tag while second instance is placed in "misc" tag.

AwesomeWM should provide a different mechanism, such as one based on the
WM_NAME property instead.

Setting the WM_CLASS to something other than `x-resource-name' and
`x-resource-class' is not supported on GTK builds, and is probably a bad
idea, since it will mess with X resources.

> Of course, this is WM (X actually) dependent feature and I'm not sure if it
> would work on Wayland. Now I build emacs with 'pgtk' and didn't check how it
> works.

It can't work on Wayland, since the WM_CLASS doesn't exist there.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-14  4:13           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-14  6:00             ` Vladimir Lomov
  2022-06-14  6:19               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 34+ messages in thread
From: Vladimir Lomov @ 2022-06-14  6:00 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, 41719

[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]

Hello,
** Po Lu <luangruo@yahoo.com> [2022-06-14 12:13:13 +0800]:

> Vladimir Lomov <lomov.vl@yandex.ru> writes:

>> I'm using AwesomeWM and it allows me to set windows in different tags (think
>> of them as "workspaces"). I have two "instances" (two a bit different
>> configurations) of Emacs, one for programming and one for other tasks (i.e.
>> they use different packages). I prefer to run first instance ("other") on
>> "emacs" tag while second instance is placed in "misc" tag.

> AwesomeWM should provide a different mechanism, such as one based on the
> WM_NAME property instead.

Yes, I checked and indeed WM_NAME is different for these two instances. I'll
change my AwesomeWM configuration to use this variable.

> Setting the WM_CLASS to something other than `x-resource-name' and
> `x-resource-class' is not supported on GTK builds, and is probably a bad
> idea, since it will mess with X resources.

>> Of course, this is WM (X actually) dependent feature and I'm not sure if it
>> would work on Wayland. Now I build emacs with 'pgtk' and didn't check how it
>> works.

> It can't work on Wayland, since the WM_CLASS doesn't exist there.

I agree, that's why I think now it is worthless to change anything in this
area.  Right now I use very little Wayland DE (GNOME), so didn't investigate
how to work with frames in Wayland.

I think this ticket should be closed.

---
WBR, Vladimir Lomov

-- 
If you are afraid of loneliness, don't marry.
		-- Anton Chekhov

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-14  6:00             ` Vladimir Lomov
@ 2022-06-14  6:19               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 34+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-06-14  6:19 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: Eli Zaretskii, 41719-done

Vladimir Lomov <lomov.vl@yandex.ru> writes:

> I agree, that's why I think now it is worthless to change anything in this
> area.  Right now I use very little Wayland DE (GNOME), so didn't investigate
> how to work with frames in Wayland.

I wouldn't keep my hopes up.  Wayland leaves very little up to the user.

> I think this ticket should be closed.

Thanks, now done.





^ permalink raw reply	[flat|nested] 34+ messages in thread

* bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs
  2022-06-14  3:04         ` Vladimir Lomov
  2022-06-14  4:13           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-14 11:23           ` Eli Zaretskii
  1 sibling, 0 replies; 34+ messages in thread
From: Eli Zaretskii @ 2022-06-14 11:23 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: luangruo, 41719

> Date: Tue, 14 Jun 2022 11:04:06 +0800
> From: Vladimir Lomov <lomov.vl@yandex.ru>
> Cc: Po Lu <luangruo@yahoo.com>, 41719@debbugs.gnu.org
> 
> I'm using AwesomeWM and it allows me to set windows in different tags (think
> of them as "workspaces"). I have two "instances" (two a bit different
> configurations) of Emacs, one for programming and one for other tasks (i.e.
> they use different packages). I prefer to run first instance ("other") on
> "emacs" tag while second instance is placed in "misc" tag.

Can't you move each frame via emacsclient's --eval option?





^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2022-06-14 11:23 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05  3:09 bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs Vladimir Lomov
2020-06-05 11:14 ` Basil L. Contovounesios
2020-06-05 16:53   ` Vladimir Lomov
2020-06-06 12:36 ` Dmitry Alexandrov
2020-06-06 14:52   ` Vladimir Lomov
2020-06-06 17:08     ` Dmitry Alexandrov
2020-06-06 18:24       ` Dmitry Alexandrov
2020-06-07 14:26         ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk328.0.50 (Was: [FR] emacsclient should provide '--name' option as emacs) Vladimir Lomov
2020-06-07 16:15           ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is not respected --with-x-toolkit=gtk3 Dmitry Alexandrov
2020-06-09  7:12             ` Vladimir Lomov
2022-02-10  7:17         ` Lars Ingebrigtsen
2022-03-12 22:45           ` Lars Ingebrigtsen
2022-06-11 13:00 ` bug#41719: 28.0.50; emacsclient -c -F '((name . "NAME"))' is Colin Horne
2022-06-11 13:46   ` Colin Horne
2022-06-12  5:10 ` bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-12  6:32   ` Eli Zaretskii
2022-06-12  6:40     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-12  7:03       ` Eli Zaretskii
2022-06-12  7:06         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-12  7:26           ` Eli Zaretskii
2022-06-12  7:52         ` Visuwesh
2022-06-12  8:00           ` Eli Zaretskii
2022-06-12  8:47             ` Visuwesh
2022-06-12  8:02           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-12  8:20             ` Andreas Schwab
2022-06-12  8:49             ` Visuwesh
2022-06-12  8:27           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-12  8:54             ` Visuwesh
2022-06-12  9:11               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-14  3:04         ` Vladimir Lomov
2022-06-14  4:13           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-14  6:00             ` Vladimir Lomov
2022-06-14  6:19               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-14 11:23           ` Eli Zaretskii

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).