Browse Source

Added commit message complete command

* Added a command macoy-commit-message-done which will properly finish a
commit message editing session depending on whether you're using dsvn
or magit. It will also backup the commit message in
macoy-commit-message-backup (file path) in case the commit fails so
you can recover the commit message.
* I also increased the large-file-warning-threshold
master
Macoy Madson 4 years ago
parent
commit
84e2e99020
  1. 34
      Emacs/emacsConfig.txt

34
Emacs/emacsConfig.txt

@ -49,7 +49,7 @@
;; - Tab key behavior confuses me especially in plaintext files
;; - Get back and forward working (back doesn't work too well)
;; - Build system selection via Ido custom list (like Sublime's C-S-b)
;; - Ag filter files
;; - Ag filter files (esp. auto-generated files)
;; - Determine what smooth-scrolling actually does (if anything)
;; - Copy line when nothing is marked
;; - Ido jump to file anywhere does more harm than good (especially when creating new files)
@ -61,6 +61,15 @@
;; - Shortcuts:
;; Toggle whitespace mode
;; Swap windows
;; - Indent-tabs-mode only in C/C++
;; - Auto-select actual struct definition when multiple xref results
;; - Make sure when I say xref-other it ends up in the other window (even after multiple results)
;; - Make clang-format region/function not affect cursor position after it's done (e.g. set then pop mark)
;; - If use-region, C-k should delete region instead of line
;; - Make git-commit-mode and with-editor-mode not use C-c (somehow raise priority of my-keys? Or rebind?)
;; - Powerline: Make mode colors comments so they aren't as bright (same color as percent complete)
;; - tags-query-replace use marked for tag to replace
;; - Recover from commit failed backup command
;; Emacs Notes
;; C-h k <the keybind> to find what a key does
@ -552,6 +561,26 @@
(autoload 'svn-status "dsvn" "Run `svn status'." t)
(autoload 'svn-update "dsvn" "Run `svn update'." t)
(setq macoy-commit-message-backup "~/Macoy_Emacs_CommitMessage_Backup.txt")
;; SVN and Magit commit message finished
(defun macoy-commit-message-done ()
"Save a copy of the commit message then run log-edit-done (dsvn) or with-editor-finish (magit)"
(interactive)
;; Save a backup of the message in case something goes wrong
(mark-whole-buffer)
(write-region (region-beginning) (region-end) macoy-commit-message-backup t)
;; magit
(when (string-equal (buffer-name) "COMMIT_EDITMSG")
(call-interactively 'with-editor-finish)
)
;; dsvn
(when (derived-mode-p 'log-edit-mode)
(call-interactively 'log-edit-done)
)
)
;;
;; Build systems
;;
@ -932,7 +961,7 @@ static char *gnus-pointer[] = {
\"###....####.######\",
\"###..######.######\",
\"###########.######\" };")) t)
'(large-file-warning-threshold 40000000)
'(large-file-warning-threshold 60000000)
'(linum-format " %7i ")
'(org-support-shift-select t)
'(package-archives
@ -1005,3 +1034,4 @@ static char *gnus-pointer[] = {
;; Macoy custom overrides end
;;
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)

Loading…
Cancel
Save