Skip to content

No effect in first client with org file #39

@stybr

Description

@stybr

When Emacs daemon is used, the first opened client with Org file as initial buffer choice has no valign effect, because org mode is loaded before valign. Every next opened buffer works correctly. The code below is my working makeshift workaround.

Starting Doom Emacs in daemon mode...
Initializing org-roam database...
Clearing removed files...done
Processing modified files...done
Clearing removed files...done
Processing modified files...done
Copilot: Copilot server started.
Error enabling Flyspell mode:
(Can’t find Hunspell dictionary with a .aff affix file)
Starting Emacs daemon.
Valign mode has no effect in non-graphical display
Error enabling Flyspell mode:
(Can’t find Hunspell dictionary with a .aff affix file)
Doom loaded 249 packages across 62 modules in 2.941s
(setq valign-fancy-bar t)
(setq org-modern-table nil)
(add-hook 'org-mode-hook #'valign-mode)

(defun my/enable-valign-in-first-org-buffer ()
  "Enable valign-mode in firstly opened org buffer after Emacs daemon start."
  (when (and (display-graphic-p) (derived-mode-p 'org-mode))
    (valign-mode 1)
   ))

(add-hook 'server-after-make-frame-hook #'my/enable-valign-in-first-org-buffer)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions