Skip to content

Instantly share code, notes, and snippets.

@takaxp
Created July 9, 2018 19:19
Show Gist options
  • Select an option

  • Save takaxp/8f83f07d3fc4b711d2d18f5f82767524 to your computer and use it in GitHub Desktop.

Select an option

Save takaxp/8f83f07d3fc4b711d2d18f5f82767524 to your computer and use it in GitHub Desktop.
Fix wrong cursor position when find-file org files with session-mode
diff --git a/lisp/org-element.el b/lisp/org-element.el
index d757e65fa..387777ceb 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -4079,6 +4079,7 @@ If STRING is the empty string or nil, return nil."
((equal string "") nil)
(t (let ((local-variables (buffer-local-variables)))
(with-temp-buffer
+ (set (make-local-variable 'session-file-alist) nil)
(dolist (v local-variables)
(ignore-errors
(if (symbolp v) (makunbound v)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment