Merge branch 'master' of orgmode.org:org-mode
This commit is contained in:
commit
eab949fc4a
|
@ -13,9 +13,9 @@
|
||||||
@c Version and Contact Info
|
@c Version and Contact Info
|
||||||
@set MAINTAINERSITE @uref{http://orgmode.org,maintainers web page}
|
@set MAINTAINERSITE @uref{http://orgmode.org,maintainers web page}
|
||||||
@set AUTHOR Carsten Dominik
|
@set AUTHOR Carsten Dominik
|
||||||
@set MAINTAINER Bastien Guerry
|
@set MAINTAINER Carsten Dominik
|
||||||
@set MAINTAINEREMAIL @email{bzg at gnu dot org}
|
@set MAINTAINEREMAIL @email{carsten at orgmode dot org}
|
||||||
@set MAINTAINERCONTACT @uref{mailto:bzg at gnu dot org,contact the maintainer}
|
@set MAINTAINERCONTACT @uref{mailto:carsten at orgmode dot org,contact the maintainer}
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
@finalout
|
@finalout
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
@c Version and Contact Info
|
@c Version and Contact Info
|
||||||
@set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage}
|
@set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage}
|
||||||
@set AUTHOR Carsten Dominik
|
@set AUTHOR Carsten Dominik
|
||||||
@set MAINTAINER Bastien Guerry
|
@set MAINTAINER Carsten Dominik
|
||||||
@set MAINTAINEREMAIL @email{bzg at gnu dot org}
|
@set MAINTAINEREMAIL @email{carsten at orgmode dot org}
|
||||||
@set MAINTAINERCONTACT @uref{mailto:bzg at gnu dot org,contact the maintainer}
|
@set MAINTAINERCONTACT @uref{mailto:carsten at orgmode dot org,contact the maintainer}
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
@finalout
|
@finalout
|
||||||
|
|
||||||
|
|
41
lisp/ob-R.el
41
lisp/ob-R.el
|
@ -234,31 +234,40 @@ current code buffer."
|
||||||
(and (member "graphics" (cdr (assq :result-params params)))
|
(and (member "graphics" (cdr (assq :result-params params)))
|
||||||
(cdr (assq :file params))))
|
(cdr (assq :file params))))
|
||||||
|
|
||||||
|
(defvar org-babel-R-graphics-devices
|
||||||
|
'((:bmp "bmp" "filename")
|
||||||
|
(:jpg "jpeg" "filename")
|
||||||
|
(:jpeg "jpeg" "filename")
|
||||||
|
(:tikz "tikz" "file")
|
||||||
|
(:tiff "tiff" "filename")
|
||||||
|
(:png "png" "filename")
|
||||||
|
(:svg "svg" "file")
|
||||||
|
(:pdf "pdf" "file")
|
||||||
|
(:ps "postscript" "file")
|
||||||
|
(:postscript "postscript" "file"))
|
||||||
|
"An alist mapping graphics file types to R functions.
|
||||||
|
|
||||||
|
Each member of this list is a list with three members:
|
||||||
|
1. the file extension of the graphics file, as an elisp :keyword
|
||||||
|
2. the R graphics device function to call to generate such a file
|
||||||
|
3. the name of the argument to this function which specifies the
|
||||||
|
file to write to (typically \"file\" or \"filename\")")
|
||||||
|
|
||||||
(defun org-babel-R-construct-graphics-device-call (out-file params)
|
(defun org-babel-R-construct-graphics-device-call (out-file params)
|
||||||
"Construct the call to the graphics device."
|
"Construct the call to the graphics device."
|
||||||
(let ((devices
|
(let* ((allowed-args '(:width :height :bg :units :pointsize
|
||||||
'((:bmp . "bmp")
|
|
||||||
(:jpg . "jpeg")
|
|
||||||
(:jpeg . "jpeg")
|
|
||||||
(:tikz . "tikz")
|
|
||||||
(:tiff . "tiff")
|
|
||||||
(:png . "png")
|
|
||||||
(:svg . "svg")
|
|
||||||
(:pdf . "pdf")
|
|
||||||
(:ps . "postscript")
|
|
||||||
(:postscript . "postscript")))
|
|
||||||
(allowed-args '(:width :height :bg :units :pointsize
|
|
||||||
:antialias :quality :compression :res
|
:antialias :quality :compression :res
|
||||||
:type :family :title :fonts :version
|
:type :family :title :fonts :version
|
||||||
:paper :encoding :pagecentre :colormodel
|
:paper :encoding :pagecentre :colormodel
|
||||||
:useDingbats :horizontal))
|
:useDingbats :horizontal))
|
||||||
(device (and (string-match ".+\\.\\([^.]+\\)" out-file)
|
(device (and (string-match ".+\\.\\([^.]+\\)" out-file)
|
||||||
(match-string 1 out-file)))
|
(match-string 1 out-file)))
|
||||||
|
(device-info (or (assq (intern (concat ":" device))
|
||||||
|
org-babel-R-graphics-devices)
|
||||||
|
(assq :png org-babel-R-graphics-devices)))
|
||||||
(extra-args (cdr (assq :R-dev-args params))) filearg args)
|
(extra-args (cdr (assq :R-dev-args params))) filearg args)
|
||||||
(setq device (or (and device (cdr (assq (intern (concat ":" device))
|
(setq device (nth 1 device-info))
|
||||||
devices))) "png"))
|
(setq filearg (nth 2 device-info))
|
||||||
(setq filearg
|
|
||||||
(if (member device '("pdf" "postscript" "svg" "tikz")) "file" "filename"))
|
|
||||||
(setq args (mapconcat
|
(setq args (mapconcat
|
||||||
(lambda (pair)
|
(lambda (pair)
|
||||||
(if (member (car pair) allowed-args)
|
(if (member (car pair) allowed-args)
|
||||||
|
|
|
@ -610,7 +610,8 @@ block."
|
||||||
(if (member "none" result-params)
|
(if (member "none" result-params)
|
||||||
(progn
|
(progn
|
||||||
(funcall cmd body params)
|
(funcall cmd body params)
|
||||||
(message "result silenced"))
|
(message "result silenced")
|
||||||
|
(setq result nil))
|
||||||
(setq result
|
(setq result
|
||||||
((lambda (result)
|
((lambda (result)
|
||||||
(if (and (eq (cdr (assoc :result-type params))
|
(if (and (eq (cdr (assoc :result-type params))
|
||||||
|
@ -643,9 +644,9 @@ block."
|
||||||
(setq result-params
|
(setq result-params
|
||||||
(remove "file" result-params)))))
|
(remove "file" result-params)))))
|
||||||
(org-babel-insert-result
|
(org-babel-insert-result
|
||||||
result result-params info new-hash indent lang)
|
result result-params info new-hash indent lang))
|
||||||
(run-hooks 'org-babel-after-execute-hook)
|
(run-hooks 'org-babel-after-execute-hook)
|
||||||
result))
|
result)
|
||||||
(setq call-process-region
|
(setq call-process-region
|
||||||
'org-babel-call-process-region-original)))))))))
|
'org-babel-call-process-region-original)))))))))
|
||||||
|
|
||||||
|
@ -918,7 +919,7 @@ source code block, otherwise return nil. With optional prefix
|
||||||
argument RE-RUN the source-code block is evaluated even if
|
argument RE-RUN the source-code block is evaluated even if
|
||||||
results already exist."
|
results already exist."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(let ((info (org-babel-get-src-block-info)))
|
(let ((info (org-babel-get-src-block-info 'light)))
|
||||||
(when info
|
(when info
|
||||||
(save-excursion
|
(save-excursion
|
||||||
;; go to the results, if there aren't any then run the block
|
;; go to the results, if there aren't any then run the block
|
||||||
|
@ -2364,7 +2365,7 @@ would set the value of argument \"a\" equal to \"9\". Note that
|
||||||
these arguments are not evaluated in the current source-code
|
these arguments are not evaluated in the current source-code
|
||||||
block but are passed literally to the \"example-block\"."
|
block but are passed literally to the \"example-block\"."
|
||||||
(let* ((parent-buffer (or parent-buffer (current-buffer)))
|
(let* ((parent-buffer (or parent-buffer (current-buffer)))
|
||||||
(info (or info (org-babel-get-src-block-info)))
|
(info (or info (org-babel-get-src-block-info 'light)))
|
||||||
(lang (nth 0 info))
|
(lang (nth 0 info))
|
||||||
(body (nth 1 info))
|
(body (nth 1 info))
|
||||||
(ob-nww-start org-babel-noweb-wrap-start)
|
(ob-nww-start org-babel-noweb-wrap-start)
|
||||||
|
|
|
@ -185,7 +185,7 @@ used to limit the exported source code blocks by language."
|
||||||
org-babel-default-header-args))
|
org-babel-default-header-args))
|
||||||
(tangle-file
|
(tangle-file
|
||||||
(when (equal arg '(16))
|
(when (equal arg '(16))
|
||||||
(or (cdr (assoc :tangle (nth 2 (org-babel-get-src-block-info))))
|
(or (cdr (assoc :tangle (nth 2 (org-babel-get-src-block-info 'light))))
|
||||||
(user-error "Point is not in a source code block"))))
|
(user-error "Point is not in a source code block"))))
|
||||||
path-collector)
|
path-collector)
|
||||||
(mapc ;; map over all languages
|
(mapc ;; map over all languages
|
||||||
|
|
|
@ -527,7 +527,9 @@ When CHECK is given, prepare detailed information about duplicate IDs."
|
||||||
(org-id-hash-to-alist org-id-locations)
|
(org-id-hash-to-alist org-id-locations)
|
||||||
org-id-locations)))
|
org-id-locations)))
|
||||||
(with-temp-file org-id-locations-file
|
(with-temp-file org-id-locations-file
|
||||||
(print out (current-buffer))))))
|
(let ((print-level nil)
|
||||||
|
(print-length nil))
|
||||||
|
(print out (current-buffer)))))))
|
||||||
|
|
||||||
(defun org-id-locations-load ()
|
(defun org-id-locations-load ()
|
||||||
"Read the data from `org-id-locations-file'."
|
"Read the data from `org-id-locations-file'."
|
||||||
|
|
|
@ -2836,7 +2836,7 @@ ignores hidden links."
|
||||||
((= dcst ?t) '<)))
|
((= dcst ?t) '<)))
|
||||||
(next-record (lambda ()
|
(next-record (lambda ()
|
||||||
(skip-chars-forward " \r\t\n")
|
(skip-chars-forward " \r\t\n")
|
||||||
(beginning-of-line)))
|
(or (eobp) (beginning-of-line))))
|
||||||
(end-record (lambda ()
|
(end-record (lambda ()
|
||||||
(goto-char (org-list-get-item-end-before-blank
|
(goto-char (org-list-get-item-end-before-blank
|
||||||
(point) struct))))
|
(point) struct))))
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
;; Copyright (C) 2004-2013 Free Software Foundation, Inc.
|
;; Copyright (C) 2004-2013 Free Software Foundation, Inc.
|
||||||
;;
|
;;
|
||||||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||||
;; Maintainer: Bastien Guerry <bzg at gnu dot org>
|
;; Maintainer: Carsten Dominik <carsten at orgmode dot org>
|
||||||
;; Keywords: outlines, hypermedia, calendar, wp
|
;; Keywords: outlines, hypermedia, calendar, wp
|
||||||
;; Homepage: http://orgmode.org
|
;; Homepage: http://orgmode.org
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -68,7 +68,6 @@
|
||||||
(export-block . org-ascii-export-block)
|
(export-block . org-ascii-export-block)
|
||||||
(export-snippet . org-ascii-export-snippet)
|
(export-snippet . org-ascii-export-snippet)
|
||||||
(fixed-width . org-ascii-fixed-width)
|
(fixed-width . org-ascii-fixed-width)
|
||||||
(footnote-definition . org-ascii-footnote-definition)
|
|
||||||
(footnote-reference . org-ascii-footnote-reference)
|
(footnote-reference . org-ascii-footnote-reference)
|
||||||
(headline . org-ascii-headline)
|
(headline . org-ascii-headline)
|
||||||
(horizontal-rule . org-ascii-horizontal-rule)
|
(horizontal-rule . org-ascii-horizontal-rule)
|
||||||
|
@ -1147,7 +1146,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||||
;;;; Footnote Definition
|
;;;; Footnote Definition
|
||||||
|
|
||||||
;; Footnote Definitions are ignored. They are compiled at the end of
|
;; Footnote Definitions are ignored. They are compiled at the end of
|
||||||
;; the document, by `org-ascii-template'.
|
;; the document, by `org-ascii-inner-template'.
|
||||||
|
|
||||||
|
|
||||||
;;;; Footnote Reference
|
;;;; Footnote Reference
|
||||||
|
|
|
@ -257,10 +257,13 @@ re-read the iCalendar file.")
|
||||||
|
|
||||||
(org-export-define-derived-backend 'icalendar 'ascii
|
(org-export-define-derived-backend 'icalendar 'ascii
|
||||||
:translate-alist '((clock . ignore)
|
:translate-alist '((clock . ignore)
|
||||||
|
(footnote-definition . ignore)
|
||||||
|
(footnote-reference . ignore)
|
||||||
(headline . org-icalendar-entry)
|
(headline . org-icalendar-entry)
|
||||||
(inlinetask . ignore)
|
(inlinetask . ignore)
|
||||||
(planning . ignore)
|
(planning . ignore)
|
||||||
(section . ignore)
|
(section . ignore)
|
||||||
|
(inner-template . (lambda (c i) c))
|
||||||
(template . org-icalendar-template))
|
(template . org-icalendar-template))
|
||||||
:options-alist
|
:options-alist
|
||||||
'((:exclude-tags
|
'((:exclude-tags
|
||||||
|
@ -945,8 +948,7 @@ files to build the calendar from."
|
||||||
;; Owner.
|
;; Owner.
|
||||||
user-full-name
|
user-full-name
|
||||||
;; Timezone.
|
;; Timezone.
|
||||||
(if (org-string-nw-p org-icalendar-timezone)
|
(or (org-string-nw-p org-icalendar-timezone)
|
||||||
org-icalendar-timezone
|
|
||||||
(cadr (current-time-zone)))
|
(cadr (current-time-zone)))
|
||||||
;; Description.
|
;; Description.
|
||||||
org-icalendar-combined-description
|
org-icalendar-combined-description
|
||||||
|
@ -958,7 +960,8 @@ files to build the calendar from."
|
||||||
(catch 'nextfile
|
(catch 'nextfile
|
||||||
(org-check-agenda-file file)
|
(org-check-agenda-file file)
|
||||||
(with-current-buffer (org-get-agenda-file-buffer file)
|
(with-current-buffer (org-get-agenda-file-buffer file)
|
||||||
(let ((marks (cdr (assoc (expand-file-name file) restriction))))
|
(let ((marks (cdr (assoc (expand-file-name file)
|
||||||
|
restriction))))
|
||||||
;; Create ID if necessary.
|
;; Create ID if necessary.
|
||||||
(when org-icalendar-store-UID
|
(when org-icalendar-store-UID
|
||||||
(org-icalendar-create-uid file t marks))
|
(org-icalendar-create-uid file t marks))
|
||||||
|
|
|
@ -1994,6 +1994,8 @@ a tree with a select tag."
|
||||||
(if (eq (car with-drawers-p) 'not)
|
(if (eq (car with-drawers-p) 'not)
|
||||||
(member-ignore-case name (cdr with-drawers-p))
|
(member-ignore-case name (cdr with-drawers-p))
|
||||||
(not (member-ignore-case name with-drawers-p))))))))
|
(not (member-ignore-case name with-drawers-p))))))))
|
||||||
|
((footnote-definition footnote-reference)
|
||||||
|
(not (plist-get options :with-footnotes)))
|
||||||
((headline inlinetask)
|
((headline inlinetask)
|
||||||
(let ((with-tasks (plist-get options :with-tasks))
|
(let ((with-tasks (plist-get options :with-tasks))
|
||||||
(todo (org-element-property :todo-keyword blob))
|
(todo (org-element-property :todo-keyword blob))
|
||||||
|
@ -2230,9 +2232,6 @@ according to export options INFO, stored as a plist."
|
||||||
(plist-get info :with-emphasize))
|
(plist-get info :with-emphasize))
|
||||||
;; ... fixed-width areas.
|
;; ... fixed-width areas.
|
||||||
(fixed-width (plist-get info :with-fixed-width))
|
(fixed-width (plist-get info :with-fixed-width))
|
||||||
;; ... footnotes...
|
|
||||||
((footnote-definition footnote-reference)
|
|
||||||
(plist-get info :with-footnotes))
|
|
||||||
;; ... LaTeX environments and fragments...
|
;; ... LaTeX environments and fragments...
|
||||||
((latex-environment latex-fragment)
|
((latex-environment latex-fragment)
|
||||||
(let ((with-latex-p (plist-get info :with-latex)))
|
(let ((with-latex-p (plist-get info :with-latex)))
|
||||||
|
|
|
@ -361,6 +361,21 @@ Paragraph"
|
||||||
(should
|
(should
|
||||||
(equal (org-export-as 'test nil nil nil '(:with-drawers (not "BAR")))
|
(equal (org-export-as 'test nil nil nil '(:with-drawers (not "BAR")))
|
||||||
":FOO:\nkeep\n:END:\n")))))
|
":FOO:\nkeep\n:END:\n")))))
|
||||||
|
;; Footnotes.
|
||||||
|
(should
|
||||||
|
(equal "Footnote?"
|
||||||
|
(let ((org-footnote-section nil))
|
||||||
|
(org-test-with-temp-text "Footnote?[fn:1]\n\n[fn:1] Def"
|
||||||
|
(org-test-with-backend test
|
||||||
|
(org-trim
|
||||||
|
(org-export-as 'test nil nil nil '(:with-footnotes nil))))))))
|
||||||
|
(should
|
||||||
|
(equal "Footnote?[fn:1]\n\n[fn:1] Def"
|
||||||
|
(let ((org-footnote-section nil))
|
||||||
|
(org-test-with-temp-text "Footnote?[fn:1]\n\n[fn:1] Def"
|
||||||
|
(org-test-with-backend test
|
||||||
|
(org-trim
|
||||||
|
(org-export-as 'test nil nil nil '(:with-footnotes t))))))))
|
||||||
;; Inlinetasks.
|
;; Inlinetasks.
|
||||||
(when (featurep 'org-inlinetask)
|
(when (featurep 'org-inlinetask)
|
||||||
(should
|
(should
|
||||||
|
|
Loading…
Reference in New Issue