mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-22 07:09:47 +00:00
ob-comint.el: Fix bug.
* lisp/ob-comint.el (org-babel-comint-eval-invisibly-and-wait-for-file): Fix bug. The intention is to test whether the string ends with a newline, so we should just do that. Otherwise: (string-match "\n$" "foo\n\nbar") ;; => 3 => :-(
This commit is contained in:
parent
2df0785fbd
commit
a4a1d85ed0
@ -148,7 +148,7 @@ FILE exists at end of evaluation."
|
||||
(if (file-exists-p file) (delete-file file))
|
||||
(process-send-string
|
||||
(get-buffer-process buffer)
|
||||
(if (string-match "\n$" string) string (concat string "\n")))
|
||||
(if (= (aref string (1- (length string))) ?\n) string (concat string "\n")))
|
||||
;; From Tramp 2.1.19 the following cache flush is not necessary
|
||||
(if (file-remote-p default-directory)
|
||||
(let (v)
|
||||
|
Loading…
Reference in New Issue
Block a user