|
@@ -501,7 +501,7 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:"
|
|
|
("Check Tags"
|
|
|
,@(org-mouse-keyword-menu
|
|
|
(sort (mapcar 'car (org-get-buffer-tags)) 'string-lessp)
|
|
|
- #'(lambda (tag) (org-tags-sparse-tree nil tag)))
|
|
|
+ (lambda (tag) (org-tags-sparse-tree nil tag)))
|
|
|
"--"
|
|
|
["Custom Tag ..." org-tags-sparse-tree t])
|
|
|
["Check Phrase ..." org-occur]
|
|
@@ -511,26 +511,26 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:"
|
|
|
("Display Tags"
|
|
|
,@(org-mouse-keyword-menu
|
|
|
(sort (mapcar 'car (org-get-buffer-tags)) 'string-lessp)
|
|
|
- #'(lambda (tag) (org-tags-view nil tag)))
|
|
|
+ (lambda (tag) (org-tags-view nil tag)))
|
|
|
"--"
|
|
|
["Custom Tag ..." org-tags-view t])
|
|
|
["Display Calendar" org-goto-calendar t]
|
|
|
"--"
|
|
|
,@(org-mouse-keyword-menu
|
|
|
(mapcar 'car org-agenda-custom-commands)
|
|
|
- #'(lambda (key)
|
|
|
- (eval `(org-agenda nil (string-to-char ,key))))
|
|
|
+ (lambda (key)
|
|
|
+ (eval `(org-agenda nil (string-to-char ,key))))
|
|
|
nil
|
|
|
- #'(lambda (key)
|
|
|
- (let ((entry (assoc key org-agenda-custom-commands)))
|
|
|
- (org-mouse-clip-text
|
|
|
- (cond
|
|
|
- ((stringp (nth 1 entry)) (nth 1 entry))
|
|
|
- ((stringp (nth 2 entry))
|
|
|
- (concat (org-mouse-agenda-type (nth 1 entry))
|
|
|
- (nth 2 entry)))
|
|
|
- (t "Agenda Command `%s'"))
|
|
|
- 30))))
|
|
|
+ (lambda (key)
|
|
|
+ (let ((entry (assoc key org-agenda-custom-commands)))
|
|
|
+ (org-mouse-clip-text
|
|
|
+ (cond
|
|
|
+ ((stringp (nth 1 entry)) (nth 1 entry))
|
|
|
+ ((stringp (nth 2 entry))
|
|
|
+ (concat (org-mouse-agenda-type (nth 1 entry))
|
|
|
+ (nth 2 entry)))
|
|
|
+ (t "Agenda Command `%s'"))
|
|
|
+ 30))))
|
|
|
"--"
|
|
|
["Delete Blank Lines" delete-blank-lines
|
|
|
:visible (org-mouse-empty-line)]
|
|
@@ -795,8 +795,8 @@ This means, between the beginning of line and the point."
|
|
|
("Tags and Priorities"
|
|
|
,@(org-mouse-keyword-menu
|
|
|
(org-mouse-priority-list)
|
|
|
- #'(lambda (keyword)
|
|
|
- (org-mouse-set-priority (string-to-char keyword)))
|
|
|
+ (lambda (keyword)
|
|
|
+ (org-mouse-set-priority (string-to-char keyword)))
|
|
|
priority "Priority %s")
|
|
|
"--"
|
|
|
,@(org-mouse-tag-menu))
|
|
@@ -856,55 +856,55 @@ This means, between the beginning of line and the point."
|
|
|
(mouse-drag-region event)))
|
|
|
|
|
|
(add-hook 'org-mode-hook
|
|
|
- #'(lambda ()
|
|
|
- (setq org-mouse-context-menu-function 'org-mouse-context-menu)
|
|
|
-
|
|
|
- (when (memq 'context-menu org-mouse-features)
|
|
|
- (org-defkey org-mouse-map [mouse-3] nil)
|
|
|
- (org-defkey org-mode-map [mouse-3] 'org-mouse-show-context-menu))
|
|
|
- (org-defkey org-mode-map [down-mouse-1] 'org-mouse-down-mouse)
|
|
|
- (when (memq 'context-menu org-mouse-features)
|
|
|
- (org-defkey org-mouse-map [C-drag-mouse-1] 'org-mouse-move-tree)
|
|
|
- (org-defkey org-mouse-map [C-down-mouse-1] 'org-mouse-move-tree-start))
|
|
|
- (when (memq 'yank-link org-mouse-features)
|
|
|
- (org-defkey org-mode-map [S-mouse-2] 'org-mouse-yank-link)
|
|
|
- (org-defkey org-mode-map [drag-mouse-3] 'org-mouse-yank-link))
|
|
|
- (when (memq 'move-tree org-mouse-features)
|
|
|
- (org-defkey org-mouse-map [drag-mouse-3] 'org-mouse-move-tree)
|
|
|
- (org-defkey org-mouse-map [down-mouse-3] 'org-mouse-move-tree-start))
|
|
|
-
|
|
|
- (when (memq 'activate-stars org-mouse-features)
|
|
|
- (font-lock-add-keywords
|
|
|
- nil
|
|
|
- `((,org-outline-regexp
|
|
|
- 0 `(face org-link mouse-face highlight keymap ,org-mouse-map)
|
|
|
- 'prepend))
|
|
|
- t))
|
|
|
-
|
|
|
- (when (memq 'activate-bullets org-mouse-features)
|
|
|
- (font-lock-add-keywords
|
|
|
- nil
|
|
|
- `(("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +"
|
|
|
- (1 `(face org-link keymap ,org-mouse-map mouse-face highlight)
|
|
|
- 'prepend)))
|
|
|
- t))
|
|
|
-
|
|
|
- (when (memq 'activate-checkboxes org-mouse-features)
|
|
|
- (font-lock-add-keywords
|
|
|
- nil
|
|
|
- `(("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)"
|
|
|
- (2 `(face bold keymap ,org-mouse-map mouse-face highlight) t)))
|
|
|
- t))
|
|
|
-
|
|
|
- (defadvice org-open-at-point (around org-mouse-open-at-point activate)
|
|
|
- (let ((context (org-context)))
|
|
|
- (cond
|
|
|
- ((assq :headline-stars context) (org-cycle))
|
|
|
- ((assq :checkbox context) (org-toggle-checkbox))
|
|
|
- ((assq :item-bullet context)
|
|
|
- (let ((org-cycle-include-plain-lists t)) (org-cycle)))
|
|
|
- ((org-footnote-at-reference-p) nil)
|
|
|
- (t ad-do-it))))))
|
|
|
+ (lambda ()
|
|
|
+ (setq org-mouse-context-menu-function 'org-mouse-context-menu)
|
|
|
+
|
|
|
+ (when (memq 'context-menu org-mouse-features)
|
|
|
+ (org-defkey org-mouse-map [mouse-3] nil)
|
|
|
+ (org-defkey org-mode-map [mouse-3] 'org-mouse-show-context-menu))
|
|
|
+ (org-defkey org-mode-map [down-mouse-1] 'org-mouse-down-mouse)
|
|
|
+ (when (memq 'context-menu org-mouse-features)
|
|
|
+ (org-defkey org-mouse-map [C-drag-mouse-1] 'org-mouse-move-tree)
|
|
|
+ (org-defkey org-mouse-map [C-down-mouse-1] 'org-mouse-move-tree-start))
|
|
|
+ (when (memq 'yank-link org-mouse-features)
|
|
|
+ (org-defkey org-mode-map [S-mouse-2] 'org-mouse-yank-link)
|
|
|
+ (org-defkey org-mode-map [drag-mouse-3] 'org-mouse-yank-link))
|
|
|
+ (when (memq 'move-tree org-mouse-features)
|
|
|
+ (org-defkey org-mouse-map [drag-mouse-3] 'org-mouse-move-tree)
|
|
|
+ (org-defkey org-mouse-map [down-mouse-3] 'org-mouse-move-tree-start))
|
|
|
+
|
|
|
+ (when (memq 'activate-stars org-mouse-features)
|
|
|
+ (font-lock-add-keywords
|
|
|
+ nil
|
|
|
+ `((,org-outline-regexp
|
|
|
+ 0 `(face org-link mouse-face highlight keymap ,org-mouse-map)
|
|
|
+ 'prepend))
|
|
|
+ t))
|
|
|
+
|
|
|
+ (when (memq 'activate-bullets org-mouse-features)
|
|
|
+ (font-lock-add-keywords
|
|
|
+ nil
|
|
|
+ `(("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +"
|
|
|
+ (1 `(face org-link keymap ,org-mouse-map mouse-face highlight)
|
|
|
+ 'prepend)))
|
|
|
+ t))
|
|
|
+
|
|
|
+ (when (memq 'activate-checkboxes org-mouse-features)
|
|
|
+ (font-lock-add-keywords
|
|
|
+ nil
|
|
|
+ `(("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)"
|
|
|
+ (2 `(face bold keymap ,org-mouse-map mouse-face highlight) t)))
|
|
|
+ t))
|
|
|
+
|
|
|
+ (defadvice org-open-at-point (around org-mouse-open-at-point activate)
|
|
|
+ (let ((context (org-context)))
|
|
|
+ (cond
|
|
|
+ ((assq :headline-stars context) (org-cycle))
|
|
|
+ ((assq :checkbox context) (org-toggle-checkbox))
|
|
|
+ ((assq :item-bullet context)
|
|
|
+ (let ((org-cycle-include-plain-lists t)) (org-cycle)))
|
|
|
+ ((org-footnote-at-reference-p) nil)
|
|
|
+ (t ad-do-it))))))
|
|
|
|
|
|
(defun org-mouse-move-tree-start (_event)
|
|
|
(interactive "e")
|