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.el37
-rw-r--r--lisp/acdw.el6
2 files changed, 37 insertions, 6 deletions
diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index 05e6409..a1558a2 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el
@@ -471,6 +471,43 @@ probably abandon it at some point for a better solution (see:
471 (org-narrow-to-subtree)))) 471 (org-narrow-to-subtree))))
472 472
473 473
474;;; Hide everything but the current headline
475;; https://stackoverflow.com/questions/25161792/
476
477(defun acdw-org/show-next-heading-tidily ()
478 "Show next entry, keeping other entries closed."
479 (interactive)
480 (if (save-excursion (end-of-line) (outline-invisible-p))
481 (progn (org-show-entry) (outline-show-children))
482 (outline-next-heading)
483 (unless (and (bolp) (org-at-heading-p))
484 (org-up-heading-safe)
485 (outline-hide-subtree)
486 (error "Boundary reached"))
487 (org-overview)
488 (org-reveal t)
489 (org-show-entry)
490 (recenter-top-bottom)
491 (outline-show-children)
492 (recenter-top-bottom)))
493
494(defun acdw-org/show-previous-heading-tidily ()
495 "Show previous entry, keeping other entries closed."
496 (interactive)
497 (let ((pos (point)))
498 (outline-previous-heading)
499 (unless (and (< (point) pos) (bolp) (org-at-heading-p))
500 (goto-char pos)
501 (outline-hide-subtree)
502 (error "Boundary reached"))
503 (org-overview)
504 (org-reveal t)
505 (org-show-entry)
506 (recenter-top-bottom)
507 (outline-show-children)
508 (recenter-top-bottom)))
509
510
474(provide 'acdw-org) 511(provide 'acdw-org)
475;;; acdw-org.el ends here 512;;; acdw-org.el ends here
476 513
diff --git a/lisp/acdw.el b/lisp/acdw.el index 489b808..df2962a 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -665,12 +665,6 @@ ARGS."
665 (custom-set-faces '(fringe 665 (custom-set-faces '(fringe
666 ((t (:foreground "dim gray")))))) 666 ((t (:foreground "dim gray"))))))
667 667
668(defun acdw/require-private ()
669 "Load \"~/.emacs.d/private.el\".
670It's called 'require-private' for historical reasons."
671 (load (expand-file-name "private.el" user-emacs-directory)
672 :noerror :nomessage))
673
674 668
675;;; Recentf renaming with dired 669;;; Recentf renaming with dired
676;; from ... somewhere. 'rjs', apparently? 670;; from ... somewhere. 'rjs', apparently?