Advise magit-diff-visit-file to show org context

This commit is contained in:
Ivan Malison 2016-08-18 11:14:22 -07:00
parent 50c7d29577
commit 9ce4e04bc6
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -2170,6 +2170,11 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
(use-package magit
:commands magit-status
:bind (("C-x g" . magit-status))
:preface
(progn
(defun imalison:after-magit-visit-file (&rest args)
(when (derived-mode-p 'org-mode)
(org-show-context 'magit-goto))))
:config
(progn
(defvar-setq magit-last-seen-setup-instructions "1.4.0")
@ -2177,6 +2182,8 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
(when (bound-and-true-p imalison:gpg-key)
(add-to-list 'magit-commit-arguments
(format "--gpg-sign=%s" imalison:gpg-key)))
(add-to-list 'org-show-context-detail '(magit-goto . lineage))
(advice-add 'magit-diff-visit-file :after 'imalison:after-magit-visit-file)
(use-package magit-filenotify
;; Seems like OSX does not support filenotify.
:disabled t