From a4d38e3965fbd7a219eb6f6a7994d433ace037c8 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 29 Nov 2022 22:32:30 -0500 Subject: [PATCH 1/2] ORG-NEWS: Fix location of some v9.6 entries Three entries describe changes made in the 9.6 release, not 9.5. The associated commits are 226119124 (ob-core.el/babel: Special handling for attachment links in src block, 2022-06-14), 7f3a6cf6e (org-capture: Add template hook properties, 2022-10-07), and b4e437f96 (ob-core: Resolve named list references to simple lists, 2022-11-26). --- etc/ORG-NEWS | 96 ++++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index e93007a75..3e941047d 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -186,6 +186,40 @@ network (CDN) provider from CloudFlare to jsDelivr. You can find the new terms of service, including the privacy policy, at https://www.jsdelivr.com/terms. +*** List references in source block variable assignments are now proper lists + +List representation of named lists is now converted to a simple list +as promised by the manual section [[info:org#Environment of a Code Block][org#Environment of a Code Block]]. +Previously, it was converted to a list of lists. + +Before: + +#+begin_src org +,#+NAME: example-list +- simple + - not + - nested +- list + +,#+BEGIN_SRC emacs-lisp :var x=example-list :results value +(format "%S" x) +,#+END_SRC + +,#+RESULTS: +: (("simple" (unordered ("not") ("nested"))) ("list")) +#+end_src + +After: + +#+begin_src org +,#+BEGIN_SRC emacs-lisp :var x=example-list :results value +(format "%S" x) +,#+END_SRC + +,#+RESULTS: +: ("simple" "list") +#+end_src + ** New features *** Clock table can now produce quarterly reports @@ -390,6 +424,13 @@ attempt to analyze the results and simply returns nil. This can be useful when the code block is used for side effects only but generates large outputs that may be slow to analyze for Org. +*** Add Capture template hook properties + +Capture templates can now attach template specific hooks via the +following properties: ~:hook~, ~:prepare-finalize~, +~:before-finalize~, ~:after-finalize~. These nullary functions run +prior to their global counterparts for the selected template. + ** New options *** A new option for custom setting ~org-refile-use-outline-path~ to show document title in refile targets @@ -444,6 +485,13 @@ The new setting, when set to non-nil, makes Org create alarm at the event time when the alarm time is set to 0. The default value is nil -- do not create alarms at the event time. +*** New special value ~'attach~ for src block =:dir= option + +Passing the symbol ~attach~ or string ="'attach"= (with quotes) to the =:dir= +option of a src block is now equivalent to =:dir (org-attach-dir) :mkdir yes= +and any file results with a path descended from the attachment directory will +use =attachment:= style links instead of the standard =file:= link type. + ** New functions and changes in function arguments *** New function ~org-get-title~ to get =#+TITLE:= property from buffers @@ -795,40 +843,6 @@ If you prefer to keep the keybinding, you can add it back to (define-key org-mode-map (kbd "C-c SPC") #'org-table-blank-field) #+end_src -*** List references in source block variable assignments are now proper lists - -List representation of named lists is now converted to a simple list -as promised by the manual section [[info:org#Environment of a Code Block][org#Environment of a Code Block]]. -Previously, it was converted to a list of lists. - -Before: - -#+begin_src org -,#+NAME: example-list -- simple - - not - - nested -- list - -,#+BEGIN_SRC emacs-lisp :var x=example-list :results value -(format "%S" x) -,#+END_SRC - -,#+RESULTS: -: (("simple" (unordered ("not") ("nested"))) ("list")) -#+end_src - -After: - -#+begin_src org -,#+BEGIN_SRC emacs-lisp :var x=example-list :results value -(format "%S" x) -,#+END_SRC - -,#+RESULTS: -: ("simple" "list") -#+end_src - ** New features *** New citation engine @@ -877,13 +891,6 @@ When exiting capture mode via ~org-capture-refile~, the variable ~org-refile-targets~ will be temporarily bound to the value of this template option. -*** Add Capture template hook properties - -Capture templates can now attach template specific hooks via the -following properties: ~:hook~, ~:prepare-finalize~, -~:before-finalize~, ~:after-finalize~. These nullary functions run -prior to their global counterparts for the selected template. - *** New startup options =#+startup: showlevels= These startup options complement the existing =overview=, =content=, @@ -1213,13 +1220,6 @@ Finally, the closures are only evaluated if they're not overridden for a source block. This improves efficiency in cases where the result of a compute-expensive closure would otherwise be discarded. -*** New special value ~'attach~ for src block =:dir= option - -Passing the symbol ~attach~ or string ="'attach"= (with quotes) to the =:dir= -option of a src block is now equivalent to =:dir (org-attach-dir) :mkdir yes= -and any file results with a path descended from the attachment directory will -use =attachment:= style links instead of the standard =file:= link type. - ** Miscellaneous *** =org-bibtex= includes =doi= and =url= entries when exporting to BiBTeX =doi= and =url= entries have been made optional for some publication From 7ba099a3fda43b0d73107c454474a8d9300489c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Wed, 30 Nov 2022 13:23:38 +0100 Subject: [PATCH 2/2] Backport commit c3466099c from Emacs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/org-element.el (org-element--get-node-properties): Escape literal `+`. * lisp/org-persist.el (org-persist-load:index): Replace line-start with string-start when the latter is meant. Org regexp style fixes c3466099c5f44c52ec73a1bbbb2b42de6f29ac7f Mattias EngdegÄrd Wed Nov 30 13:23:38 2022 +0100 --- lisp/org-element.el | 2 +- lisp/org-persist.el | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index bc2fa0b98..a290b4121 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -1040,7 +1040,7 @@ parse properties for property drawer at point." (property-value (match-string-no-properties 3))) (cond ((and (plist-member properties property-name-symbol) - (string-match-p "+$" property-name)) + (string-match-p "\\+$" property-name)) (let ((val (plist-get properties property-name-symbol))) (if (listp val) (setq properties diff --git a/lisp/org-persist.el b/lisp/org-persist.el index 3435bef26..d60fdc657 100644 --- a/lisp/org-persist.el +++ b/lisp/org-persist.el @@ -593,7 +593,8 @@ COLLECTION is the plist holding data collection." (mapc (lambda (collection) (org-persist--add-to-index collection 'hash)) org-persist--index) (setq org-persist--index nil) (when (file-exists-p org-persist-directory) - (dolist (file (directory-files org-persist-directory 'absolute "^[^.][^.]")) + (dolist (file (directory-files org-persist-directory 'absolute + "\\`[^.][^.]")) (if (file-directory-p file) (delete-directory file t) (delete-file file))))