From 17608670a4f4e8edb91efe04d86fe80ff9d01b69 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sun, 14 May 2023 09:37:51 +0200 Subject: [PATCH 1/5] Update version number for the 9.6.6 release --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index f4aa28cc4..d3e14fece 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9,7 +9,7 @@ ;; URL: https://orgmode.org ;; Package-Requires: ((emacs "26.1")) -;; Version: 9.6.5 +;; Version: 9.6.6 ;; This file is part of GNU Emacs. ;; From 8037aab4938d5b063d718bfe4421ab3470bd7f5c Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Wed, 24 May 2023 16:56:24 +0200 Subject: [PATCH 2/5] org-texinfo-export-to-info: Fix docstring * lisp/ox-texinfo.el (org-texinfo-export-to-info): Remove description of a removed argument from the docstring. The PUB-DIR argument has been removed in 496ed832d. Reported-by: Niall Dooley Link: https://list.orgmode.org/orgmode/CADS3Lq7W=LZYd3F3aA0p1RaDWdHSmwahvs8oyJfx_Hw0WF9K9Q@mail.gmail.com/ --- lisp/ox-texinfo.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index f822f3d11..5befcac1c 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1965,9 +1965,6 @@ EXT-PLIST, when provided, is a property list with external parameters overriding Org default settings, but still inferior to file-local settings. -When optional argument PUB-DIR is set, use it as the publishing -directory. - Return INFO file's name." (interactive) (let ((outfile (org-export-output-file-name ".texi" subtreep)) From c50b03d99e3b13ff311e66422cc3916791f37f68 Mon Sep 17 00:00:00 2001 From: Leo Butler Date: Thu, 1 Jun 2023 13:39:13 -0500 Subject: [PATCH 3/5] lisp/ob-C.el: replace %f with %s to prevent unneeded rounding * lisp/ob-C.el (org-babel-C-val-to-C-type): Floats should be printed as string literals to prevent rounding introduced by %f format. * testing/lisp/test-ob-C.el (ob-C/float-var): Test that floats are not rounded when passed as an org :var. --- lisp/ob-C.el | 2 +- testing/lisp/test-ob-C.el | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/ob-C.el b/lisp/ob-C.el index 3a6e99623..7763c4c07 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -339,7 +339,7 @@ FORMAT can be either a format string or a function which is called with VAL." (type (pcase basetype (`integerp '("int" "%d")) - (`floatp '("double" "%f")) + (`floatp '("double" "%s")) ;; %f rounds, use %s to print the float literally (`stringp (list (if (eq org-babel-c-variant 'd) "string" "const char*") diff --git a/testing/lisp/test-ob-C.el b/testing/lisp/test-ob-C.el index b6dbed8e3..8546a48dd 100644 --- a/testing/lisp/test-ob-C.el +++ b/testing/lisp/test-ob-C.el @@ -95,6 +95,17 @@ (org-babel-next-src-block 10) (should (= 42 (org-babel-execute-src-block)))))) +(ert-deftest ob-C/float-var () + "Test that floats are passed without unnecessary rounding." + (if (executable-find org-babel-C++-compiler) + (org-test-with-temp-text +"#+source: float_var +#+begin_src cpp :var x=1.123456789012345678 :includes \"\" :results silent +double y = 1.123456789012345678; +std::cout << (x == y); +#+end_src" +(should (= 1 (org-babel-execute-src-block)))))) + (ert-deftest ob-C/table () "Test of a table output" (if (executable-find org-babel-C++-compiler) From ef891067a2732da5c1c9fc9855af472efc44892c Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Wed, 7 Jun 2023 20:22:22 +0300 Subject: [PATCH 4/5] * doc/org-manual.org (Export hooks): Fix example hook Set `org-map-continue-from' in the hook as otherwise the example won't work if user try the example on buffer with headings not separated by contents or empty lines. Reported-by: Victor A. Stoichita Link: https://orgmode.org/list/877csf6yva.fsf@svictor.net --- doc/org-manual.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index 295140e61..ea519ea3e 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -16034,7 +16034,12 @@ can remove every headline in the buffer during export like this: "Remove all headlines in the current buffer. BACKEND is the export back-end being used, as a symbol." (org-map-entries - (lambda () (delete-region (point) (line-beginning-position 2))))) + (lambda () + (delete-region (point) (line-beginning-position 2)) + ;; We need to tell `org-map-entries' to not skip over heading at + ;; point. Otherwise, it would continue from _next_ heading. See + ;; the docstring of `org-map-entries' for details. + (setq org-map-continue-from (point))))) (add-hook 'org-export-before-parsing-hook #'my-headline-removal) #+end_src From f2e71ee726ab50b58c0aaebd20f7dd4f9b384332 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 1 Jun 2023 11:49:19 -0700 Subject: [PATCH 5/5] org.el: inline display of attached images in link descriptions * lisp/org.el (org-display-inline-images): inline display of attached images in link descriptions. Previously, `org-display-inline-images' only inlined images in link descriptions when they were explicit "file:" links. This change adds support for "attachment:" links. E.g.: [[https://orgmode.org][attachment:emacs-screenshot.png]] --- lisp/org.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index d3e14fece..2e26c08e5 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16253,7 +16253,8 @@ conventions: 2. Its description consists in a single link of the previous type. In this case, that link must be a well-formed plain - or angle link, i.e., it must have an explicit \"file\" type. + or angle link, i.e., it must have an explicit \"file\" or + \"attachment\" type. Equip each image with the key-map `image-map'. @@ -16284,7 +16285,7 @@ buffer boundaries with possible narrowing." ;; "file:" links. Also check link abbreviations since ;; some might expand to "file" links. (file-types-re - (format "\\[\\[\\(?:file%s:\\|attachment:\\|[./~]\\)\\|\\]\\[\\(