소스 검색

org.el: Warn the user when buffer is (un)narrowed to subtree

* lisp/org.el (org-toggle-narrow-to-subtree): Warn the user when
buffer is (un)narrowed to subtree.
Bastien 5 년 전
부모
커밋
0ff2867aa1
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -7780,8 +7780,9 @@ If yes, remember the marker and the distance to BEG."
   "Narrow to the subtree at point or widen a narrowed buffer."
   (interactive)
   (if (buffer-narrowed-p)
-      (widen)
-    (org-narrow-to-subtree)))
+      (progn (widen) (message "Buffer widen"))
+    (org-narrow-to-subtree)
+    (message "Buffer narrowed to current subtree")))
 
 (defun org-narrow-to-block ()
   "Narrow buffer to the current block."