Explorar el Código

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

Conflicts:
	contrib/lisp/org-e-groff.el
Luis Anaya hace 12 años
padre
commit
74ef099f2c
Se han modificado 3 ficheros con 14 adiciones y 12 borrados
  1. 10 10
      contrib/lisp/org-e-groff.el
  2. 1 1
      lisp/org-capture.el
  3. 3 1
      lisp/org.el

+ 10 - 10
contrib/lisp/org-e-groff.el

@@ -38,9 +38,9 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl))
-
 (require 'org-export)
 
+
 
 ;;; Define Back-End
 
@@ -1242,14 +1242,14 @@ CONTENTS is nil.  INFO is a plist holding contextual information."
      ((string= key "GROFF") value)
      (t nil))))
 
-;;; Groff Environment
+;;; LaTeX Environment
 
-(defun org-e-groff-groff-environment (groff-environment contents info)
-  "Transcode a GROFF-ENVIRONMENT element from Org to Groff.
+(defun org-e-groff-latex-environment (latex-environment contents info)
+  "Transcode a LATEX-ENVIRONMENT element from Org to Groff.
 CONTENTS is nil.  INFO is a plist holding contextual information."
-  (let ((label (org-element-property :name groff-environment))
+  (let ((label (org-element-property :name latex-environment))
         (value (org-remove-indentation
-                (org-element-property :value groff-environment))))
+                (org-element-property :value latex-environment))))
     (if (not (org-string-nw-p label)) value
       ;; Environment is labelled: label must be within the environment
       ;; (otherwise, a reference pointing to that element will count
@@ -1261,12 +1261,12 @@ CONTENTS is nil.  INFO is a plist holding contextual information."
         (insert (format "%s\n" label))
         (buffer-string)))))
 
-;;; Groff Fragment
+;;; LaTeX Fragment
 
-(defun org-e-groff-groff-fragment (groff-fragment contents info)
-  "Transcode a GROFF-FRAGMENT object from Org to Groff.
+(defun org-e-groff-latex-fragment (latex-fragment contents info)
+  "Transcode a LATEX-FRAGMENT object from Org to Groff.
 CONTENTS is nil.  INFO is a plist holding contextual information."
-  (org-element-property :value groff-fragment))
+  (org-element-property :value latex-fragment))
 
 ;;; Line Break
 

+ 1 - 1
lisp/org-capture.el

@@ -1486,7 +1486,7 @@ The template may still contain \"%?\" for cursor positioning."
       ;; Interactive template entries
       (goto-char (point-min))
       (while (and (re-search-forward "%^\\({\\([^}]*\\)}\\)?\\([gGtTuUCLp]\\)?" nil t)
-		  (not (get-text-property (point) 'org-protected)))
+		  (not (get-text-property (1- (point)) 'org-protected)))
 	(unless (org-capture-escaped-%)
 	  (setq char (if (match-end 3) (match-string-no-properties 3))
 		prompt (if (match-end 2) (match-string-no-properties 2)))

+ 3 - 1
lisp/org.el

@@ -9418,6 +9418,7 @@ If the DEFAULT-DESCRIPTION parameter is non-nil, this value will
 be used as the default description."
   (interactive "P")
   (let* ((wcf (current-window-configuration))
+	 (origbuf (current-buffer))
 	 (region (if (org-region-active-p)
 		     (buffer-substring (region-beginning) (region-end))))
 	 (remove (and region (list (region-beginning) (region-end))))
@@ -9493,7 +9494,8 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
 		    (and (equal ":" (substring link -1))
 			 (member (substring link 0 -1) all-prefixes)
 			 (setq link (substring link 0 -1))))
-		(setq link (org-link-try-special-completion link))))
+		(setq link (with-current-buffer origbuf
+			     (org-link-try-special-completion link)))))
 	(set-window-configuration wcf)
 	(kill-buffer "*Org Links*"))
       (setq entry (assoc link org-stored-links))