|
|
|
|
@ -1904,19 +1904,22 @@ |
|
|
|
|
(message "Reverting Orgzly buffers…") |
|
|
|
|
; pull from remote |
|
|
|
|
(let ((default-directory "~/clones/orgzly")) |
|
|
|
|
(or (eq 0 (shell-command "git pull origin master")) (call-interactively #'magit-status))) |
|
|
|
|
(save-excursion |
|
|
|
|
(save-window-excursion |
|
|
|
|
(dolist (b (buffer-list)) |
|
|
|
|
(when (and (with-current-buffer b (derived-mode-p 'org-mode)) |
|
|
|
|
(with-current-buffer b buffer-file-name) |
|
|
|
|
(with-current-buffer b (string-match-p "orgzly" default-directory))) |
|
|
|
|
(pop-to-buffer-same-window b) |
|
|
|
|
(revert-buffer t 'no-confirm))))) |
|
|
|
|
|
|
|
|
|
(or (eq 0 (shell-command "git pull origin master")) |
|
|
|
|
(call-interactively #'magit-status))) |
|
|
|
|
|
|
|
|
|
(dolist (b (buffer-list)) |
|
|
|
|
(when (and (with-current-buffer b (derived-mode-p 'org-mode)) |
|
|
|
|
(with-current-buffer b buffer-file-name) |
|
|
|
|
(with-current-buffer b (string-match-p "orgzly" default-directory))) |
|
|
|
|
(with-current-buffer b |
|
|
|
|
(revert-buffer t 'no-confirm)))) |
|
|
|
|
(org-agenda-redo-all) |
|
|
|
|
(org-agenda-redo-all)) |
|
|
|
|
;; I do not understand why, but I need to run it twice |
|
|
|
|
|
|
|
|
|
(define-key org-agenda-mode-map (kbd "Z") 'org-revert-all-orgzly-buffers) |
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
Use gac |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(require 'git-auto-commit-mode) |
|
|
|
|
|