summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-02-08 18:29:11 +0200
committerThanos Apollo <[email protected]>2024-02-08 18:37:30 +0200
commit006de80905d9628e51687975c08d2a080adc5ca4 (patch)
tree4299e37b7a223af2234ec1c4315293d400cfc756
parent268c5f35ba45364d93dcebe3854e8763efa55923 (diff)
Add gnosis-auto-push
Boolean value, when t auto pushes with git
-rw-r--r--gnosis.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/gnosis.el b/gnosis.el
index 88655cf..dcc6450 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -74,10 +74,10 @@ between two strings to consider them as similar."
:type 'integer
:group 'gnosis)
-(defcustom gnosis-push-command nil
- "Command to run to push "
- :type 'string
- group 'gnosis)
+(defcustom gnosis-auto-push nil
+ "Automatically run `git push' at the end of every review session."
+ :type 'boolean
+ :group 'gnosis)
(defvar gnosis-images-dir (expand-file-name "images" gnosis-dir)
"Gnosis images directory.")
@@ -1036,6 +1036,8 @@ NOTE-NUM: The number of notes reviewed in the session."
(shell-command (concat git " add " (shell-quote-argument "gnosis.db")))
(shell-command (concat git " commit -m "
(shell-quote-argument (concat (format "Total notes for session: %d " note-num)))))
+ (when gnosis-auto-push
+ (shell-command (concat git " push")))
(message "Review session finished. %d notes reviewed." note-num)))
(defun gnosis-review--session (notes)