Browse Source

agenda: C-c C-c deactivates columns

* lisp/org-agenda.el (org-agenda-ctrl-c-ctrl-c):  New function.

This is to unify and thereby harmonize the behavior of C-c C-c with
regard to Org files and columns.
Marco Wahl 5 months ago
parent
commit
45a0fe531c
2 changed files with 9 additions and 0 deletions
  1. 2 0
      etc/ORG-NEWS
  2. 7 0
      lisp/org-agenda.el

+ 2 - 0
etc/ORG-NEWS

@@ -50,6 +50,8 @@ buffers are displayed by modifying ~display-buffer-alist~ or
 recent ~org-columns-set-tags-or-toggle~.  Tag setting is still
 possible via column view value edit or with =<C-c C-q>=.
 *** ~org-datetree-find-month-create~
+*** ~org-agenda-ctrl-c-ctrl-c~
+=<C-c C-c>= for agenda.  Up to now just deactivate columns.
 ** Removed functions and variables
 
 *** ~org-columns-set-tags-or-toggle~

+ 7 - 0
lisp/org-agenda.el

@@ -2422,6 +2422,8 @@ The following commands are available:
 (define-key org-agenda-mode-map [remap forward-paragraph] 'org-agenda-forward-block)
 (define-key org-agenda-mode-map [remap backward-paragraph] 'org-agenda-backward-block)
 
+(org-defkey org-agenda-mode-map "\C-c\C-c" 'org-agenda-ctrl-c-ctrl-c)
+
 (when org-agenda-mouse-1-follows-link
   (org-defkey org-agenda-mode-map [follow-link] 'mouse-face))
 (easy-menu-define org-agenda-menu org-agenda-mode-map "Agenda menu"
@@ -10548,6 +10550,11 @@ when defining today."
          (org-extend-today-until (1+ hour)))
     (org-agenda-todo arg)))
 
+(defun org-agenda-ctrl-c-ctrl-c ()
+  "If columns are active, deactivate them."
+  (interactive)
+  (when org-agenda-columns-active (org-columns-quit)))
+
 (provide 'org-agenda)
 
 ;;; org-agenda.el ends here