emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH 2/2] lisp/ob.el: Don't modify babel info when hashing it


From: Lawrence Mitchell
Subject: [O] [PATCH 2/2] lisp/ob.el: Don't modify babel info when hashing it
Date: Thu, 2 Jun 2011 11:04:05 +0100

* lisp/ob.el (org-babel-sha1-hash): Don't modify info argument by
side-effect when sorting result-params list.

copy-sequence only does shallow copies, so if we're going to modify a
sub-list, we need to make sure we copy it first.
---
 lisp/ob.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/ob.el b/lisp/ob.el
index e1f4372..36649f0 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -767,7 +767,7 @@ the current subtree."
                                  (cond
                                   ((and (listp v) ; lists are sorted
                                         (member (car arg) '(:result-params)))
-                                   (sort v #'string<))
+                                   (sort (copy-sequence v) #'string<))
                                   ((and (stringp v) ; strings are sorted
                                         (member (car arg) '(:results 
:exports)))
                                    (mapconcat #'identity (sort (split-string v)
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]