Browse Source

Merge branch 'maint'

Nicolas Goaziou 11 years ago
parent
commit
17ecfd4130
5 changed files with 35 additions and 32 deletions
  1. 28 24
      lisp/org-element.el
  2. 1 2
      lisp/ox-ascii.el
  3. 2 2
      lisp/ox-beamer.el
  4. 2 2
      lisp/ox-html.el
  5. 2 2
      lisp/ox-latex.el

+ 28 - 24
lisp/org-element.el

@@ -60,7 +60,7 @@
 ;; `table-cell', `target', `timestamp', `underline' and `verbatim'.
 ;; `table-cell', `target', `timestamp', `underline' and `verbatim'.
 ;;
 ;;
 ;; Some elements also have special properties whose value can hold
 ;; Some elements also have special properties whose value can hold
-;; objects themselves (i.e. an item tag or a headline name).  Such
+;; objects themselves (e.g. an item tag or a headline name).  Such
 ;; values are called "secondary strings".  Any object belongs to
 ;; values are called "secondary strings".  Any object belongs to
 ;; either an element or a secondary string.
 ;; either an element or a secondary string.
 ;;
 ;;
@@ -236,7 +236,7 @@ application to open them.")
   '("CAPTION" "DATA" "HEADER" "HEADERS" "LABEL" "NAME" "PLOT" "RESNAME" "RESULT"
   '("CAPTION" "DATA" "HEADER" "HEADERS" "LABEL" "NAME" "PLOT" "RESNAME" "RESULT"
     "RESULTS" "SOURCE" "SRCNAME" "TBLNAME")
     "RESULTS" "SOURCE" "SRCNAME" "TBLNAME")
   "List of affiliated keywords as strings.
   "List of affiliated keywords as strings.
-By default, all keywords setting attributes (i.e. \"ATTR_LATEX\")
+By default, all keywords setting attributes (e.g., \"ATTR_LATEX\")
 are affiliated keywords and need not to be in this list.")
 are affiliated keywords and need not to be in this list.")
 
 
 (defconst org-element-keyword-translation-alist
 (defconst org-element-keyword-translation-alist
@@ -256,7 +256,7 @@ returned as the value of the property.
 This list is checked after translations have been applied.  See
 This list is checked after translations have been applied.  See
 `org-element-keyword-translation-alist'.
 `org-element-keyword-translation-alist'.
 
 
-By default, all keywords setting attributes (i.e. \"ATTR_LATEX\")
+By default, all keywords setting attributes (e.g., \"ATTR_LATEX\")
 allow multiple occurrences and need not to be in this list.")
 allow multiple occurrences and need not to be in this list.")
 
 
 (defconst org-element-parsed-keywords '("CAPTION")
 (defconst org-element-parsed-keywords '("CAPTION")
@@ -801,7 +801,7 @@ and `:footnote-section-p' keywords.
 
 
 The plist also contains any property set in the property drawer,
 The plist also contains any property set in the property drawer,
 with its name in upper cases and colons added at the
 with its name in upper cases and colons added at the
-beginning (i.e. `:CUSTOM_ID').
+beginning (e.g., `:CUSTOM_ID').
 
 
 When RAW-SECONDARY-P is non-nil, headline's title will not be
 When RAW-SECONDARY-P is non-nil, headline's title will not be
 parsed as a secondary string, but as a plain string instead.
 parsed as a secondary string, but as a plain string instead.
@@ -973,7 +973,7 @@ containing `:title', `:begin', `:end', `:contents-begin' and
 
 
 The plist also contains any property set in the property drawer,
 The plist also contains any property set in the property drawer,
 with its name in upper cases and colons added at the
 with its name in upper cases and colons added at the
-beginning (i.e. `:CUSTOM_ID').
+beginning (e.g., `:CUSTOM_ID').
 
 
 When optional argument RAW-SECONDARY-P is non-nil, inline-task's
 When optional argument RAW-SECONDARY-P is non-nil, inline-task's
 title will not be parsed as a secondary string, but as a plain
 title will not be parsed as a secondary string, but as a plain
@@ -2154,8 +2154,8 @@ Assume point is at the beginning of the paragraph."
 		;; A matching `org-element-paragraph-separate' is not
 		;; A matching `org-element-paragraph-separate' is not
 		;; necessarily the end of the paragraph.  In
 		;; necessarily the end of the paragraph.  In
 		;; particular, lines starting with # or : as a first
 		;; particular, lines starting with # or : as a first
-		;; non-space character are ambiguous.  We have check
-		;; if they are valid Org syntax (i.e. not an
+		;; non-space character are ambiguous.  We have to
+		;; check if they are valid Org syntax (e.g., not an
 		;; incomplete keyword).
 		;; incomplete keyword).
 		(beginning-of-line)
 		(beginning-of-line)
 		(while (not
 		(while (not
@@ -2558,8 +2558,8 @@ CONTENTS is verse block contents."
 ;;
 ;;
 ;; Unlike to elements, interstices can be found between objects.
 ;; Unlike to elements, interstices can be found between objects.
 ;; That's why, along with the parser, successor functions are provided
 ;; That's why, along with the parser, successor functions are provided
-;; for each object.  Some objects share the same successor (i.e. `code'
-;; and `verbatim' objects).
+;; for each object.  Some objects share the same successor (e.g.,
+;; `code' and `verbatim' objects).
 ;;
 ;;
 ;; A successor must accept a single argument bounding the search.  It
 ;; A successor must accept a single argument bounding the search.  It
 ;; will return either a cons cell whose CAR is the object's type, as
 ;; will return either a cons cell whose CAR is the object's type, as
@@ -2569,7 +2569,7 @@ CONTENTS is verse block contents."
 ;; org-element-NAME-successor, where NAME is the name of the
 ;; org-element-NAME-successor, where NAME is the name of the
 ;; successor, as defined in `org-element-all-successors'.
 ;; successor, as defined in `org-element-all-successors'.
 ;;
 ;;
-;; Some object types (i.e. `italic') are recursive.  Restrictions on
+;; Some object types (e.g., `italic') are recursive.  Restrictions on
 ;; object types they can contain will be specified in
 ;; object types they can contain will be specified in
 ;; `org-element-object-restrictions'.
 ;; `org-element-object-restrictions'.
 ;;
 ;;
@@ -3059,9 +3059,12 @@ Assume point is at the beginning of the link."
        ;; Type 1: Text targeted from a radio target.
        ;; Type 1: Text targeted from a radio target.
        ((and org-target-link-regexp (looking-at org-target-link-regexp))
        ((and org-target-link-regexp (looking-at org-target-link-regexp))
 	(setq type "radio"
 	(setq type "radio"
-	      link-end (match-end 0)
-	      path (org-match-string-no-properties 0)))
-       ;; Type 2: Standard link, i.e. [[http://orgmode.org][homepage]]
+	      contents-begin (match-beginning 0)
+	      contents-end (match-end 0)
+	      link-end contents-end
+	      raw-link (org-match-string-no-properties 0)
+	      path (downcase raw-link)))
+       ;; Type 2: Standard link, e.g. [[http://orgmode.org][homepage]]
        ((looking-at org-bracket-link-regexp)
        ((looking-at org-bracket-link-regexp)
 	(setq contents-begin (match-beginning 3)
 	(setq contents-begin (match-beginning 3)
 	      contents-end (match-end 3)
 	      contents-end (match-end 3)
@@ -3093,13 +3096,13 @@ Assume point is at the beginning of the link."
 	 ;; headline name or nothing.  PATH is the target or
 	 ;; headline name or nothing.  PATH is the target or
 	 ;; headline's name.
 	 ;; headline's name.
 	 (t (setq type "fuzzy" path raw-link))))
 	 (t (setq type "fuzzy" path raw-link))))
-       ;; Type 3: Plain link, i.e. http://orgmode.org
+       ;; Type 3: Plain link, e.g., http://orgmode.org
        ((looking-at org-plain-link-re)
        ((looking-at org-plain-link-re)
 	(setq raw-link (org-match-string-no-properties 0)
 	(setq raw-link (org-match-string-no-properties 0)
 	      type (org-match-string-no-properties 1)
 	      type (org-match-string-no-properties 1)
 	      link-end (match-end 0)
 	      link-end (match-end 0)
 	      path (org-match-string-no-properties 2)))
 	      path (org-match-string-no-properties 2)))
-       ;; Type 4: Angular link, i.e. <http://orgmode.org>
+       ;; Type 4: Angular link, e.g., <http://orgmode.org>
        ((looking-at org-angle-link-re)
        ((looking-at org-angle-link-re)
 	(setq raw-link (buffer-substring-no-properties
 	(setq raw-link (buffer-substring-no-properties
 			(match-beginning 1) (match-end 2))
 			(match-beginning 1) (match-end 2))
@@ -3229,8 +3232,8 @@ beginning position."
   "Parse radio target at point.
   "Parse radio target at point.
 
 
 Return a list whose CAR is `radio-target' and CDR a plist with
 Return a list whose CAR is `radio-target' and CDR a plist with
-`:begin', `:end', `:contents-begin', `:contents-end', `:value'
-and `:post-blank' as keywords.
+`:value', `:raw-value', `:begin', `:end', `:contents-begin',
+`:contents-end', and `:post-blank' as keywords.
 
 
 Assume point is at the radio target."
 Assume point is at the radio target."
   (save-excursion
   (save-excursion
@@ -3238,17 +3241,18 @@ Assume point is at the radio target."
     (let ((begin (point))
     (let ((begin (point))
 	  (contents-begin (match-beginning 1))
 	  (contents-begin (match-beginning 1))
 	  (contents-end (match-end 1))
 	  (contents-end (match-end 1))
-	  (value (org-match-string-no-properties 1))
+	  (raw-value (org-match-string-no-properties 1))
 	  (post-blank (progn (goto-char (match-end 0))
 	  (post-blank (progn (goto-char (match-end 0))
 			     (skip-chars-forward " \t")))
 			     (skip-chars-forward " \t")))
 	  (end (point)))
 	  (end (point)))
       (list 'radio-target
       (list 'radio-target
-	    (list :begin begin
+	    (list :value (downcase raw-value)
+		  :raw-value raw-value
+		  :begin begin
 		  :end end
 		  :end end
 		  :contents-begin contents-begin
 		  :contents-begin contents-begin
 		  :contents-end contents-end
 		  :contents-end contents-end
-		  :post-blank post-blank
-		  :value value)))))
+		  :post-blank post-blank)))))
 
 
 (defun org-element-radio-target-interpreter (target contents)
 (defun org-element-radio-target-interpreter (target contents)
   "Interpret TARGET object as Org syntax.
   "Interpret TARGET object as Org syntax.
@@ -3771,8 +3775,8 @@ CONTENTS is nil."
 ;; point.
 ;; point.
 ;;
 ;;
 ;; `org-element--current-element' makes use of special modes.  They
 ;; `org-element--current-element' makes use of special modes.  They
-;; are activated for fixed element chaining (i.e. `plain-list' >
-;; `item') or fixed conditional element chaining (i.e. `headline' >
+;; are activated for fixed element chaining (e.g., `plain-list' >
+;; `item') or fixed conditional element chaining (e.g., `headline' >
 ;; `section').  Special modes are: `first-section', `item',
 ;; `section').  Special modes are: `first-section', `item',
 ;; `node-property', `section' and `table-row'.
 ;; `node-property', `section' and `table-row'.
 
 
@@ -3915,7 +3919,7 @@ CDR a plist of keywords and values and move point to the
 beginning of the first line after them.
 beginning of the first line after them.
 
 
 As a special case, if element doesn't start at the beginning of
 As a special case, if element doesn't start at the beginning of
-the line (i.e. a paragraph starting an item), CAR is current
+the line (e.g., a paragraph starting an item), CAR is current
 position of point and CDR is nil."
 position of point and CDR is nil."
   (if (not (bolp)) (list (point))
   (if (not (bolp)) (list (point))
     (let ((case-fold-search t)
     (let ((case-fold-search t)

+ 1 - 2
lisp/ox-ascii.el

@@ -1387,8 +1387,7 @@ INFO is a plist holding contextual information."
 	(format (org-export-get-coderef-format ref desc)
 	(format (org-export-get-coderef-format ref desc)
 		(org-export-resolve-coderef ref info))))
 		(org-export-resolve-coderef ref info))))
      ;; Do not apply a special syntax on radio links.
      ;; Do not apply a special syntax on radio links.
-     ((string= type "radio")
-      (org-element-property :path link))
+     ((string= type "radio") desc)
      ;; Do not apply a special syntax on fuzzy links pointing to
      ;; Do not apply a special syntax on fuzzy links pointing to
      ;; targets.
      ;; targets.
      ((string= type "fuzzy")
      ((string= type "fuzzy")

+ 2 - 2
lisp/ox-beamer.el

@@ -689,8 +689,8 @@ used as a communication channel."
 	(when destination
 	(when destination
 	  (format "\\hyperlink%s{%s}{%s}"
 	  (format "\\hyperlink%s{%s}{%s}"
 		  (or (org-beamer--element-has-overlay-p link) "")
 		  (or (org-beamer--element-has-overlay-p link) "")
-		  (org-export-data (org-element-contents destination) info)
-		  (org-export-solidify-link-text path)))))
+		  (org-export-solidify-link-text path)
+		  (org-export-data (org-element-contents destination) info)))))
      ((and (member type '("custom-id" "fuzzy" "id"))
      ((and (member type '("custom-id" "fuzzy" "id"))
 	   (let ((destination (if (string= type "fuzzy")
 	   (let ((destination (if (string= type "fuzzy")
 				  (org-export-resolve-fuzzy-link link info)
 				  (org-export-resolve-fuzzy-link link info)

+ 2 - 2
lisp/ox-html.el

@@ -2775,9 +2775,9 @@ INFO is a plist holding contextual information.  See
       (let ((destination (org-export-resolve-radio-link link info)))
       (let ((destination (org-export-resolve-radio-link link info)))
 	(when destination
 	(when destination
 	  (format "<a href=\"#%s\"%s>%s</a>"
 	  (format "<a href=\"#%s\"%s>%s</a>"
-		  (org-export-data (org-element-contents destination) info)
+		  (org-export-solidify-link-text path)
 		  attributes
 		  attributes
-		  (org-export-solidify-link-text path)))))
+		  (org-export-data (org-element-contents destination) info)))))
      ;; Links pointing to a headline: Find destination and build
      ;; Links pointing to a headline: Find destination and build
      ;; appropriate referencing command.
      ;; appropriate referencing command.
      ((member type '("custom-id" "fuzzy" "id"))
      ((member type '("custom-id" "fuzzy" "id"))

+ 2 - 2
lisp/ox-latex.el

@@ -1889,8 +1889,8 @@ INFO is a plist holding contextual information.  See
       (let ((destination (org-export-resolve-radio-link link info)))
       (let ((destination (org-export-resolve-radio-link link info)))
 	(when destination
 	(when destination
 	  (format "\\hyperref[%s]{%s}"
 	  (format "\\hyperref[%s]{%s}"
-		  (org-export-data (org-element-contents destination) info)
-		  (org-export-solidify-link-text path)))))
+		  (org-export-solidify-link-text path)
+		  (org-export-data (org-element-contents destination) info)))))
      ;; Links pointing to a headline: Find destination and build
      ;; Links pointing to a headline: Find destination and build
      ;; appropriate referencing command.
      ;; appropriate referencing command.
      ((member type '("custom-id" "fuzzy" "id"))
      ((member type '("custom-id" "fuzzy" "id"))