diff options
author | Achim Gratz <Stromeko@Stromeko.DE> | 2014-09-19 11:34:09 +0200 |
---|---|---|
committer | Achim Gratz <Stromeko@Stromeko.DE> | 2014-09-19 11:34:09 +0200 |
commit | 7d8523d9d143baf63d0791d5a83f294b028caf62 (patch) | |
tree | 48fa1676a9fae50455da820aefca951a32676db7 | |
parent | 1aa719cff2d512733d1981e1b08afde12d99d5dd (diff) | |
download | org-mode-7d8523d9d143baf63d0791d5a83f294b028caf62.tar.gz |
ob-shell: compatibility fix for "Marker does not point anywhere" errors in Emacs 23
* lisp/ob-shell.el (org-babel-sh-initiate-session): After initiating a
session, initialize the marker `comint-last-output-start' since it
is going to be used by the ANSI color filter without further checks
in Emacs 23 and throws an error.
-rw-r--r-- | lisp/ob-shell.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ob-shell.el b/lisp/ob-shell.el index 8c58dfd..817762f 100644 --- a/lisp/ob-shell.el +++ b/lisp/ob-shell.el @@ -175,7 +175,13 @@ Emacs-lisp table, otherwise return the results as a string." (when (and session (not (string= session "none"))) (save-window-excursion (or (org-babel-comint-buffer-livep session) - (progn (shell session) (get-buffer (current-buffer))))))) + (progn + (shell session) + ; Needed for Emacs 23 since the marker is initially + ; undefined and the filter functions try to use it without + ; checking. + (set-mark comint-last-output-start (point)) + (get-buffer (current-buffer))))))) (defvar org-babel-sh-eoe-indicator "echo 'org_babel_sh_eoe'" "String to indicate that evaluation has completed.") |