about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-org.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index 2f798d9..75c5f7a 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el
@@ -367,5 +367,22 @@ instead of the true count."
367 (call-interactively 'org-insert-link))))) 367 (call-interactively 'org-insert-link)))))
368 368
369 369
370;;; Next and previous heading, with widening
371(defun acdw/org-next-heading-widen (arg)
372 (interactive "p")
373 (let ((point-target (if (> arg 0)
374 (point-max)
375 (point-min))))
376 (unless (or (org-next-visible-heading arg)
377 (/= (point) point-target))
378 (when (buffer-narrowed-p)
379 (widen)
380 (org-next-visible-heading arg)))))
381
382(defun acdw/org-previous-heading-widen (arg)
383 (interactive "p")
384 (acdw/org-next-heading (- arg)))
385
386
370(provide 'acdw-org) 387(provide 'acdw-org)
371;; acdw-org.el ends here 388;; acdw-org.el ends here