Tweaks to org screenshot timings
This commit is contained in:
@@ -53,8 +53,8 @@
|
||||
(_ (set-text-properties 0 (length heading-name) nil heading-name))
|
||||
(_ (shell-command (concat org-screenshot-exec-path " " org-screenshot-exec-args)))
|
||||
;; shell-command returns immediately, so wait until the screenshot is likely to have been taken
|
||||
(_ (sit-for 0.25))
|
||||
(in-file (car (nreverse (directory-files org-screenshot-import-path 'full "GameNotes.*.png"))))
|
||||
(_ (sit-for 0.35))
|
||||
(in-file (car (nreverse (directory-files org-screenshot-import-path 'full "GameNotes"))))
|
||||
(out-dir-name (file-name-sans-extension (file-name-nondirectory buffer-file-name)))
|
||||
(out-dir (file-name-as-directory (concat (file-name-as-directory org-screenshot-export-path) out-dir-name)))
|
||||
(out-file (concat out-dir heading-name "-" (org-id-uuid) ".png")))
|
||||
@@ -67,4 +67,5 @@
|
||||
(org-next-visible-heading 1)
|
||||
(org-open-line 1)
|
||||
(org-insert-link nil out-file))
|
||||
(message "Failed to find saved screenshot."))))
|
||||
(progn
|
||||
(message "Failed to find saved screenshot.")))))
|
||||
|
||||
Reference in New Issue
Block a user