[compile/org] preserve column
This commit is contained in:
parent
6623a59e04
commit
b365aac259
3
init.org
3
init.org
|
@ -3821,6 +3821,7 @@ Potentially useful - https://www.draketo.de/software/emacs-javascript.html
|
|||
(let (buffer position column tangled-file-p)
|
||||
(save-window-excursion
|
||||
(funcall oldfn)
|
||||
(setq column (- (point) (point-at-bol)))
|
||||
;; `compile-goto-error' might be called from the output of
|
||||
;; `literate-elisp-byte-compile-file', which means
|
||||
;; `org-babel-tangle-jump-to-org' would error
|
||||
|
@ -3835,7 +3836,7 @@ Potentially useful - https://www.draketo.de/software/emacs-javascript.html
|
|||
(if (window-live-p org-window)
|
||||
(select-window org-window)
|
||||
(switch-to-buffer buffer))
|
||||
(goto-char position))
|
||||
(goto-char (+ position column)))
|
||||
(funcall oldfn))))
|
||||
|
||||
(advice-add 'compile-goto-error :around #'my-org-lp-goto-error)
|
||||
|
|
Loading…
Reference in New Issue