File tree 1 file changed +18
-17
lines changed 1 file changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ If nil you should use `org-cmenu-update-transient-prefixes' function."
86
86
87
87
(defun org-cmenu-define-standard-type-aliases ()
88
88
; ; Buffer pseudo element (see: org-cmenu-element-lineage)
89
- (org-cmenu-define-type-alias 'buffer '(buffer))
89
+ (org-cmenu-define-type-alias 'buffer '(buffer org-data ))
90
90
; ; Each elements (see: org-element-all-elements)
91
91
(dolist (type org-element-all-elements)
92
92
(org-cmenu-define-type-alias type (list type)))
@@ -491,25 +491,26 @@ If nil you should use `org-cmenu-update-transient-prefixes' function."
491
491
(car path) pos)))))
492
492
(setq path (cdr path)))
493
493
494
- (let ((on-headline-p (eq (org-element-type (car path)) 'headline )))
495
- ; ; Add a section element
496
- (unless on-headline-p
494
+ (unless (eq (org-element-type (car (last path))) 'org-data )
495
+ (let ((on-headline-p (eq (org-element-type (car path)) 'headline )))
496
+ ; ; Add a section element
497
+ (unless on-headline-p
498
+ (setq path
499
+ (append
500
+ path
501
+ (list (org-cmenu-element-current-section)))))
502
+
503
+ ; ; Add headline elements
504
+ (setq path
505
+ (append
506
+ path
507
+ (org-cmenu-element-headlines-path (not on-headline-p))))
508
+
509
+ ; ; Add buffer elements
497
510
(setq path
498
511
(append
499
512
path
500
- (list (org-cmenu-element-current-section)))))
501
-
502
- ; ; Add headline elements
503
- (setq path
504
- (append
505
- path
506
- (org-cmenu-element-headlines-path (not on-headline-p))))
507
-
508
- ; ; Add buffer elements
509
- (setq path
510
- (append
511
- path
512
- (list (org-cmenu-element-buffer)))))
513
+ (list (org-cmenu-element-buffer))))))
513
514
path))
514
515
515
516
; ;;; Menu
You can’t perform that action at this time.
0 commit comments