Closed skyer9 closed 11 years ago
i made some code.
in calfw.el =============
(defun cfw:clean-exit () "Close Calendar Framework with extra action." (interactive) (if (fboundp 'cfw:org-extra-action-before-closing-calfw) (cfw:org-extra-action-before-closing-calfw)) ;; (if (fboundp 'cfw:ical-extra-action-for-close-buffer) ;; (cfw:ical-extra-action-for-close-buffer)) (bury-buffer))
(defvar cfw:calendar-mode-map (cfw:define-keymap '( ...... ("x" . cfw:clean-exit) ...... )) "Default key map of calendar views.")
in calfw-org.el =============
(defun cfw:org-extra-action-before-closing-calfw () "Close buffers opened by calfw-org before closing Calendar Framework." (org-release-buffers org-agenda-new-buffers) (setq org-agenda-new-buffers nil))
i do not know it is best way. but, it works.
Hi, @skyer9
You can write the function cfw:clean-exit
and cfw:org-extra-action-before-closing-calfw
at the outside calfw.el, such as at your init.el
, subsequent to requiring calfw.el.
And you can customize the keybinding like following code.
(eval-after-load "calfw"
'(progn
(define-key cfw:define-keymap "x" 'cfw:clean-exit)))
i close it.
i made "clean exit #20" related function. (close all buffer opened by calfw-org)
but i do not know how to add shortcut in calfw buffer.
can you tell me how to add it?