初稿: 2018-08-09 Thu 11:05
最終更新日: 2018-12-14 Fri 20:44
ホーム | 文書トップ | 目次

org-with-point-at
pointに移動した上でbodyを実行する

 1: (defmacro org-with-point-at (pom &rest body)
 2:   "Move to buffer and point of point-or-marker POM for the duration of BODY."
 3:   (declare (debug (form body)) (indent 1))
 4:   (org-with-gensyms (mpom)
 5:     `(let ((,mpom ,pom))
 6:        (save-excursion
 7:          (if (markerp ,mpom) (set-buffer (marker-buffer ,mpom)))
 8:          (org-with-wide-buffer
 9:           (goto-char (or ,mpom (point)))
10:           ,@body)))))

日付: 2018-08-09 Thu 11:05

著者: conao

Created: 2018-12-14 Fri 21:04

Validate