Merge branch 'master' of orgmode.org:org-mode
This commit is contained in:
commit
eab949fc4a
|
@ -13,9 +13,9 @@
|
|||
@c Version and Contact Info
|
||||
@set MAINTAINERSITE @uref{http://orgmode.org,maintainers web page}
|
||||
@set AUTHOR Carsten Dominik
|
||||
@set MAINTAINER Bastien Guerry
|
||||
@set MAINTAINEREMAIL @email{bzg at gnu dot org}
|
||||
@set MAINTAINERCONTACT @uref{mailto:bzg at gnu dot org,contact the maintainer}
|
||||
@set MAINTAINER Carsten Dominik
|
||||
@set MAINTAINEREMAIL @email{carsten at orgmode dot org}
|
||||
@set MAINTAINERCONTACT @uref{mailto:carsten at orgmode dot org,contact the maintainer}
|
||||
@c %**end of header
|
||||
@finalout
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
@c Version and Contact Info
|
||||
@set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage}
|
||||
@set AUTHOR Carsten Dominik
|
||||
@set MAINTAINER Bastien Guerry
|
||||
@set MAINTAINEREMAIL @email{bzg at gnu dot org}
|
||||
@set MAINTAINERCONTACT @uref{mailto:bzg at gnu dot org,contact the maintainer}
|
||||
@set MAINTAINER Carsten Dominik
|
||||
@set MAINTAINEREMAIL @email{carsten at orgmode dot org}
|
||||
@set MAINTAINERCONTACT @uref{mailto:carsten at orgmode dot org,contact the maintainer}
|
||||
@c %**end of header
|
||||
@finalout
|
||||
|
||||
|
|
55
lisp/ob-R.el
55
lisp/ob-R.el
|
@ -234,31 +234,40 @@ current code buffer."
|
|||
(and (member "graphics" (cdr (assq :result-params 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)
|
||||
"Construct the call to the graphics device."
|
||||
(let ((devices
|
||||
'((: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
|
||||
:type :family :title :fonts :version
|
||||
:paper :encoding :pagecentre :colormodel
|
||||
:useDingbats :horizontal))
|
||||
(device (and (string-match ".+\\.\\([^.]+\\)" out-file)
|
||||
(match-string 1 out-file)))
|
||||
(extra-args (cdr (assq :R-dev-args params))) filearg args)
|
||||
(setq device (or (and device (cdr (assq (intern (concat ":" device))
|
||||
devices))) "png"))
|
||||
(setq filearg
|
||||
(if (member device '("pdf" "postscript" "svg" "tikz")) "file" "filename"))
|
||||
(let* ((allowed-args '(:width :height :bg :units :pointsize
|
||||
:antialias :quality :compression :res
|
||||
:type :family :title :fonts :version
|
||||
:paper :encoding :pagecentre :colormodel
|
||||
:useDingbats :horizontal))
|
||||
(device (and (string-match ".+\\.\\([^.]+\\)" 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)
|
||||
(setq device (nth 1 device-info))
|
||||
(setq filearg (nth 2 device-info))
|
||||
(setq args (mapconcat
|
||||
(lambda (pair)
|
||||
(if (member (car pair) allowed-args)
|
||||
|
|
|
@ -610,7 +610,8 @@ block."
|
|||
(if (member "none" result-params)
|
||||
(progn
|
||||
(funcall cmd body params)
|
||||
(message "result silenced"))
|
||||
(message "result silenced")
|
||||
(setq result nil))
|
||||
(setq result
|
||||
((lambda (result)
|
||||
(if (and (eq (cdr (assoc :result-type params))
|
||||
|
@ -643,9 +644,9 @@ block."
|
|||
(setq result-params
|
||||
(remove "file" result-params)))))
|
||||
(org-babel-insert-result
|
||||
result result-params info new-hash indent lang)
|
||||
(run-hooks 'org-babel-after-execute-hook)
|
||||
result))
|
||||
result result-params info new-hash indent lang))
|
||||
(run-hooks 'org-babel-after-execute-hook)
|
||||
result)
|
||||
(setq call-process-region
|
||||
'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
|
||||
results already exist."
|
||||
(interactive "P")
|
||||
(let ((info (org-babel-get-src-block-info)))
|
||||
(let ((info (org-babel-get-src-block-info 'light)))
|
||||
(when info
|
||||
(save-excursion
|
||||
;; 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
|
||||
block but are passed literally to the \"example-block\"."
|
||||
(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))
|
||||
(body (nth 1 info))
|
||||
(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))
|
||||
(tangle-file
|
||||
(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"))))
|
||||
path-collector)
|
||||
(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-locations)))
|
||||
(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 ()
|
||||
"Read the data from `org-id-locations-file'."
|
||||
|
|
|
@ -2836,7 +2836,7 @@ ignores hidden links."
|
|||
((= dcst ?t) '<)))
|
||||
(next-record (lambda ()
|
||||
(skip-chars-forward " \r\t\n")
|
||||
(beginning-of-line)))
|
||||
(or (eobp) (beginning-of-line))))
|
||||
(end-record (lambda ()
|
||||
(goto-char (org-list-get-item-end-before-blank
|
||||
(point) struct))))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
;; Copyright (C) 2004-2013 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; 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
|
||||
;; Homepage: http://orgmode.org
|
||||
;;
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
(export-block . org-ascii-export-block)
|
||||
(export-snippet . org-ascii-export-snippet)
|
||||
(fixed-width . org-ascii-fixed-width)
|
||||
(footnote-definition . org-ascii-footnote-definition)
|
||||
(footnote-reference . org-ascii-footnote-reference)
|
||||
(headline . org-ascii-headline)
|
||||
(horizontal-rule . org-ascii-horizontal-rule)
|
||||
|
@ -1147,7 +1146,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
|||
;;;; Footnote Definition
|
||||
|
||||
;; 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
|
||||
|
|
|
@ -257,10 +257,13 @@ re-read the iCalendar file.")
|
|||
|
||||
(org-export-define-derived-backend 'icalendar 'ascii
|
||||
:translate-alist '((clock . ignore)
|
||||
(footnote-definition . ignore)
|
||||
(footnote-reference . ignore)
|
||||
(headline . org-icalendar-entry)
|
||||
(inlinetask . ignore)
|
||||
(planning . ignore)
|
||||
(section . ignore)
|
||||
(inner-template . (lambda (c i) c))
|
||||
(template . org-icalendar-template))
|
||||
:options-alist
|
||||
'((:exclude-tags
|
||||
|
@ -945,9 +948,8 @@ files to build the calendar from."
|
|||
;; Owner.
|
||||
user-full-name
|
||||
;; Timezone.
|
||||
(if (org-string-nw-p org-icalendar-timezone)
|
||||
org-icalendar-timezone
|
||||
(cadr (current-time-zone)))
|
||||
(or (org-string-nw-p org-icalendar-timezone)
|
||||
(cadr (current-time-zone)))
|
||||
;; Description.
|
||||
org-icalendar-combined-description
|
||||
;; Contents.
|
||||
|
@ -958,7 +960,8 @@ files to build the calendar from."
|
|||
(catch 'nextfile
|
||||
(org-check-agenda-file 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.
|
||||
(when org-icalendar-store-UID
|
||||
(org-icalendar-create-uid file t marks))
|
||||
|
|
|
@ -1994,6 +1994,8 @@ a tree with a select tag."
|
|||
(if (eq (car with-drawers-p) 'not)
|
||||
(member-ignore-case name (cdr with-drawers-p))
|
||||
(not (member-ignore-case name with-drawers-p))))))))
|
||||
((footnote-definition footnote-reference)
|
||||
(not (plist-get options :with-footnotes)))
|
||||
((headline inlinetask)
|
||||
(let ((with-tasks (plist-get options :with-tasks))
|
||||
(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))
|
||||
;; ... fixed-width areas.
|
||||
(fixed-width (plist-get info :with-fixed-width))
|
||||
;; ... footnotes...
|
||||
((footnote-definition footnote-reference)
|
||||
(plist-get info :with-footnotes))
|
||||
;; ... LaTeX environments and fragments...
|
||||
((latex-environment latex-fragment)
|
||||
(let ((with-latex-p (plist-get info :with-latex)))
|
||||
|
|
|
@ -361,6 +361,21 @@ Paragraph"
|
|||
(should
|
||||
(equal (org-export-as 'test nil nil nil '(:with-drawers (not "BAR")))
|
||||
":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.
|
||||
(when (featurep 'org-inlinetask)
|
||||
(should
|
||||
|
|
Loading…
Reference in New Issue