all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#64873: server-make-frame-hook
@ 2023-07-26  7:24 chiel
  2023-07-26 18:32 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: chiel @ 2023-07-26  7:24 UTC (permalink / raw)
  To: 64873

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

For some reason the server-after-make-frame-hook is runs, even if no
new frame is created. Both by using emacsclient from the terminal and from
Nautilus.

minimal setup:

```emacs-lisp "testinit.el"
(require 'server)
(unless (server-running-p)
  (server-start))

(add-to-list 'initial-frame-alist '(fullscreen . maximized))

(add-hook 'server-after-make-frame-hook #'(lambda () (interactive)
                                            (if (= (length
(visible-frame-list)) 1)
                                                (toggle-frame-maximized))))
```

emacs -Q -l testinit.el;
(opens frame maximized as intended)
(then from terminal or filebrowser (I altered the desktop file))
emacsclient testinit.el;
(toggles frame maximized)
emacsclient otherfile.el;
(toggles frame maximized)

The after-make-frame-hook does work as expected

In GNU Emacs 29.0.92 (build 2, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-07-23 built on HQ
Repository revision: ac075176bf077ad79272e3d6c032c0658e4e19fc
Repository branch: emacs-29
System Description: Arch Linux

Configured using:
 'configure --with-mailutils --with-json --with-native-compilation=aot
 --with-pgtk --without-X'

(I know the latter doesn't exist)

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP XIM GTK3 ZLIB

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

Major mode: Info

Minor modes in effect:
  shell-dirtrack-mode: t
  global-flycheck-mode: t
  global-company-mode: t
  company-mode: t
  electric-pair-mode: t
  save-place-mode: t
  override-global-mode: t
  server-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  isearch-fold-quotes-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug misearch multi-isearch pulse color debug
backtrace rect face-remap mule-util cl-print dabbrev tabify cus-edit pp
cus-start cus-load shortdoc help-fns radix-tree info-look org-indent
org-bullets oc-basic org-element org-persist org-id org-refile avl-tree
ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus
nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig
gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo
gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7
nnoo parse-time gnus-spec gnus-int gnus-range message sendmail
yank-media puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus nnheader
gnus-util text-property-search mail-utils range mm-util mail-prsvr
wid-edit ol-docview doc-view filenotify jka-compr image-mode exif dired
dired-loaddefs ol-bibtex bibtex iso8601 ol-bbdb ol-w3m ol-doi
org-link-doi org-tempo tempo ob-shell shell ob-R ob-python python compat
treesit org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src
ob-comint org-pcomplete pcomplete comint ansi-osc org-list org-footnote
org-faces org-entities time-date noutline outline ob-emacs-lisp ob-core
ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc
org-loaddefs cal-menu calendar cal-loaddefs org-version org-compat
org-macs format-spec display-line-numbers yasnippet-snippets yasnippet
flycheck-aspell ispell flycheck ansi-color find-func dash
company-oddmuse company-keywords company-etags etags fileloop generator
xref project ring company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company finder-inf edmacro kmacro
modus-operandi-theme modus-themes pcase ffap thingatpt elec-pair
saveplace delight comp comp-cstr warnings icons rx cl-extra help-mode
use-package use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core server
all-the-icons-autoloads delight-autoloads ein-autoloads
deferred-autoloads anaphora-autoloads elpy-autoloads company-autoloads
ess-autoloads exwm-autoloads flycheck-aspell-autoloads
flycheck-autoloads highlight-indentation-autoloads julia-mode-autoloads
julia-vterm-autoloads markdown-mode-autoloads math-preview-autoloads
dash-autoloads openwith-autoloads org-bullets-autoloads
pdf-tools-autoloads pkg-info-autoloads epl-autoloads polymode-autoloads
pyvenv-autoloads request-autoloads s-autoloads tablist-autoloads
vterm-autoloads websocket-autoloads with-editor-autoloads info
compat-autoloads xelb-autoloads yasnippet-snippets-autoloads
yasnippet-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
gtk pgtk lcms2 multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 548080 201375)
 (symbols 48 32235 81)
 (strings 32 131028 59653)
 (string-bytes 1 3836278)
 (vectors 16 61227)
 (vector-slots 8 1739831 373036)
 (floats 8 631 1093)
 (intervals 56 4569 4741)
 (buffers 976 27))

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

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

* bug#64873: server-make-frame-hook
  2023-07-26  7:24 bug#64873: server-make-frame-hook chiel
@ 2023-07-26 18:32 ` Eli Zaretskii
       [not found]   ` <CAPZr=9HQTixqRDT5YtSRNXUK7t7xdnx0d3J4tAxcG=dtwur5Lw@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2023-07-26 18:32 UTC (permalink / raw)
  To: chiel; +Cc: 64873

> From: chiel <machiel.kroon@gmail.com>
> Date: Wed, 26 Jul 2023 09:24:50 +0200
> 
> For some reason the server-after-make-frame-hook is runs, even if no
> new frame is created. Both by using emacsclient from the terminal and from Nautilus.

I think this is a documentation problem: the hook is run when the
server starts using a client frame, regardless of whether it was
created or reused from an existing frame.

In what real-life situation is this a problem?





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

* bug#64873: server-make-frame-hook
       [not found]   ` <CAPZr=9HQTixqRDT5YtSRNXUK7t7xdnx0d3J4tAxcG=dtwur5Lw@mail.gmail.com>
@ 2023-07-27  6:38     ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2023-07-27  6:38 UTC (permalink / raw)
  To: chiel; +Cc: 64873-done

> From: chiel <machiel.kroon@gmail.com>
> Date: Wed, 26 Jul 2023 21:37:41 +0200
> 
> I was trying to get the first frame maximized, whilst running an Emacs daemon through systemd. 
> With some compromise I finally constructed something I can work with.
> I guess I was running into some issues because of the name of after-make-frame-functions (and the
> Exec format of the desktop file)
> Thanks for reaching out though! I already figured the easiest fix was the doc. 

Thanks.  I've now clarified the documentation of this variable, and
I'm therefore closing this bug.





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

end of thread, other threads:[~2023-07-27  6:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26  7:24 bug#64873: server-make-frame-hook chiel
2023-07-26 18:32 ` Eli Zaretskii
     [not found]   ` <CAPZr=9HQTixqRDT5YtSRNXUK7t7xdnx0d3J4tAxcG=dtwur5Lw@mail.gmail.com>
2023-07-27  6:38     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.