diff --git a/doc/org.texi b/doc/org.texi index 5ec0bc16b..3f2d1b843 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -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 diff --git a/doc/orgguide.texi b/doc/orgguide.texi index a2feede3d..eb18db9a0 100644 --- a/doc/orgguide.texi +++ b/doc/orgguide.texi @@ -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 diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 67d3c3759..2c6afd818 100644 --- a/lisp/ob-R.el +++ b/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) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index f11836d59..a89c550a4 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -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) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index f15567fda..25dcb91cc 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -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 diff --git a/lisp/org-id.el b/lisp/org-id.el index 32c05e6aa..c171bfe66 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -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'." diff --git a/lisp/org-list.el b/lisp/org-list.el index 628dd0a7b..80ccc161e 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -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)))) diff --git a/lisp/org.el b/lisp/org.el index 743845b9f..8c55bd4be 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4,7 +4,7 @@ ;; Copyright (C) 2004-2013 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik -;; Maintainer: Bastien Guerry +;; Maintainer: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org ;; diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 2191539bf..bdc54b220 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -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 diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index 49299b014..c6ab295db 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -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)) diff --git a/lisp/ox.el b/lisp/ox.el index 40c9501f7..c3dc942b6 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -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))) diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el index ab220f6b4..13533de46 100644 --- a/testing/lisp/test-ox.el +++ b/testing/lisp/test-ox.el @@ -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