Can we add PLOT to org-element-multiple-keywords?
Hi all, I notice that multiple #+PLOT lines before a table will be coalesced and handled as one. However, this is accomplished through specific code in org-plot.el that does a reverse search through the buffer for additional lines. org-element has a built-in mechanism for this, org-element-multiple-keywords. It seems like it would be useful to add PLOT to it. Can that be done? If not, is there a way to temporarily add it for an exporter? Thanks, Jeff
Can we add PLOT to org-element-multiple-keywords?
Hi all, I notice that multiple #+PLOT lines before a table will be coalesced and handled as one. However, this is accomplished through specific code in org-plot.el that does a reverse search through the buffer for additional lines. org-element has a built-in mechanism for this, org-element-multiple-keywords. It seems like it would be useful to add PLOT to it. Can that be done? If not, is there a way to temporarily add it for an exporter (i.e. after the export is launched but before the buffer is parsed)? Thanks, Jeff
[BUG] org-export-table-row-number off by one when special row present [9.6.23 ( @ /home/jet/.config/emacs/elpa/org-9.6.23/)]
Consider this table: | Shape| Sides | |--+---| | Triangle | 3 | | Pentagon | 5 | |--+---| | Average | 4 | #+TBLFM: @4$2=vmean(@2..@3) org-export-table-row-number correctly returns 3 for the cell containing '4' (and the target of the formula) Now add a column alignment row: | Shape| Sides | | || |--+---| | Triangle | 3 | | Pentagon | 5 | |--+---| | Average | 4 | #+TBLFM: @5$2=vmean(@3..@4) org-export-table-row-number still returns 3 for the same cell, despite the extra row. I think this is inconsistent with the documentation of the function, which implies that only separator lines are considered when determining the count. Also note that from a user perspective, special rows (but not separators) are part of the row count. I did some initial investigation and determined that org-element-map is used to count the row numbers, and special rows are ignored in that function. I think this is the source of the issue. Emacs : GNU Emacs 29.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2024-03-26 Package: Org mode version 9.6.23 ( @ /home/jet/.config/emacs/elpa/org-9.6.23/) current state: == (setq org-link-elisp-confirm-function 'yes-or-no-p org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar" org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-persist-after-read-hook '(org-element--cache-persist-after-read) org-re-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js@3.6.0; org-export-before-parsing-hook '(org-attach-expand-links org-re-reveal-prepare-tts) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-latex-listings-options '(("basicstyle" "\\footnotesize\\ttfamily") ("showstringspaces" "false") ("breaklines" "true")) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] org-superstar-mode org-tempo-setup (lambda nil (electric-indent-local-mode -1)) #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load) org-babel-load-languages '((emacs-lisp . t) (dot . t) (ditaa . t) (shell . t)) org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-latex-format-headline-function 'org-latex-format-headline-default-function org-confirm-shell-link-function 'yes-or-no-p org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-latex-classes '(("beamer" "\\documentclass[11pt,aspectratio=169]{beamer}\n \\usenavigationsymbolstemplate{} % no navigation bar\n \\beamertemplateballitem % items have little balls" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-latex-packages-alist '(("" "moresize") ("" "fancyvrb") ("" "inconsolata") ("" "tikz") ("" "color") ("" "listings")) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-latex-src-block-backend t org-ditaa-eps-jar-path "/home/jet/.config/emacs/elpa/contrib/scripts/DitaaEps.jar" org-structure-template-alist '(("n" . "notes")
[BUG] code block side effects differences between "results: none" and "results: silent" [9.6.9 ( @ /home/jet/.config/emacs/elpa/org-9.6.9/)]
In the following code block, a propertized (inverse video) before-string overlay appears when "results: none" is used, but the property is absent (the overlay text appears normal) when "results:silent" is used: # with ":results none" it works as expected - inverse video Foo appears # with ":results silent" the string appears normally #+begin_src emacs-lisp :results none (let ((buf (generate-new-buffer "side-effect-demo"))) (with-current-buffer buf (let ((ov (make-overlay 0 (point (overlay-put ov 'before-string (propertize "Foo" 'face '(:inverse-video t)) #+end_src It's my understanding that "none" vs. "silent" behavior should not change side effects. Thanks, Jeff Emacs : GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2023-07-30 Package: Org mode version 9.6.9 ( @ /home/jet/.config/emacs/elpa/org-9.6.9/) current state: == (setq org-link-elisp-confirm-function 'yes-or-no-p org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar" org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-persist-after-read-hook '(org-element--cache-persist-after-read) org-re-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js@3.6.0; org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-latex-listings-options '(("basicstyle" "\\footnotesize\\ttfamily") ("showstringspaces" "false") ("breaklines" "true")) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] org-superstar-mode org-tempo-setup (lambda nil (electric-indent-local-mode -1)) #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load) org-babel-load-languages '((emacs-lisp . t) (dot . t) (ditaa . t) (shell . t)) org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-latex-format-headline-function 'org-latex-format-headline-default-function org-confirm-shell-link-function 'yes-or-no-p org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-latex-classes '(("beamer" "\\documentclass[11pt,aspectratio=169]{beamer}\n \\usenavigationsymbolstemplate{} % no navigation bar\n \\beamertemplateballitem % items have little balls" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-latex-packages-alist '(("" "moresize") ("" "fancyvrb") ("" "inconsolata") ("" "tikz") ("" "color") ("" "listings")) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-latex-src-block-backend t org-ditaa-eps-jar-path "/home/jet/.config/emacs/elpa/contrib/scripts/DitaaEps.jar" org-structure-template-alist '(("n" . "notes") ("a" . "export ascii") ("c" . "center") ("C" . "comment") ("e" . "example") ("E" . "export") ("h" . "export html") ("l" . "export latex") ("q" . "quote") ("s" . "src") ("v" . "verse")) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-html-format-inlinetask-function
Re: [BUG] emacs-lisp source blocks do not implement :prologue and :epilogue [9.6.9 ( @ /home/jet/.config/emacs/elpa/org-9.6.9/)]
Thanks for the quick fix! If my bash one-liner is right there are another 12: grep -L :prologue `fgrep -Rl --include=\*.el '(defun org-babel-expand-body:' ~/.config/emacs/elpa/org-9.6.9/` | xargs -n 1 basename ob-C.el ob-awk.el ob-lilypond.el ob-sqlite.el ob-java.el ob-org.el ob-calc.el ob-latex.el ob-dot.el ob-fortran.el ob-emacs-lisp.el ob-lisp.el ob-clojure.el On Thu, Oct 19, 2023 at 2:04 AM Ihor Radchenko wrote: > Jeff Trull writes: > > > The manual page "Environment of a Code Block" describes :prologue and > > :epilogue header arguments, which are useful for applications like unit > > tests and boilerplate code. No suggestion is made that these arguments > > are only available for some languages. > > If they are not available, it is a bug. > > > In fact, any language that provides its own org-babel-expand-body needs > > special code to handle these arguments - and emacs-lisp lacks it. > > Fixed, on main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=936290fe1 > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92> >
[BUG] emacs-lisp source blocks do not implement :prologue and :epilogue [9.6.9 ( @ /home/jet/.config/emacs/elpa/org-9.6.9/)]
The manual page "Environment of a Code Block" describes :prologue and :epilogue header arguments, which are useful for applications like unit tests and boilerplate code. No suggestion is made that these arguments are only available for some languages. In fact, any language that provides its own org-babel-expand-body needs special code to handle these arguments - and emacs-lisp lacks it. It seems to me that either: 1) these arguments should be added to each backend that lacks them (emacs-lisp in particular), or 2) The documentation should indicate that they may not be supported in every language. At the moment I have the following workaround: (advice-add #'org-babel-expand-body:emacs-lisp :around (lambda (oldfn body params) (let ((pro (cdr (assq :prologue params))) (epi (cdr (assq :epilogue params (concat (if pro (concat pro "\n") "") (funcall oldfn body params) (if epi (concat epi "\n") "" '((name . pe-advice))) Emacs : GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2023-07-30 Package: Org mode version 9.6.9 ( @ /home/jet/.config/emacs/elpa/org-9.6.9/) current state: == (setq org-link-elisp-confirm-function 'yes-or-no-p org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar" org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-persist-after-read-hook '(org-element--cache-persist-after-read) org-re-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js@3.6.0; org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-latex-listings-options '(("basicstyle" "\\footnotesize\\ttfamily") ("showstringspaces" "false") ("breaklines" "true")) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] org-superstar-mode org-tempo-setup (lambda nil (electric-indent-local-mode -1)) #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load) org-babel-load-languages '((emacs-lisp . t) (dot . t) (ditaa . t) (shell . t)) org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-latex-format-headline-function 'org-latex-format-headline-default-function org-confirm-shell-link-function 'yes-or-no-p org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-latex-classes '(("beamer" "\\documentclass[11pt,aspectratio=169]{beamer}\n \\usenavigationsymbolstemplate{} % no navigation bar\n \\beamertemplateballitem % items have little balls" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-latex-packages-alist '(("" "moresize") ("" "fancyvrb") ("" "inconsolata") ("" "tikz") ("" "color") ("" "listings")) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-latex-src-block-backend t org-ditaa-eps-jar-path "/home/jet/.config/emacs/elpa/contrib/scripts/DitaaEps.jar" org-structure-template-alist '(("n"
Formulas on table cells containing '$'
While investigating an error executing a table formula I discovered that cells containing '$' cause column references to be executed even when no attempt is made to evaluate cell contents as code. Here's a simple example: #+TITLE: demonstrate strange error in currency column | 3/1/2023 | Deposit| $200.00 | | 3/13/2023 | Interest | $1.13 | | 4/1/2023 | Deposit| $301.22 | |---++-| | | Number of Transactions | | #+TBLFM: @4$3='(length '(@1$3..@I$3)) Evaluating the table formula produces a 'Invalid field specifier "$200"' message. In more complicated examples you just see a #ERROR in the cell. With formula debugging turned on, I can evaluate the expanded expression with no errors. This is surprising for a number of reasons: 1. The formula makes no use of the cell contents 2. The formula debugger notes an error but actually shows a valid expression 3. Columns with currencies will be fairly common esp in imports from financial institutions 4. This error happens before the formula is evaluated so there is no chance to remove the problem character in the formula as I do with the commas ',' which are also present Is this by design? If so, I was unable to find any documentation explaining it. Thanks, Jeff
[BUG] text cell contents have extra parentheses when used in formulas [9.6.4 ( @ /home/jet/.config/emacs/elpa/org-9.6.4/)]
Expectation: when using cell contents as strings in a formula, the strings should contain exactly the cell's text contents Actual: the resulting string is wrapped in parentheses I can find nothing in the documentation that suggests this is expected, and it is quite unintuitive if you want to (for example) filter on a column. #+TITLE: text formula repro | Key | Value| |-+--| | A | [40, 65, 41] | | B | [40, 66, 41] | #+TBLFM: $2="$1" Here you can see that the contents of the Key column were wrapped in parentheses (ASCII 40 and 41) when turned into strings. Emacs : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-10-14 Package: Org mode version 9.6.4 ( @ /home/jet/.config/emacs/elpa/org-9.6.4/) current state: == (setq org-link-elisp-confirm-function 'yes-or-no-p org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar" org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-persist-after-read-hook '(org-element--cache-persist-after-read) org-re-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js@3.6.0; org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-latex-listings-options '(("basicstyle" "\\footnotesize\\ttfamily") ("showstringspaces" "false") ("breaklines" "true")) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] org-superstar-mode org-tempo-setup (lambda nil (electric-indent-local-mode -1)) #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load) org-babel-load-languages '((emacs-lisp . t) (dot . t) (ditaa . t) (shell . t)) org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-latex-format-headline-function 'org-latex-format-headline-default-function org-confirm-shell-link-function 'yes-or-no-p org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-latex-classes '(("beamer" "\\documentclass[11pt,aspectratio=169]{beamer}\n \\usenavigationsymbolstemplate{} % no navigation bar\n \\beamertemplateballitem % items have little balls" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-latex-packages-alist '(("" "moresize") ("" "fancyvrb") ("" "inconsolata") ("" "tikz") ("" "color") ("" "listings")) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-latex-src-block-backend t org-ditaa-eps-jar-path "/home/jet/.config/emacs/elpa/contrib/scripts/DitaaEps.jar" org-structure-template-alist '(("n" . "notes") ("a" . "export ascii") ("c" . "center") ("C" . "comment") ("e" . "example") ("E" . "export") ("h" . "export html") ("l" . "export latex") ("q" . "quote") ("s" . "src") ("v" . "verse")) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
Re: Bug: clocktable :inherit-props does not respect global property setting [9.4.6 (9.4.6-12-gdcc3a8-elpa @ /home/jet/.config/emacs/elpa/org-20210823/)]
OK, got it now, thanks! I confirmed everything you said. My takeaway is that instead of using global properties as a single property at the top level, I should create a top-level properties drawer, which will have immediate usability. In the case of my example that would be: C-u C-c C-x d HOURLY_RATE 150 and then HOURLY_RATE is immediately usable in my table, without even having to save the file. On Mon, Oct 17, 2022 at 11:03 PM Ihor Radchenko wrote: > Jeff Trull writes: > > > Yes, I can make it work now - but only after reloading it at least one > time > > from disk. > > > > When I type it in for the first time, it doesn't work. I have to save, > then > > (revert-buffer). > > ... > > Also, if you change the value (say, from 150 to 210) the old value > persists > > until you > > reload the file. Even saving the file doesn't help. > > It is expected and documented. > See 17.8 Summary of In-Buffer Settings section of the manual. > Basically, you need to press C-c C-c on the property line to make Org > refresh the settings. > > Alternatively, you can use document property drawer. It is updated > automatically on the latest development version of Org. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92> >
Re: Bug: clocktable :inherit-props does not respect global property setting [9.4.6 (9.4.6-12-gdcc3a8-elpa @ /home/jet/.config/emacs/elpa/org-20210823/)]
Yes, I can make it work now - but only after reloading it at least one time from disk. When I type it in for the first time, it doesn't work. I have to save, then (revert-buffer). In other words, in a fresh buffer, paste all the above, then hit C-c C-c on the BEGIN line. The global properties don't work. You can save the file, and it still doesn't work. Only after reading it from disk (either with revert-buffer or loading it for the first time) does it work. Also, if you change the value (say, from 150 to 210) the old value persists until you reload the file. Even saving the file doesn't help. On Mon, Oct 17, 2022 at 9:48 PM Ihor Radchenko wrote: > Jeff Trull writes: > > > I just confirmed that it is still doing this (Emacs 28.2, org 9.5.5). The > > result looks the same as before: > > > > #+BEGIN: clocktable :scope file :maxlevel 2 :properties ("HOURLY_RATE") > > :inherit-props t > > #+CAPTION: Clock summary at [2022-10-17 Mon 16:50] > > ... > > Note that the first column next to "Sub 1A" is empty. > > Do note that :inherit-props t must be on the same line with #+BEGIN > > > Can you send the result of evaluating the clocktable in your config? > > #+BEGIN: clocktable :scope file :maxlevel 2 :properties ("HOURLY_RATE") > :inherit-props t > #+CAPTION: Clock summary at [2022-10-18 Tue 12:47] > | HOURLY_RATE | Headline | Time | | > |-++--+--| > | | *Total time* | *2h 30min* | | > |-++--+--| > | 150 | Top 1 | 1h 0min | | > | 150 | \_ Sub 1A | | 1h 0min | > | 110 | Top 2 | 1h 30min | | > | 110 | \_ Sub 2A | | 1h 0min | > | 90 | \_ Sub 2B | | 0h 30min | > #+END: > > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92> >
Re: Bug: clocktable :inherit-props does not respect global property setting [9.4.6 (9.4.6-12-gdcc3a8-elpa @ /home/jet/.config/emacs/elpa/org-20210823/)]
I just confirmed that it is still doing this (Emacs 28.2, org 9.5.5). The result looks the same as before: #+BEGIN: clocktable :scope file :maxlevel 2 :properties ("HOURLY_RATE") :inherit-props t #+CAPTION: Clock summary at [2022-10-17 Mon 16:50] | HOURLY_RATE | Headline | Time | | |-+--++--| | | *Total time* | *2:30* | | |-+--++--| | | Top 1| 1:00 | | | | \_ Sub 1A || 1:00 | | 110 | Top 2| 1:30 | | | 110 | \_ Sub 2A || 1:00 | | 90 | \_ Sub 2B || 0:30 | #+END: Note that the first column next to "Sub 1A" is empty. Can you send the result of evaluating the clocktable in your config? Thanks, Jeff On Sun, Oct 16, 2022 at 4:00 AM Ihor Radchenko wrote: > Jeff Trull writes: > > > :inherit-props seems to not consider global properties. > > > > Testcase: > > I am unable to reproduce on the latest main. > The inherited properties are displayed as expected on my side. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92> >
Re: [BUG] clocktable :inherit-props does not respect global property setting [9.4.6 (9.4.6-12-gdcc3a8-elpa @ /home/jet/.config/emacs/elpa/org-20210823/)]
Confirmed, after updating org it now works! Thanks for your help. On Tue, Nov 30, 2021 at 1:07 AM Colin Baxter wrote: > Hello Jeff > > You clock table works for me, including your missing rate of 150. I > attach a screen shot. > > By the way, you have a ":inherit-props t" which is not on the #+BEGIN: > clocktable line. I assume that has been corrupted in the email > formatting. > > Best wishes > >
[BUG] clocktable :inherit-props does not respect global property setting [9.4.6 (9.4.6-12-gdcc3a8-elpa @ /home/jet/.config/emacs/elpa/org-20210823/)]
:inherit-props seems to not consider global properties. Testcase: # Create a global property #+PROPERTY: HOURLY_RATE 150 * Top 1 ** Sub 1A # here we should get the global property, but do not :LOGBOOK: CLOCK: [2021-09-26 Sun 12:25]--[2021-09-26 Sun 13:25] => 1:00 - I did some tasks :END: ** Sub 1B * Top 2 :PROPERTIES: :HOURLY_RATE: 110 :END: ** Sub 2A # successfully inherit from "Top 2" :LOGBOOK: CLOCK: [2021-09-26 Sun 21:26]--[2021-09-26 Sun 22:26] => 1:00 - I did some other tasks :END: ** Sub 2B :PROPERTIES: :HOURLY_RATE: 90 :END: # override Top 2 :LOGBOOK: CLOCK: [2021-09-26 Sun 18:30]--[2021-09-26 Sun 19:00] => 0:30 - Attended a meeting :END: #+BEGIN: clocktable :scope file :maxlevel 2 :properties ("HOURLY_RATE") :inherit-props t #+CAPTION: Clock summary at [2021-09-26 Sun 22:48] | HOURLY_RATE | Headline | Time | | |-+--++--| | | *Total time* | *2:30* | | |-+--++--| | | Top 1| 1:00 | | | | \_ Sub 1A || 1:00 | | 110 | Top 2| 1:30 | | | 110 | \_ Sub 2A || 1:00 | | 90 | \_ Sub 2B || 0:30 | #+END: I expect that "Sub 1A" will show the global HOURLY_RATE of 150, but it is empty. Emacs : GNU Emacs 27.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32, cairo version 1.16.0) of 2020-09-01 Package: Org mode version 9.4.6 (9.4.6-12-gdcc3a8-elpa @ /home/jet/.config/emacs/elpa/org-20210823/) current state: == (setq org-duration-format 'h:mm org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-latex-listings t org-link-shell-confirm-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-export-global-macros '((LASTMONTH . "(eval (format-time-string \"%B %Y\" (encode-time (decoded-time-add (decode-time) (make-decoded-time :month -1)") (NET30 . "(eval (format-time-string \"%m/%d/%Y\" (encode-time (decoded-time-add (decode-time) (make-decoded-time :day 30)") (LASTOFLASTMONTH . "(eval (format-time-string \"%m/%d/%Y\" (encode-time (let ((d (decode-time))) (setf (decoded-time-day d) 1) (decoded-time-add d (make-decoded-time :day -1))") (FIRSTOFLASTMONTH . "(eval (format-time-string \"%m/%d/%Y\" (encode-time (let ((d (decoded-time-add (decode-time) (make-decoded-time :month -1 (setf (decoded-time-day d) 1) d") ) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-log-note-clock-out t org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] org-bullets-mode org-tempo-setup (lambda nil (electric-indent-local-mode -1)) #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-babel-load-languages '((emacs-lisp . t) (dot . t) (ditaa . t)) org-export-backends '(ascii html icalendar latex md confluence re-reveal) org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar" org-structure-template-alist '(("n" . "notes") ("a" . "export ascii") ("c" . "center") ("C" . "comment") ("e" . "example") ("E" . "export") ("h" . "export html") ("l" . "export latex") ("q" . "quote") ("s" . "src") ("v" . "verse")) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
Bug: clocktable :inherit-props does not respect global property setting [9.4.6 (9.4.6-12-gdcc3a8-elpa @ /home/jet/.config/emacs/elpa/org-20210823/)]
:inherit-props seems to not consider global properties. Testcase: # Create a global property #+PROPERTY: HOURLY_RATE 150 * Top 1 ** Sub 1A # here we should get the global property, but do not :LOGBOOK: CLOCK: [2021-09-26 Sun 12:25]--[2021-09-26 Sun 13:25] => 1:00 - I did some tasks :END: ** Sub 1B * Top 2 :PROPERTIES: :HOURLY_RATE: 110 :END: ** Sub 2A # successfully inherit from "Top 2" :LOGBOOK: CLOCK: [2021-09-26 Sun 21:26]--[2021-09-26 Sun 22:26] => 1:00 - I did some other tasks :END: ** Sub 2B :PROPERTIES: :HOURLY_RATE: 90 :END: # override Top 2 :LOGBOOK: CLOCK: [2021-09-26 Sun 18:30]--[2021-09-26 Sun 19:00] => 0:30 - Attended a meeting :END: #+BEGIN: clocktable :scope file :maxlevel 2 :properties ("HOURLY_RATE") :inherit-props t #+CAPTION: Clock summary at [2021-09-26 Sun 22:48] | HOURLY_RATE | Headline | Time | | |-+--++--| | | *Total time* | *2:30* | | |-+--++--| | | Top 1| 1:00 | | | | \_ Sub 1A || 1:00 | | 110 | Top 2| 1:30 | | | 110 | \_ Sub 2A || 1:00 | | 90 | \_ Sub 2B || 0:30 | #+END: I expect that "Sub 1A" will show the global HOURLY_RATE of 150, but it is empty. Emacs : GNU Emacs 27.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32, cairo version 1.16.0) of 2020-09-01 Package: Org mode version 9.4.6 (9.4.6-12-gdcc3a8-elpa @ /home/jet/.config/emacs/elpa/org-20210823/) current state: == (setq org-duration-format 'h:mm org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-latex-listings t org-link-shell-confirm-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-export-global-macros '((LASTMONTH . "(eval (format-time-string \"%B %Y\" (encode-time (decoded-time-add (decode-time) (make-decoded-time :month -1)") (NET30 . "(eval (format-time-string \"%m/%d/%Y\" (encode-time (decoded-time-add (decode-time) (make-decoded-time :day 30)") (LASTOFLASTMONTH . "(eval (format-time-string \"%m/%d/%Y\" (encode-time (let ((d (decode-time))) (setf (decoded-time-day d) 1) (decoded-time-add d (make-decoded-time :day -1))") (FIRSTOFLASTMONTH . "(eval (format-time-string \"%m/%d/%Y\" (encode-time (let ((d (decoded-time-add (decode-time) (make-decoded-time :month -1 (setf (decoded-time-day d) 1) d") ) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-log-note-clock-out t org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] org-bullets-mode org-tempo-setup (lambda nil (electric-indent-local-mode -1)) #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-babel-load-languages '((emacs-lisp . t) (dot . t) (ditaa . t)) org-export-backends '(ascii html icalendar latex md confluence re-reveal) org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar" org-structure-template-alist '(("n" . "notes") ("a" . "export ascii") ("c" . "center") ("C" . "comment") ("e" . "example") ("E" . "export") ("h" . "export html") ("l" . "export latex") ("q" . "quote") ("s" . "src") ("v" . "verse")) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
Bug: inconsistent handling of empty duration cells in table [9.4.6 (9.4.6-12-gdcc3a8-elpa @ /home/jet/.config/emacs/elpa/org-20210816/)]
When calc formulas producing empty strings are evaluated in the default mode, an empty cell is produced. When evaluated in duration mode (U, T, or t) a zero duration is produced. I feel the behavior should be consistent with the number formats, producing a empty value instead of a zero. Test case: | case | result | |--+--| | default mode | | | default + E | | | U + E|00:00 | | T + E| 00:00:00 | | t + E| 0.00 | #+TBLFM: @2$2=string("")::@3$2=string("");E::@4$2=string("");EU::@5 $2=string("");ET::@6$2=string("");Et Analysis: the problem (if it is a problem) is here: https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-table.el#L2616 The value produced for durations always comes from a call to string-to-number, which returns 0 for empty strings. org-table-time-seconds-to-string turns that into a zero duration string in the requested format. An explicit test for an empty value here fixes the issue. Emacs : GNU Emacs 27.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32, cairo version 1.16.0) of 2020-09-01 Package: Org mode version 9.4.6 (9.4.6-12-gdcc3a8-elpa @ /home/jet/.config/emacs/elpa/org-20210816/) current state: == (setq org-duration-format 'h:mm org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-latex-listings t org-link-shell-confirm-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-export-creator-string "Emacs 27.1.50 (Org mode 9.4.5)" org-mode-hook '((closure (org--rds reftex-docstruct-symbol org-with-time org-defdecode org-def org-read-date-inactive org-ans2 org-ans1 org-columns-current-fmt-compiled org-end-time-was-given org-time-was-given org-blocked-by-checkboxes org-state org-agenda-headline-snapshot-before-repeat org-struct-menu org-last-state org-id-track-globally texmathp-why remember-data-file iswitchb-temp-buflist align-mode-rules-list org-id-overriding-file-name org-indent-indentation-per-level ffap-url-regexp org-inlinetask-min-level t) nil (add-hook 'change-major-mode-hook 'org-show-all 'append 'local)) (closure (*this* org-babel-confirm-evaluate-answer-no t) nil (add-hook 'change-major-mode-hook 'org-babel-show-result-all 'append 'local)) (closure (org-table-tab-recognizes-table\.el t) nil (setq imenu-create-index-function 'org-imenu-get-tree)) #[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] org-bullets-mode org-tempo-setup (lambda nil (electric-indent-local-mode -1)) #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-babel-load-languages '((emacs-lisp . t) (dot . t) (ditaa . t)) org-export-backends '(ascii html icalendar latex md confluence re-reveal) org-html-creator-string "https://www.gnu.org/software/emacs/\;>Emacs 27.1.50 (https://orgmode.org\;>Org mode 9.4.5)" org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar" org-structure-template-alist '(("n" . "notes") ("a" . "export ascii") ("c" . "center") ("C" . "comment") ("e" . "example") ("E" . "export") ("h" . "export html") ("l" . "export latex") ("q" . "quote") ("s" . "src") ("v" . "verse")) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-export-before-parsing-hook
Re: [O] erroneous clocktable for November 2018 - possible DST problem
OK, I can confirm that the 20181112 release has this problem but the development version from github does not. Thanks, Jeff On Sat, Nov 17, 2018 at 12:50 PM Nicolas Goaziou wrote: > Hello, > > Jeff Trull writes: > > > Clocktables containing work in November of 2018 are reported incorrectly, > > showing the wrong day (typically one earlier than the correct date). For > > example, in the attached repro.org, work is performed on the 3rd and > 5th of > > November, but when daily reports are used in the clocktable the work on 5 > > November is reported as occurring on 4 November. Reporting 1-4 November > and > > 5-30 November separately works around the problem. > > > > In the US, Daylight Savings ended on 4 November; this fact plus a > previous > > problem (reported here: > > > https://stackoverflow.com/questions/42821604/why-is-emacs-org-mode-missing-one-date-from-clocktable > ) > > suggests DST is involved. > > I think something like this was fixed in development branch. Please test > it if you can. > > Regards, > > -- > Nicolas Goaziou >
[O] erroneous clocktable for November 2018 - possible DST problem
Clocktables containing work in November of 2018 are reported incorrectly, showing the wrong day (typically one earlier than the correct date). For example, in the attached repro.org, work is performed on the 3rd and 5th of November, but when daily reports are used in the clocktable the work on 5 November is reported as occurring on 4 November. Reporting 1-4 November and 5-30 November separately works around the problem. In the US, Daylight Savings ended on 4 November; this fact plus a previous problem (reported here: https://stackoverflow.com/questions/42821604/why-is-emacs-org-mode-missing-one-date-from-clocktable) suggests DST is involved. Thanks and Regards, Jeff Trull Emacs : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.23.2) of 2018-08-27, modified by Debian Package: Org mode version 9.1.14 (9.1.14-9-g131531-elpa @ /home/jet/.emacs.d/elpa/org-20181112/) current state: == (setq org-export-backends '(confluence md latex icalendar html ascii) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-html-format-drawer-function '(closure (htmlize-buffer-places org-html-format-table-no-css htmlize-css-name-prefix htmlize-output-type htmlize-output-type htmlize-css-name-prefix t) (_name contents) contents) org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-duration-format 'h:mm org-confirm-shell-link-function 'yes-or-no-p org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-latex-format-headline-function 'org-latex-format-headline-default-function org-latex-listings-options '(("keywordstyle" "\\color{keywordcolor}") ("basicstyle" "\\footnotesize\\ttfamily") ("backgroundcolor" "\\color{backcolor}") ("showstringspaces" "false") ("moredelim" "**[is][\\only<+>{\\color{black}\\lstset{style=highlight}}]{@}{@}") ("breaklines" "true")) org-after-todo-state-change-hook '(org-clock-out-if-current) org-latex-format-drawer-function '(closure (t) (_ contents) contents) org-odt-format-headline-function 'org-odt-format-headline-default-function org-from-is-user-regexp "\\" org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-block-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] (closure (org-inlinetask-min-level buffer-face-mode-face org-struct-menu org-last-state org-id-track-globally texmathp-why remember-data-file org-agenda-tags-todo-honor-ignore-options iswitchb-temp-buflist calc-embedded-open-mode calc-embedded-open-formula calc-embedded-close-formula align-mode-rules-list ffap-url-regexp t) nil (add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local)) ) (closure (*this* org-babel-confirm-evaluate-answer-no t) nil (add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all) (quote append) (quote local)) ) (closure (org-inlinetask-min-level buffer-face-mode-face org-mode-map org-tbl-menu org-org-menu org-struct-menu org-entities org-last-state org-id-track-globally org-clock-start-time texmathp-why remember-data-file org-agenda-tags-todo-honor-ignore-options iswitchb-temp-buflist calc-embedded-open-mode calc-embedded-open-formula calc-embedded-close-formula align-mode-rules-list org-emphasis-alist org-emphasis-regexp-components org-export-registered-backends org-modules org-babel-load-languages org-element-paragraph-separate ffap-url-regexp t) nil (add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local)) ) (closure
Re: [O] ATTR_LATEX :options ignored for source code
Ah, I see... I was expecting the "option to the environment" to look like: \begin{lstlisting}[commentstyle=\bfseries] Though doing it with \lstset will produce the same result if the option is placed at the end, which it is. Thanks for your help, Jeff On Sun, May 15, 2016 at 12:33 AM, Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote: > Hello, > > Jeff Trull <edas...@att.net> writes: > > > According to the manual users can supply #+ATTR_LATEX: :options ... prior > > to a source section and the options present will be supplied to the > > environment (lstlistings in my case). I find that this does not work - > > regardless of settings, no options are supplied to the lstlistings > > environment. Attached is a test case that demonstrates the problem. It > is > > taken from the manual. > > FWIW, I cannot reproduce it. I get > > \lstset{language=C++,label= ,caption= > ,captionpos=b,numbers=none,commentstyle=\bfseries} > \begin{lstlisting} > using foo_t = int; > struct bar_t { > foo_t a; // this comment should be bold > }; > \end{lstlisting} > > What Org version are you using? > > Regards, > > -- > Nicolas Goaziou >
[O] ATTR_LATEX :options ignored for source code
According to the manual users can supply #+ATTR_LATEX: :options ... prior to a source section and the options present will be supplied to the environment (lstlistings in my case). I find that this does not work - regardless of settings, no options are supplied to the lstlistings environment. Attached is a test case that demonstrates the problem. It is taken from the manual. Thanks, Jeff testcase.org Description: Binary data