diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2026-07-30 20:09:00 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2026-07-30 20:18:37 -0400 |
| commit | 8c4e09dff83847ac7f07bf1da7751e9328006c4d (patch) | |
| tree | a0e245567ce225f8bcb63b66e4d2373b5d033e4a /.config/emacs/lisp/evil-collection/modes/calendar | |
| parent | 1e33b30749bb1043ffc6ceb5a2fb0977446788b3 (diff) | |
actual final changes and get rid of junk in lisp dir
actually works fine
Diffstat (limited to '.config/emacs/lisp/evil-collection/modes/calendar')
| -rw-r--r-- | .config/emacs/lisp/evil-collection/modes/calendar/README.org | 63 | ||||
| -rw-r--r-- | .config/emacs/lisp/evil-collection/modes/calendar/evil-collection-calendar.el | 146 |
2 files changed, 0 insertions, 209 deletions
diff --git a/.config/emacs/lisp/evil-collection/modes/calendar/README.org b/.config/emacs/lisp/evil-collection/modes/calendar/README.org deleted file mode 100644 index 2733b42..0000000 --- a/.config/emacs/lisp/evil-collection/modes/calendar/README.org +++ /dev/null @@ -1,63 +0,0 @@ -* calendar - - Evil bindings for [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Calendar_002fDiary.html][calendar]]. - -** Key bindings - - | Command | Original | Evil | - |--------------------------------------+----------------+---------------------| - | =calendar-backward-day= | =C-b=, =left= | =h= | - | =calendar-forward-day= | =C-f=, =right= | =l= | - | =calendar-backward-week= | =C-p=, =up= | =k= | - | =calendar-forward-week= | =C-n=, =down= | =j= | - | =calendar-beginning-of-week= | =C-a= | =0=, =^= | - | =calendar-end-of-week= | =C-e= | =$= | - | =calendar-beginning-of-month= | =M-a= | =(= | - | =calendar-end-of-month= | =M-e= | =)= | - | =calendar-backward-month= | =M-{= | ={=, =C-k=, =gk= | - | =calendar-forward-month= | =M-}= | =}=, =C-j=, =gj= | - | =calendar-backward-year= | =C-x [= | =[[= | - | =calendar-forward-year= | =C-x ]= | =]]= | - | =calendar-beginning-of-year= | =M-<= | =M-<= | - | =calendar-end-of-year= | =M->= | =M->= | - | =calendar-scroll-right= | =>=, =C-x <= | =<= | - | =calendar-scroll-left= | =<=, =C-x >= | =>= | - | =calendar-scroll-right-three-months= | =M-v=, =prior= | =C-b= | - | =calendar-scroll-left-three-months= | =C-v=, =next= | =C-f= | - | =scroll-other-window= | =SPC= | =SPC= | - | =scroll-other-window-down= | =S-SPC=, =DEL= | =S-SPC=, =<delete>= | - | =calendar-set-mark= | =C-SPC= | =v= | - | =calendar-goto-today= | =.= | =.= | - | =calendar-other-month= | =o= | =o=, =gD= | - | =calendar-goto-date= | =g d= | =gd= | - | =diary-view-entries= | =d= | =d= | - | =diary-view-other-diary-entries= | =D= | =D= | - | =diary-mark-entries= | =m= | =m= | - | =diary-show-all-entries= | =s= | =s= | - | =appt-add= | =A a= | =Aa= | - | =appt-delete= | =A d= | =Ad= | - | =calendar-unmark= | =u= | =u= | - | =calendar-mark-holidays= | =x= | =x= | - | =calendar-list-holidays= | =a= | =a=, =gh= | - | =calendar-cursor-holidays= | =h= | =r= | - | =calendar-lunar-phases= | =M= | =gm= | - | =calendar-sunrise-sunset= | =S= | =gs= | - | =org-calendar-goto-agenda= | n/a | =gc= | - | =calendar-redraw= | =C-c C-l= | =gr= | - | =calendar-goto-info-node= | =?= | =?=, =g?= | - | =calendar-count-days-region= | =M-== | =M-== | - | =calendar-exit= | =q= | =q=, =ZZ= | - | =evil-quit= | n/a | =ZQ= | - -** Org integration - - When =evil-collection-calendar-want-org-bindings= is non-nil, the key named by - =org-calendar-to-agenda-key= (default =c=) is bound to =org-calendar-goto-agenda=, - and =org-calendar-insert-diary-entry-key= (default =i=) to =org-agenda-diary-entry= - when =org-agenda-diary-file= is set. - -** Customization - - | Variable | Default | Purpose | - |----------------------------------------------+---------+---------------------------------------------| - | =evil-collection-calendar-want-org-bindings= | =nil= | Install =org-calendar-*= bindings on entry. | diff --git a/.config/emacs/lisp/evil-collection/modes/calendar/evil-collection-calendar.el b/.config/emacs/lisp/evil-collection/modes/calendar/evil-collection-calendar.el deleted file mode 100644 index 81464a8..0000000 --- a/.config/emacs/lisp/evil-collection/modes/calendar/evil-collection-calendar.el +++ /dev/null @@ -1,146 +0,0 @@ -;;; evil-collection-calendar.el --- Evil bindings for calendar -*- lexical-binding: t -*- - -;; Copyright (C) 2017 Pierre Neidhardt - -;; Author: Pierre Neidhardt <mail@ambrevar.xyz> -;; Maintainer: James Nguyen <james@jojojames.com> -;; Pierre Neidhardt <mail@ambrevar.xyz> -;; URL: https://github.com/emacs-evil/evil-collection -;; Version: 0.0.1 -;; Package-Requires: ((emacs "26.3")) -;; Keywords: evil, calendar, tools - -;; This file is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. -;; -;; This file is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; For a full copy of the GNU General Public License -;; see <http://www.gnu.org/licenses/>. - -;;; Commentary: -;; Evil bindings for the calendar. - -;;; Code: -(require 'calendar) -(require 'evil-collection) - -(defconst evil-collection-calendar-maps '(calendar-mode-map)) - -(defun evil-collection-calendar-setup-org-bindings () - "Bind Org functions to Calendar keymap." - (require 'org) - (require 'org-agenda) - (defvar org-calendar-to-agenda-key) - (defvar org-agenda-diary-file) - (defvar org-calendar-insert-diary-entry-key) - - (let ((key (pcase org-calendar-to-agenda-key - ((and key (pred stringp)) key) - ;; The default value of `org-calendar-to-agenda-key' is [?c] in Org 9.1 - ;; We do make a minimal compatibility support for vector of integers. - ((and key (pred vectorp)) (mapconcat (lambda (x) (format "%c" x)) key "")) - ((and (pred symbolp) 'default) "c") - (_ "")))) - (evil-collection-define-key 'normal 'calendar-mode-map - (kbd key) 'org-calendar-goto-agenda)) - - ;; Similar to `org-calendar-to-agenda-key'. - (unless (eq org-agenda-diary-file 'diary-file) - (let ((key (pcase org-calendar-insert-diary-entry-key - ((and key (pred stringp)) key) - ((and key (pred vectorp)) (mapconcat (lambda (x) (format "%c" x)) key "")) - ;; NOTE Consistent behavior with `org-calendar-to-agenda-key' - ;; although it's not supported in Org officially. - ((and (pred symbolp) 'default) "i") - (_ "")))) - (evil-collection-define-key 'normal 'calendar-mode-map - (kbd key) 'org-agenda-diary-entry)))) - -;; Otherwise it will load tons of org stuff at startup. -(defvar evil-collection-calendar-want-org-bindings) -(when evil-collection-calendar-want-org-bindings - (add-hook 'calendar-mode-hook #'evil-collection-calendar-setup-org-bindings)) - -;;;###autoload -(defun evil-collection-calendar-setup () - "Set up `evil' bindings for `calendar'." - (evil-set-initial-state 'calendar-mode 'normal) - (evil-collection-define-key 'normal 'calendar-mode-map - ;; motion - "h" 'calendar-backward-day - "j" 'calendar-forward-week - "k" 'calendar-backward-week - "l" 'calendar-forward-day - "0" 'calendar-beginning-of-week - "^" 'calendar-beginning-of-week - "$" 'calendar-end-of-week - "[[" 'calendar-backward-year - "]]" 'calendar-forward-year - (kbd "M-<") 'calendar-beginning-of-year - (kbd "M->") 'calendar-end-of-year - "(" 'calendar-beginning-of-month - ")" 'calendar-end-of-month - (kbd "SPC") 'scroll-other-window - (kbd "S-SPC") 'scroll-other-window-down - (kbd "<delete>") 'scroll-other-window-down - "<" 'calendar-scroll-right - ">" 'calendar-scroll-left - (kbd "C-b") 'calendar-scroll-right-three-months - (kbd "C-f") 'calendar-scroll-left-three-months - "{" 'calendar-backward-month - "}" 'calendar-forward-month - (kbd "C-k") 'calendar-backward-month - (kbd "C-j") 'calendar-forward-month - "gk" 'calendar-backward-month - "gj" 'calendar-forward-month - - ;; visual - "v" 'calendar-set-mark - - ;; goto - "." 'calendar-goto-today - "o" 'calendar-other-month - "gd" 'calendar-goto-date ; "gd" in evil-org-agenda, "gd" in Emacs. - "gD" 'calendar-other-month - - ;; diary - "D" 'diary-view-other-diary-entries - "d" 'diary-view-entries - "m" 'diary-mark-entries - "s" 'diary-show-all-entries - - ;; appointment - "Aa" 'appt-add - "Ad" 'appt-delete - - "u" 'calendar-unmark - "x" 'calendar-mark-holidays - - ;; show - "gm" 'calendar-lunar-phases ; "gm" in evil-org-agenda. TODO: Shadows calendar-mayan. - "gs" 'calendar-sunrise-sunset ; "gs" in evil-org-agenda - "gh" 'calendar-list-holidays ; "gh" in evil-org-agenda. TODO: Shadows calendar-hebrew. - "gc" 'org-calendar-goto-agenda ; "gc" in evil-org-agenda. TODO: Shadows calendar-iso. - "a" 'calendar-list-holidays - "r" 'calendar-cursor-holidays - - ;; refresh - "gr" 'calendar-redraw - - "g?" 'calendar-goto-info-node - "?" 'calendar-goto-info-node ; Search is not very useful. - (kbd "M-=") 'calendar-count-days-region - - ;; quit - "q" 'calendar-exit - "ZQ" 'evil-quit - "ZZ" 'calendar-exit)) - -(provide 'evil-collection-calendar) -;;; evil-collection-calendar.el ends here |
