You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read "How to Debug Issues", and will use it to provide as much information about this issue as possible.
The issue can be reproduced on the latest available commit of Doom.
The issue can be reproduced on a stable release of Emacs, such as 27, 28, or 29. (Unstable versions end in .50, .60, or .9x)
Expected behavior
bin/org-capture is most useful for capturing notes/tasks when working outside of Emacs by quickly spawning a new frame to collect a task/note.
Current behavior
When calling bin/org-capture (and hence +org-capture/open-frame) a 2+ second delay exists between command start and a usable Emacs frame starting. I was able to track down the delay in +org-capture/open-frame to this line.
(select-frame-set-input-focus frame) ; fix MacOS not focusing new frames
I haven't tried to go any further with a root cause yet because I'm fine with a redefinition of +org-capture/open-frame in my local config. Here it is for reference:
;; Redefine to remove delay startup bug
(defun +org-capture/open-frame (&optional initial-input key)
"Opens the org-capture window in a floating frame that cleans itself up onceyou're done. This can be called from an external shell script."
(interactive)
(when (and initial-input (string-empty-p initial-input))
(setq initial-input nil))
(when (and key (string-empty-p key))
(setq key nil))
(let* ((frame-title-format"")
(frame (if (+org-capture-frame-p)
(selected-frame)
(make-frame +org-capture-frame-parameters))))
;; BUG: Causes significant delay on startup;; (select-frame-set-input-focus frame) ; fix MacOS not focusing new frames
(with-selected-frame frame
(require'org-capture)
(condition-case ex
(letf! ((#'pop-to-buffer#'switch-to-buffer))
(switch-to-buffer (doom-fallback-buffer))
(let ((org-capture-initial initial-input)
org-capture-entry)
(when (and key (not (string-empty-p key)))
(setq org-capture-entry (org-capture-select-template key)))
(funcall +org-capture-fn)))
('error
(message"org-capture: %s" (error-message-string ex))
(delete-frame frame))))))
After using the above redefinition in my personal config bin/org-capture yields a usable frame almost instantly. Of course now the frame isn't focused automatically. On MacOS I use Yabai as my window manager which allows me to write a very simple signal action to solve this issue in my .yabairc
Sorry if this issue seems trivial or pedantic. The lag was bothering me because I use org-capture a lot and just wanted to report my findings incase it's helpful to anyone.
I confirm that...
I have searched the issue tracker, documentation, FAQ, Discourse, and Google, in case this issue has already been reported/resolved.
I have read "How to Debug Issues", and will use it to provide as much information about this issue as possible.
The issue can be reproduced on the latest available commit of Doom.
The issue can be reproduced on a stable release of Emacs, such as 27, 28, or 29. (Unstable versions end in .50, .60, or .9x)
Expected behavior
bin/org-capture is most useful for capturing notes/tasks when working outside of Emacs by quickly spawning a new frame to collect a task/note.
Current behavior
When calling
bin/org-capture
(and hence+org-capture/open-frame
) a 2+ second delay exists between command start and a usable Emacs frame starting. I was able to track down the delay in+org-capture/open-frame
to this line.doomemacs/modules/lang/org/autoload/org-capture.el
Line 54 in 9620bb4
I haven't tried to go any further with a root cause yet because I'm fine with a redefinition of
+org-capture/open-frame
in my local config. Here it is for reference:After using the above redefinition in my personal config
bin/org-capture
yields a usable frame almost instantly. Of course now the frame isn't focused automatically. On MacOS I use Yabai as my window manager which allows me to write a very simple signal action to solve this issue in my.yabairc
Sorry if this issue seems trivial or pedantic. The lag was bothering me because I use org-capture a lot and just wanted to report my findings incase it's helpful to anyone.
Steps to reproduce
bin/org-capture
-> interactive Emacs frame (2+ seconds)+org-capture/open-frame
inconfig.el
with above snippet.bin/org-capture
-> interactive Emacs frame (< 1 second)System Information
https://pastebin.com/FfXJHFHP
The text was updated successfully, but these errors were encountered: