瀏覽代碼

Merge branch 'master' of orgmode.org:org-mode

David Arroyo Menendez 11 年之前
父節點
當前提交
7b938d8c2c
共有 5 個文件被更改,包括 24 次插入13 次删除
  1. 8 0
      contrib/lisp/org-bibtex-extras.el
  2. 5 5
      doc/org.texi
  3. 3 3
      lisp/ob-lisp.el
  4. 4 4
      lisp/org-crypt.el
  5. 4 1
      lisp/org.el

+ 8 - 0
contrib/lisp/org-bibtex-extras.el

@@ -94,6 +94,14 @@ For example, to point to your `obe-bibtex-file' use the following.
       (outline-previous-visible-heading 1)
       t)))
 
+(defun obe-citation-export (path desc format)
+  (cond
+   ((eq format 'html)  (format "<i>%s</i>" desc))
+   ((eq format 'latex) (format "\\cite{%s}" path))
+   (t desc)))
+
+(org-add-link-type "cite" 'obe-goto-citation 'obe-citation-export)
+
 (defun obe-html-export-citations ()
   "Convert all \\cite{...} citations in the current file into HTML links."
   (save-excursion

+ 5 - 5
doc/org.texi

@@ -12555,13 +12555,13 @@ file.  The use of this feature is better illustrated with couple of examples.
 @enumerate
 @item Embedding ODT tags as part of regular text
 
-You can include simple OpenDocument tags by prefixing them with
-@samp{@@}.  For example, to highlight a region of text do the following:
+You can inline OpenDocument syntax by enclosing it within
+@samp{@@@@odt:...@@@@} markup.  For example, to highlight a region of text do
+the following:
 
 @example
-@@<text:span text:style-name="Highlight">This is a
-highlighted text@@</text:span>.  But this is a
-regular text.
+@@@@odt:<text:span text:style-name="Highlight">This is a highlighted
+text</text:span>@@@@.  But this is a regular text.
 @end example
 
 @strong{Hint:} To see the above example in action, edit your

+ 3 - 3
lisp/ob-lisp.el

@@ -91,10 +91,10 @@ current directory string."
 					(point-min) (point-max)))))
 				 (cdr (assoc :package params)))))))
      (org-babel-result-cond (cdr (assoc :result-params params))
-       (car result)
+       result
        (condition-case nil
-           (read (org-babel-lisp-vector-to-list (cadr result)))
-         (error (cadr result)))))
+           (read (org-babel-lisp-vector-to-list result))
+         (error result))))
    (org-babel-pick-name (cdr (assoc :colname-names params))
 			(cdr (assoc :colnames params)))
    (org-babel-pick-name (cdr (assoc :rowname-names params))

+ 4 - 4
lisp/org-crypt.el

@@ -161,8 +161,8 @@ See `org-crypt-disable-auto-save'."
   (if (and (string= crypt-key (get-text-property 0 'org-crypt-key str))
 	   (string= (sha1 str) (get-text-property 0 'org-crypt-checksum str)))
       (get-text-property 0 'org-crypt-text str)
-    (let ((epg-context (epg-make-context nil t t)))
-      (epg-encrypt-string epg-context str (epg-list-keys epg-context crypt-key)))))
+      (set (make-local-variable 'epg-context) (epg-make-context nil t t))
+    (epg-encrypt-string epg-context str (epg-list-keys epg-context crypt-key))))
 
 (defun org-encrypt-entry ()
   "Encrypt the content of the current headline."
@@ -170,11 +170,11 @@ See `org-crypt-disable-auto-save'."
   (require 'epg)
   (save-excursion
     (org-back-to-heading t)
+    (set (make-local-variable 'epg-context) (epg-make-context nil t t))
     (let ((start-heading (point)))
       (forward-line)
       (when (not (looking-at "-----BEGIN PGP MESSAGE-----"))
         (let ((folded (outline-invisible-p))
-              (epg-context (epg-make-context nil t t))
               (crypt-key (org-crypt-key-for-heading))
               (beg (point))
               end encrypted-text)
@@ -206,11 +206,11 @@ See `org-crypt-disable-auto-save'."
 	(forward-line)
 	(when (looking-at "-----BEGIN PGP MESSAGE-----")
 	  (org-crypt-check-auto-save)
+          (set (make-local-variable 'epg-context) (epg-make-context nil t t))
 	  (let* ((end (save-excursion
 			(search-forward "-----END PGP MESSAGE-----")
 			(forward-line)
 			(point)))
-		 (epg-context (epg-make-context nil t t))
 		 (encrypted-text (buffer-substring-no-properties (point) end))
 		 (decrypted-text
 		  (decode-coding-string

+ 4 - 1
lisp/org.el

@@ -5512,7 +5512,10 @@ The following commands are available:
      (unless org-inhibit-startup-visibility-stuff
        (org-set-startup-visibility))))
   ;; Try to set org-hide correctly
-  (set-face-foreground 'org-hide (org-find-invisible-foreground)))
+  (set-face-foreground 'org-hide (org-find-invisible-foreground))
+  ;; Make sure that file local variables are set.
+  (report-errors "File local-variables error: %s"
+    (hack-local-variables)))
 
 ;; Update `customize-package-emacs-version-alist'
 (add-to-list 'customize-package-emacs-version-alist