* [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] @ 2024-09-01 4:35 Benjamin McMillan 2024-09-10 17:01 ` Ihor Radchenko 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-09-01 4:35 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 15518 bytes --] At some point in the last few months, org mode stopped fontifying my latex export blocks. However, an older version of emacs on my computer still does fontify. (The difference is seen even opening emacs with the -q flag) It seems that there was a change to the function org-fontify-meta-lines-and-blocks-1 in org.el, specifically at the conditional that checks org-src-fontify-natively. As the comment there explains, the intention is to only fontify src blocks, but I don't see any option exposed to enable fontififcation of export blocks, which is a fairly crucial feature to my workflow. I think fontification of export blocks should follow that of src blocks, or a separate option should be made. (Or, I may be missing some already existing solution!) For what it is worth, I can get the desired behavior by modifying the code mentioned above to include "export", as in the following: (and org-src-fontify-natively ;; Technically, according to ;; `org-src-fontify-natively' docstring, we should ;; only fontify src blocks. However, it is common ;; to use undocumented fontification of example ;; blocks with undocumented language specifier. ;; Keep this undocumented feature for user ;; convenience. (member block-type '("src" "example" "export"))) Thanks, Ben Emacs : GNU Emacs 31.0.50 (build 3, aarch64-apple-darwin23.5.0, NS appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-08-29 Package: Org mode version 9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/) current state: ============== (setq org-noter-get-selected-text-hook '(org-noter-djvu--get-selected-text org-noter-nov--get-selected-text org-noter-pdf--get-selected-text) org-yank-image-file-name-function 'org-yank-image-autogen-filename org-persist-before-write-hook '(org-element--cache-persist-before-write) org-noter-doc-split-fraction '(0.6 . 0.5) org-html-format-headline-function 'org-html-format-headline-default-function org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-noter--get-current-view-hook '(org-noter-djvu--get-current-view org-noter-nov--get-current-view org-noter-pdf--get-current-view) org-log-into-drawer "LOG" org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-M-RET-may-split-line nil org-noter--pretty-print-location-for-title-hook '(org-noter-djvu--pretty-print-location org-noter-nov--pretty-print-location org-noter-pdf--pretty-print-location-for-title) org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el") ("elisp" . "el")) org-treat-insert-todo-heading-as-state-change t org-noter--get-highlight-location-hook '(org-noter-pdf--get-highlight) org-roam-db-node-include-function #[0 "\300\207" [t] 1] org-timer-done-hook '(my/org-timer-done-actions) org-roam-log-setup-hook '(org-roam--register-completion-functions-h) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-export-in-background t org-persist-after-read-hook '(org-element--cache-persist-after-read) org-confirm-elisp-link-function 'yes-or-no-p org-roam-preview-function 'org-roam-preview-default-function org-latex-format-headline-function 'org-latex-format-headline-default-function org-agenda-window-setup 'current-window org-noter--convert-to-location-cons-hook '(org-noter-pdf--convert-to-location-cons) org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-blank-before-new-entry '((heading) (plain-list-item)) org-export-async-init-file "~/.emacs.d/org/export-dispatch-init.el" org-mode-hook '(my/org-mode-completion-setup #[nil ((org-bullets-mode 1)) (t)] er/add-org-mode-expansions #[nil ((add-hook 'change-major-mode-hook 'org-fold-show-all 'append 'local)) (org--rds reftex-docstruct-symbol org-attach-method org--single-lines-list-is-paragraph org-element-greater-elements org-agenda-restrict-end org-agenda-restrict-begin org-agenda-restrict visual-fill-column-width org-clock-history org-agenda-current-date org-with-time org-defdecode org-def org-read-date-inactive org-ans2 org-ans1 org-columns-current-fmt-compiled org-clock-current-task org-clock-effort org-agenda-skip-function org-agenda-skip-comment-trees org-agenda-archives-mode org-end-time-was-given org-time-was-given org-log-note-extra org-log-note-purpose org-log-post-message org-last-inserted-timestamp org-last-changed-timestamp org-entry-property-inherited-from org-state org-agenda-headline-snapshot-before-repeat org-agenda-buffer-name org-agenda-start-on-weekday org-agenda-buffer-tmp-name org-log-note-marker org-priority-regexp org-mode-abbrev-table org-element-cache-persistent org-element-cache-version 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 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-id-overriding-file-name org-indent-indentation-per-level org-element--timestamp-regexp org-element-cache-map-continue-from org-element-paragraph-separate org-agenda-buffer-name org-inlinetask-min-level t) ] #[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 #[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2]) org-noter--doc-approx-location-hook '(org-noter-djvu--approx-location-cons org-noter-nov--approx-location-cons org-noter-pdf--approx-location-cons) org-noter--pretty-print-highlight-location-hook '(org-noter-pdf--pretty-print-highlight) org-noter-auto-save-last-location t org-noter-set-up-document-hook '(org-noter-djvu--setup-handler org-noter-nov--setup-handler org-noter-pdf--doc-view-setup-handler org-noter-pdf--pdf-view-setup-handler) org-capture-templates '(("i" "File to inbox" entry (file+olp "~/Projects/getitdone/getitdone.org" "PARA" "PROJECTS" "PROCESS") "* %?") ("e" "File to emacs issues" entry (file+olp "~/.emacs.d/emacs-gtd.org" "Emacs PARA" "PROJECTS" "PROCESS") "* %?") ("m" "Math note" entry (file+olp "~/Projects/getitdone/math-gtd.org" "MATH PARA" "PROJECTS" "PROCESS") "* %?") ("f" "File to filing cabinet" entry (file+olp "~/Projects/getitdone/getitdone.org" "PARA" "PROJECTS" "FILE") "* %?") ("l" "Local inbox" entry (file+headline (lambda nil (concat (file-name-directory (buffer-file-name)) ".TODO.org")) "Inbox") "") ("r" "Research note" entry (file+headline (lambda nil (concat (buffer-file-name))) "RESEARCH NOTES") "* %?\n:LOG:\nENTRY-DATE: %t\n:END:\n- " :prepend t :jump-to-captured t) ("t" "File to tumble ideas" entry (file+olp "~/Projects/getitdone/getitdone.org" "PARA" "AREAS" "tumbles") "* %?") ) org-id-link-consider-parent-id t org-confirm-shell-link-function 'yes-or-no-p org-export-dispatch-use-expert-ui t org-odt-format-headline-function 'org-odt-format-headline-default-function org-archive-hook '(org-attach-archive-delete-maybe) org-src-window-setup "plain" org-noter--show-arrow-hook '(org-noter-pdf--show-arrow) org-metaup-hook '(org-babel-load-in-session-maybe) org-occur-hook '(org-first-headline-recenter) org-ellipsis " \\/ " org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-roam-node-annotation-function 'org-roam-node-read--annotation org-bullets-bullet-list '("○") org-confirm-babel-evaluate 'my/org-confirm-babel-evaluate org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-roam-directory "/Users/ben/own/org-roam" org-indent-indentation-per-level 1 org-roam-db-autosync-mode t org-roam-indirect-buffer-hook '(org-roam--register-completion-functions-h) org-bibtex-headline-format-function 'org-bibtex-headline-format-default org-capture-prepare-finalize-hook '(org-roam-capture--install-finalize-h) org-link-parameters '(("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description org-info-description-as-command) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("roam" :follow org-roam-link-follow-link) ("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-roam-id-open :store org-id-store-link-maybe) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("mailto" :follow #[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("https" :follow #[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("http" :follow #[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("ftp" :follow #[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-log-buffer-setup-hook '(org-roam-log--setup) org-noter-create-skeleton-functions '(org-noter-djvu--create-skeleton org-noter-nov--create-skeleton-epub org-noter-pdf--create-skeleton) org-noter-get-buffer-file-name-hook '(org-noter-nov--get-buffer-file-name org-noter-pdf--get-buffer-file-name) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-todo-keywords '((sequence "TODO(t!)" "|" "SUSP(s@)" "DONE(d!)")) org-return-follows-link t org-noter--get-containing-element-hook '(org-noter--get-containing-heading org-noter--get-containing-property-drawer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metadown-hook '(org-babel-pop-to-session-maybe) org-agenda-restore-windows-after-quit t org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-sort-function 'string-collate-lessp org--warnings nil org-startup-folded t org-babel-pre-tangle-hook '(save-buffer) org-roam-capture-new-node-hook '(org-roam-capture--insert-captured-ref-h) org-highlight-latex-and-related '(latex script entities) org-noter--get-precise-info-hook '(org-noter-djvu--get-precise-info org-noter-nov--get-precise-info org-noter-pdf--doc-view-get-precise-info org-noter-pdf--pdf-view-get-precise-info) org-tags-column -90 org-export-before-parsing-hook '(org-attach-expand-links) org-link-shell-confirm-function 'yes-or-no-p org-cycle-emulate-tab nil org-fold-core-isearch-open-function 'org-fold--isearch-reveal org-yank-adjusted-subtrees t org-roam-capture-preface-hook '(org-roam-capture--try-capture-to-ref-h) outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-noter--doc-goto-location-hook '(org-noter-djvu--goto-location org-noter-nov--goto-location org-noter-pdf--goto-location) org-src-mode-hook '(perject--auto-add-buffer org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-roam-find-file-hook '(org-roam-buffer--setup-redisplay-h org-roam--register-completion-functions-h org-roam--replace-roam-links-on-save-h org-roam-db-autosync--setup-update-on-save-h) org-babel-load-languages '((emacs-lisp . t) (python . t) (gnuplot \.t)) org-roam-ref-annotation-function 'org-roam-ref-read--annotation org-agenda-loop-over-headlines-in-active-region nil org-agenda-files '("~/Areas/reading/.TODO.org" "~/Areas/reading/ read_log.org" "~/Areas/talks/Stacks/.TODO.org" "~/.emacs.d/.TODO.org" "~/.emacs.d/emacs-gtd.org" "~/.emacs.d/emacs-gtd.org_archive" "~/Projects/235embeddingsPaper/sagecalcs/.TODO.org" "~/Projects/235embeddingsPaper/.TODO.org" "~/Projects/235embeddingsPaper/.TODO.org_archive" "~/Projects/235embeddingsPaper/embeddings.org" "~/Projects/235embeddingsPaper/paper.org" "~/Projects/HessianMetrics/sagecalcs/.TODO.org" "~/Projects/HessianMetrics/.TODO.org" "~/Projects/HessianMetrics/hessianmetrics.org" "~/Projects/distributionmaps/.TODO.org" "~/Projects/distributionmaps/distributionmaps.org" "~/Projects/foliations/Ben/.TODO.org" "~/Projects/foliations/Ben/singularfolia.org" "~/Projects/getitdone/.TODO.org" "~/Projects/getitdone/KoreanTaxes.org" "~/Projects/getitdone/ filingcabinet.org" "~/Projects/getitdone/getitdone.org" "~/Projects/getitdone/getitdone.org_archive" "~/Projects/getitdone/math-gtd.org" "~/Projects/glenelg/.TODO.org" "~/Projects/glenelg/glenelg.org" "~/Projects/lecturenotes/.TODO.org" "~/Projects/lecturenotes/notes.org" "~/Projects/miscmath/unfullblown.org" "~/Projects/pdemoduli/.TODO.org" "~/Projects/pdemoduli/pdemoduli.org" "~/Projects/singularities/.TODO.org") org-babel-python-command "python3" org-noter-create-session-from-document-hook '(org-noter--create-session-from-document-file-default) org-link-elisp-confirm-function 'yes-or-no-p org-noter--add-highlight-hook '(org-noter-pdf--highlight-location) org-startup-indented t org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function org-src-lang-modes '(("latex" . LaTeX) ("C" . c) ("C++" . c++) ("asymptote" . asy) ("beamer" . latex) ("calc" . fundamental) ("cpp" . c++) ("ditaa" . artist) ("desktop" . conf-desktop) ("dot" . fundamental) ("elisp" . emacs-lisp) ("ocaml" . tuareg) ("screen" . shell-script) ("sqlite" . sql) ("toml" . conf-toml) ("shell" . sh) ("ash" . sh) ("sh" . sh) ("bash" . sh) ("jsh" . sh) ("bash2" . sh) ("dash" . sh) ("dtksh" . sh) ("ksh" . sh) ("es" . sh) ("rc" . sh) ("itcsh" . sh) ("tcsh" . sh) ("jcsh" . sh) ("csh" . sh) ("ksh88" . sh) ("oash" . sh) ("pdksh" . sh) ("mksh" . sh) ("posix" . sh) ("wksh" . sh) ("wsh" . sh) ("zsh" . sh) ("rpm" . sh)) 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-persist-before-read-hook '(org-element--cache-persist-before-read) org-noter--pretty-print-location-hook '(org-noter-djvu--pretty-print-location org-noter-nov--pretty-print-location org-noter-pdf--pretty-print-location) org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-id-link-to-org-use-id 'create-if-interactive org-agenda-skip-archived-trees nil ) [-- Attachment #2: Type: text/html, Size: 19608 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-09-01 4:35 [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] Benjamin McMillan @ 2024-09-10 17:01 ` Ihor Radchenko 2024-09-16 14:27 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-09-10 17:01 UTC (permalink / raw) To: Benjamin McMillan; +Cc: emacs-orgmode Benjamin McMillan <mcmillanbb@gmail.com> writes: > At some point in the last few months, org mode stopped fontifying my > latex export blocks. However, an older version of emacs on my computer > still does fontify. > (The difference is seen even opening emacs with the -q flag) > It seems that there was a change to the function > org-fontify-meta-lines-and-blocks-1 in org.el, specifically at the > conditional that checks org-src-fontify-natively. > As the comment there explains, the intention is to only fontify src > blocks, but I don't see any option exposed to enable fontififcation of > export blocks, which is a fairly crucial feature to my workflow. > > I think fontification of export blocks should follow that of src blocks, > or a separate option should be made. (Or, I may be missing some already > existing solution!) > > For what it is worth, I can get the desired behavior by modifying the > code mentioned above to include "export", as in the following: > (and org-src-fontify-natively > ;; Technically, according to > ;; `org-src-fontify-natively' docstring, we should > ;; only fontify src blocks. However, it is common > ;; to use undocumented fontification of example > ;; blocks with undocumented language specifier. > ;; Keep this undocumented feature for user > ;; convenience. > (member block-type '("src" "example" "export"))) Since we already do it for example blocks, I see not why we should not for export blocks. Would you be interested to submit a patch with your modification? See https://orgmode.org/worg/org-contribute.html#first-patch -- 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-09-10 17:01 ` Ihor Radchenko @ 2024-09-16 14:27 ` Benjamin McMillan 2024-09-17 12:29 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-09-16 14:27 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 2150 bytes --] Ok, I am happy to submit a patch. It would be my first, so I will have to find time to make the commit properly. On Wed, Sep 11, 2024 at 1:59 AM Ihor Radchenko <yantar92@posteo.net> wrote: > Benjamin McMillan <mcmillanbb@gmail.com> writes: > > > At some point in the last few months, org mode stopped fontifying my > > latex export blocks. However, an older version of emacs on my computer > > still does fontify. > > (The difference is seen even opening emacs with the -q flag) > > It seems that there was a change to the function > > org-fontify-meta-lines-and-blocks-1 in org.el, specifically at the > > conditional that checks org-src-fontify-natively. > > As the comment there explains, the intention is to only fontify src > > blocks, but I don't see any option exposed to enable fontififcation of > > export blocks, which is a fairly crucial feature to my workflow. > > > > I think fontification of export blocks should follow that of src blocks, > > or a separate option should be made. (Or, I may be missing some already > > existing solution!) > > > > For what it is worth, I can get the desired behavior by modifying the > > code mentioned above to include "export", as in the following: > > (and org-src-fontify-natively > > ;; Technically, according to > > ;; `org-src-fontify-natively' docstring, we should > > ;; only fontify src blocks. However, it is common > > ;; to use undocumented fontification of example > > ;; blocks with undocumented language specifier. > > ;; Keep this undocumented feature for user > > ;; convenience. > > (member block-type '("src" "example" "export"))) > > Since we already do it for example blocks, I see not why we should not > for export blocks. > > Would you be interested to submit a patch with your modification? > See https://orgmode.org/worg/org-contribute.html#first-patch > > -- > 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> > [-- Attachment #2: Type: text/html, Size: 3077 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-09-16 14:27 ` Benjamin McMillan @ 2024-09-17 12:29 ` Benjamin McMillan 2024-09-17 18:44 ` Ihor Radchenko 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-09-17 12:29 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 2939 bytes --] I attach the patch here. However, I have two questions. First, I am not certain that I set up the repository correctly, because when I run "make test" it generates 55 unexpected failures. This without making any changes. (The patch submitted here does not generate any new failures.) Second, the existing comment at the patch becomes slightly out of date with the change. In fact, I propose that it might be good to update the docstring for `org-src-fontify-natively' to explicitly state that it enable fontification for src, example, and export blocks. If that is agreed on, I am happy to submit a further patch. Thanks, Ben On Mon, Sep 16, 2024 at 11:27 PM Benjamin McMillan <mcmillanbb@gmail.com> wrote: > Ok, I am happy to submit a patch. It would be my first, so I will have to > find time to make the commit properly. > > On Wed, Sep 11, 2024 at 1:59 AM Ihor Radchenko <yantar92@posteo.net> > wrote: > >> Benjamin McMillan <mcmillanbb@gmail.com> writes: >> >> > At some point in the last few months, org mode stopped fontifying my >> > latex export blocks. However, an older version of emacs on my computer >> > still does fontify. >> > (The difference is seen even opening emacs with the -q flag) >> > It seems that there was a change to the function >> > org-fontify-meta-lines-and-blocks-1 in org.el, specifically at the >> > conditional that checks org-src-fontify-natively. >> > As the comment there explains, the intention is to only fontify src >> > blocks, but I don't see any option exposed to enable fontififcation of >> > export blocks, which is a fairly crucial feature to my workflow. >> > >> > I think fontification of export blocks should follow that of src blocks, >> > or a separate option should be made. (Or, I may be missing some already >> > existing solution!) >> > >> > For what it is worth, I can get the desired behavior by modifying the >> > code mentioned above to include "export", as in the following: >> > (and org-src-fontify-natively >> > ;; Technically, according to >> > ;; `org-src-fontify-natively' docstring, we should >> > ;; only fontify src blocks. However, it is common >> > ;; to use undocumented fontification of example >> > ;; blocks with undocumented language specifier. >> > ;; Keep this undocumented feature for user >> > ;; convenience. >> > (member block-type '("src" "example" "export"))) >> >> Since we already do it for example blocks, I see not why we should not >> for export blocks. >> >> Would you be interested to submit a patch with your modification? >> See https://orgmode.org/worg/org-contribute.html#first-patch >> >> -- >> 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> >> > [-- Attachment #1.2: Type: text/html, Size: 4223 bytes --] [-- Attachment #2: 0001-lisp-org.el-Change-native-fontification-to-include-e.patch --] [-- Type: application/octet-stream, Size: 1107 bytes --] From 2e543eb4393b01a640c2b1d66de55a744be75bca Mon Sep 17 00:00:00 2001 From: Benjamin McMillan <mcmillanbb@gmail.com> Date: Tue, 17 Sep 2024 21:05:07 +0900 Subject: [PATCH] lisp/org.el: Change native fontification to include export blocks lisp/org.el (org-fontify-meta-lines-and-blocks-1): Add "export" to list of block types that are fontified if org-src-fontify-natively is non-nil. TINYCHANGE --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index d5c1dcb35..156e1716f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5497,7 +5497,7 @@ by a #." ;; blocks with undocumented language specifier. ;; Keep this undocumented feature for user ;; convenience. - (member block-type '("src" "example"))) + (member block-type '("src" "example" "export"))) (save-match-data (org-src-font-lock-fontify-block (or lang "") block-start block-end)) (add-text-properties bol-after-beginline block-end '(src-block t))) -- 2.46.0 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-09-17 12:29 ` Benjamin McMillan @ 2024-09-17 18:44 ` Ihor Radchenko [not found] ` <CALo8A5Vm-gik0qQC7KacNg7kN2VzL0Y1e8_LXxV8S7-we9CYSw@mail.gmail.com> 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-09-17 18:44 UTC (permalink / raw) To: Benjamin McMillan; +Cc: emacs-orgmode Benjamin McMillan <mcmillanbb@gmail.com> writes: > I attach the patch here. Thanks! > However, I have two questions. > First, I am not certain that I set up the repository correctly, because > when I run "make test" it generates 55 unexpected failures. This without > making any changes. > (The patch submitted here does not generate any new failures.) That's odd. May you share the log? > Second, the existing comment at the patch becomes slightly out of date with > the change. Then, may you please update the comment? Also, may you change the commit message to not sound like it is a new feature? Just explain the purpose of the change as you did in this email thread (but shorter, and then add a link to this thread). > In fact, I propose that it might be good to update the docstring for > `org-src-fontify-natively' to explicitly state that it enable fontification > for src, example, and export blocks. I'd rather not document this in `org-src-fontify-natively'. The name of this variable does not really hint that it has anything to do with export or example blocks. We may eventually rename it to something more generic, but example blocks may need to be re-considered because specifying language of the example block is not even a part of Org syntax. So, generalizing and documenting this is a bit tricky. -- 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
[parent not found: <CALo8A5Vm-gik0qQC7KacNg7kN2VzL0Y1e8_LXxV8S7-we9CYSw@mail.gmail.com>]
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] [not found] ` <CALo8A5Vm-gik0qQC7KacNg7kN2VzL0Y1e8_LXxV8S7-we9CYSw@mail.gmail.com> @ 2024-09-22 9:53 ` Ihor Radchenko 2024-09-23 13:17 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-09-22 9:53 UTC (permalink / raw) To: Benjamin McMillan; +Cc: emacs-orgmode [ Adding Org mailing list back to CC to keep the conversation public ] Benjamin McMillan <mcmillanbb@gmail.com> writes: > Dear Ihor, > I am happy to make the changes. > I am not sure what exactly made the last commit message read like a new > feature, but hopefully the following is better: > lisp/org.el: Add "export" to list of native fontified blocks > If not, I can modify again. Thanks! Applied, onto bugfix. I modified the commit message a bit. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2a85367ea8 I also added you to the contributor list. https://git.sr.ht/~bzg/worg/commit/84bb23ce Fixed. > And thanks for the explanation, it makes sense. > > Regards the logs, it may be because I don't have the org git repository set > up properly. > I cloned the source into a folder that has no relation to my emacs setup, > so that might be causing problems. > Logs: > Ran 1284 tests, 1216 results as expected, 55 unexpected, 13 skipped > (2024-09-17 19:52:08+0900, 75.466775 sec) > 2 expected failures > ... Most of the failing tests are concerning running external programs (java and maxima). It looks like you have them installed, but they somehow misbehave. Maybe old versions? > FAILED test-org-table/sort-lines ((should (equal "| a | x |\n| B | 4 > |\n| c | 3 |\n" (org-test-with-temp-text "| <point>a | x |\n| c | 3 |\n| B > | 4 |\n" (org-table-sort-lines nil 97) (buffer-string)))) :form (equal "| a > | x |\n| B | 4 |\n| c | 3 |\n" #("| B | 4 |\n| a | x |\n| c | 3 |\n" 0 9 > (face org-table) 9 10 (face org-table-row) 10 19 (face org-table) 19 20 > (face org-table-row) 20 29 (face org-table) 29 30 (face org-table-row))) > :value nil :explanation (array-elt 2 (different-atoms (97 "#x61" "?a") (66 > "#x42" "?B")))) This is probably your locale. The test is checking sorting and sorting depends on language settings. This one is kind of expected. Although it would be nice to make test account for locales as well. > 55 unexpected results: > FAILED ob-java/args-quoted-string ((should (string= "forty two\n42\n" > (org-babel-execute-src-block))) :form (string= "forty two\n42\n" "") :value > nil :explanation (arrays-of-different-length 13 0 "forty two\n42\n" "" > first-mismatch-at 0)) > FAILED ob-java/import_library ((should (string= "encoded=NDI=, > decoded=42" (org-babel-execute-src-block))) :form (string= "encoded=NDI=, > decoded=42" "") :value nil :explanation (arrays-of-different-length 24 0 > "encoded=NDI=, decoded=42" "" first-mismatch-at 0)) > FAILED ob-java/import_library_inline ((should (string= "encoded=NDI=, > decoded=42" (org-babel-execute-src-block))) :form (string= "encoded=NDI=, > decoded=42" "") :value nil :explanation (arrays-of-different-length 24 0 > "encoded=NDI=, decoded=42" "" first-mismatch-at 0)) > FAILED ob-java/inhomogeneous_table ((should (equal '(("forty" 4) > ("two" 2)) (org-babel-execute-src-block))) :form (equal (("forty" 4) ("two" > 2)) "") :value nil :explanation (different-types (("forty" 4) ("two" 2)) > "")) > FAILED ob-java/integer-var ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/list-var ((should (equal '("forty" "two") > (org-babel-execute-src-block))) :form (equal ("forty" "two") "") :value nil > :explanation (different-types ("forty" "two") "")) > FAILED ob-java/matrix-var ((should (equal '((2 4) (1 2)) > (org-babel-execute-src-block))) :form (equal ((2 4) (1 2)) "") :value nil > :explanation (different-types ((2 4) (1 2)) "")) > FAILED ob-java/matrix-var-with-header ((should (equal '(("col1" > "col2") hline (2 4) (1 2)) (org-babel-execute-src-block))) :form (equal > (("col1" "col2") hline (2 4) (1 2)) ((""))) :value nil :explanation > (proper-lists-of-different-length 4 1 (("col1" "col2") hline (2 4) (1 2)) > (("")) first-mismatch-at 0)) > FAILED ob-java/one-arg ((should (string= "fortytwo" > (org-babel-execute-src-block))) :form (string= "fortytwo" "") :value nil > :explanation (arrays-of-different-length 8 0 "fortytwo" "" > first-mismatch-at 0)) > FAILED ob-java/output-list-with-spaces ((should (equal "forty > two\nforty two\n" (org-babel-execute-src-block))) :form (equal "forty > two\nforty two\n" "") :value nil :explanation (arrays-of-different-length > 20 0 "forty two\nforty two\n" "" first-mismatch-at 0)) > FAILED ob-java/output-table-with-header ((should (equal > "|col1|col2|\n|-\n|2|1\n|4|2\n" (org-babel-execute-src-block))) :form > (equal "|col1|col2|\n|-\n|2|1\n|4|2\n" "") :value nil :explanation > (arrays-of-different-length 25 0 "|col1|col2|\n|-\n|2|1\n|4|2\n" "" > first-mismatch-at 0)) > FAILED ob-java/read-list-return-array ((should (equal '("forty" "two") > (org-babel-execute-src-block))) :form (equal ("forty" "two") "") :value nil > :explanation (different-types ("forty" "two") "")) > FAILED ob-java/read-return-list ((should (equal '("forty" "two") > (org-babel-execute-src-block))) :form (equal ("forty" "two") "") :value nil > :explanation (different-types ("forty" "two") "")) > FAILED ob-java/read-return-list-with-package ((should (equal '("forty" > "two") (org-babel-execute-src-block))) :form (equal ("forty" "two") "") > :value nil :explanation (different-types ("forty" "two") "")) > FAILED ob-java/return-vector-using-array ((should (equal '((4) (2)) > (org-babel-execute-src-block))) :form (equal ((4) (2)) ((""))) :value nil > :explanation (proper-lists-of-different-length 2 1 ((4) (2)) (("")) > first-mismatch-at 0)) > FAILED ob-java/return-vector-using-list ((should (equal '((4) (2)) > (org-babel-execute-src-block))) :form (equal ((4) (2)) ((""))) :value nil > :explanation (proper-lists-of-different-length 2 1 ((4) (2)) (("")) > first-mismatch-at 0)) > FAILED ob-java/simple ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/simple-dir ((should (string= "42" (unwind-protect > (org-babel-execute-src-block) (delete-file (concat ... "Main.java")) > (delete-file (concat ... "Main.class"))))) :form (string= "42" "") :value > nil :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > FAILED ob-java/simple-dir-with-package ((should (string= "42" > (unwind-protect (org-babel-execute-src-block) (delete-file (concat ... > "pkg/Main.java")) (delete-file (concat ... "pkg/Main.class")) > (delete-directory (concat ... "pkg"))))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/simple-return-float ((should (equal 42.0 > (org-babel-execute-src-block))) :form (equal 42.0 "") :value nil > :explanation (different-types 42.0 "")) > FAILED ob-java/simple-return-int ((should (eq 42 > (org-babel-execute-src-block))) :form (eq 42 "") :value nil) > FAILED ob-java/simple-return-string ((should (string= "forty two" > (org-babel-execute-src-block))) :form (string= "forty two" "") :value nil > :explanation (arrays-of-different-length 9 0 "forty two" "" > first-mismatch-at 0)) > FAILED ob-java/simple-with-bracket ((should (string= "[42" > (org-babel-execute-src-block))) :form (string= "[42" "") :value nil > :explanation (arrays-of-different-length 3 0 "[42" "" first-mismatch-at 0)) > FAILED ob-java/simple-with-class ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/simple-with-class-and-package ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/simple-with-class-attr ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/simple-with-class-attr-with-package ((should (string= > "42" (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/simple-with-main ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/simple-with-main-args-array ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/simple-with-main-whitespace ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/simple-with-no-main ((should (string= "success" > (org-babel-execute-src-block))) :form (string= "success" "") :value nil > :explanation (arrays-of-different-length 7 0 "success" "" first-mismatch-at > 0)) > FAILED ob-java/simple-with-non-public-class ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/simple-with-quote ((should (string= "\"42\"" > (org-babel-execute-src-block))) :form (string= "\"42\"" "") :value nil > :explanation (arrays-of-different-length 4 0 "\"42\"" "" first-mismatch-at > 0)) > FAILED ob-java/simple-with-two-methods ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/string-var ((should (string= "forty two, len=9" > (org-babel-execute-src-block))) :form (string= "forty two, len=9" "") > :value nil :explanation (arrays-of-different-length 16 0 "forty two, len=9" > "" first-mismatch-at 0)) > FAILED ob-java/two-vars ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/var-with-class ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/var-with-class-and-hanging-curlies ((should (string= > "42" (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/var-with-class-and-package ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/var-with-main ((should (string= "42" > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at 0)) > FAILED ob-java/vector-var ((should (equal '("forty" "two") > (org-babel-execute-src-block))) :form (equal ("forty" "two") "") :value nil > :explanation (different-types ("forty" "two") "")) > FAILED ob-maxima/batch+verbatim ((should (equal > (org-babel-execute-src-block) "(assume(z > > 0),integrate(exp(-t)*t^z,t,0,inf))\n > gamma(z + 1)")) :form (equal "(linenum:0,\n(assume(z > > 0),integrate(exp(-t)*t^z,t,0,inf))\n > gamma(z + 1)" "(assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n > gamma(z + 1)") :value nil :explanation > (arrays-of-different-length 104 92 "(linenum:0,\n(assume(z > > 0),integrate(exp(-t)*t^z,t,0,inf))\n > gamma(z + 1)" "(assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n > gamma(z + 1)" first-mismatch-at 1)) > FAILED ob-maxima/batch+verbatim+:lisp ((should (equal > (org-babel-execute-src-block) "((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))")) :form > (equal "(%i1) (linenum:0,\n((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))" "((%GAMMA > SIMP) ((MPLUS SIMP) 1 $Z))") :value nil :explanation > (arrays-of-different-length 53 35 "(%i1) (linenum:0,\n((%GAMMA SIMP) > ((MPLUS SIMP) 1 $Z))" "((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))" > first-mismatch-at 1)) > FAILED ob-maxima/batch+verbatim+empty-string ((should (equal > (org-babel-execute-src-block) "(%i1) \"\"\n(%o1) ")) :form (equal "(%i1) > (linenum:0,\n(%i1) \"\"\n(%o1) " "(%i1) \"\"\n(%o1) ") :value nil > :explanation (arrays-of-different-length 33 15 "(%i1) (linenum:0,\n(%i1) > \"\"\n(%o1) " "(%i1) \"\"\n(%o1) " first-mismatch-at 6)) > FAILED ob-maxima/batch+verbatim+empty-string-vq ((should (equal > (org-babel-execute-src-block) "\"\"\n ")) :form (equal "(linenum:0,\n\"\"\n > " "\"\"\n ") :value nil :explanation (arrays-of-different-length 16 4 > "(linenum:0,\n\"\"\n " "\"\"\n " first-mismatch-at 0)) > FAILED ob-maxima/batch+verbatim+quiet ((should (equal > (org-babel-execute-src-block) "(%i1) (assume(z > > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) > gamma(z + 1)")) :form (equal "(%i1) (linenum:0,\n(%i1) (assume(z > > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) > gamma(z + 1)" "(%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) > gamma(z + 1)") :value nil :explanation > (arrays-of-different-length 116 98 "(%i1) (linenum:0,\n(%i1) (assume(z > > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) > gamma(z + 1)" "(%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) > gamma(z + 1)" first-mismatch-at 7)) > FAILED ob-maxima/batch+verbatim+whitespace-string ((should (equal > (org-babel-execute-src-block) "(%i1) \" \"\n(%o1) > ")) :form (equal "(%i1) (linenum:0,\n(%i1) \" \"\n(%o1) > " "(%i1) \" \"\n(%o1) > ") :value nil :explanation (arrays-of-different-length 68 50 "(%i1) > (linenum:0,\n(%i1) \" \"\n(%o1) " "(%i1) > \" \"\n(%o1) " first-mismatch-at 6)) > FAILED ob-maxima/integer-input ((should (equal 4 > (org-babel-execute-src-block))) :form (equal 4 (("(linenum:0,") (4))) > :value nil :explanation (different-types 4 (("(linenum:0,") (4)))) > FAILED ob-maxima/list-input ((should (equal "[2, [2, 3], 4] " > (org-babel-execute-src-block))) :form (equal "[2, [2, 3], 4] " > "(linenum:0,\n[2, [2, 3], 4] ") :value nil :explanation > (arrays-of-different-length 15 27 "[2, [2, 3], 4] " "(linenum:0,\n[2, [2, > 3], 4] " first-mismatch-at 0)) > FAILED ob-maxima/matrix-output ((should (equal '((1 2 3) (2 3 4) (3 4 > 5)) (org-babel-execute-src-block))) :form (equal ((1 2 3) (2 3 4) (3 4 5)) > (("(linenum:0," "" "") (1 2 3) (2 3 4) (3 4 5))) :value nil :explanation > (proper-lists-of-different-length 3 4 ((1 2 3) (2 3 4) (3 4 5)) > (("(linenum:0," "" "") (1 2 3) (2 3 4) (3 4 5)) first-mismatch-at 0)) > FAILED ob-maxima/simple-list-input ((should (equal "[1, 2, 3] " > (org-babel-execute-src-block))) :form (equal "[1, 2, 3] " "(linenum:0,\n[1, > 2, 3] ") :value nil :explanation (arrays-of-different-length 10 22 "[1, 2, > 3] " "(linenum:0,\n[1, 2, 3] " first-mismatch-at 0)) > FAILED ob-maxima/string-input ((should (equal "- sin(x)" > (org-babel-execute-src-block))) :form (equal "- sin(x)" (("(linenum:0," "") > ("-" "sin(x)"))) :value nil :explanation (different-types "- sin(x)" > (("(linenum:0," "") ("-" "sin(x)")))) > FAILED ob-maxima/table-input1 ((should (equal "[[2.0], [3.0]] " > (org-babel-execute-src-block))) :form (equal "[[2.0], [3.0]] " > "(linenum:0,\n[[2.0], [3.0]] ") :value nil :explanation > (arrays-of-different-length 15 27 "[[2.0], [3.0]] " "(linenum:0,\n[[2.0], > [3.0]] " first-mismatch-at 0)) > FAILED ob-maxima/table-input2 ((should (equal "[[2.0, 3.0]] " > (org-babel-execute-src-block))) :form (equal "[[2.0, 3.0]] " > "(linenum:0,\n[[2.0, 3.0]] ") :value nil :explanation > (arrays-of-different-length 13 25 "[[2.0, 3.0]] " "(linenum:0,\n[[2.0, > 3.0]] " first-mismatch-at 0)) > FAILED test-org-table/sort-lines ((should (equal "| a | x |\n| B | 4 > |\n| c | 3 |\n" (org-test-with-temp-text "| <point>a | x |\n| c | 3 |\n| B > | 4 |\n" (org-table-sort-lines nil 97) (buffer-string)))) :form (equal "| a > | x |\n| B | 4 |\n| c | 3 |\n" #("| B | 4 |\n| a | x |\n| c | 3 |\n" 0 9 > (face org-table) 9 10 (face org-table-row) 10 19 (face org-table) 19 20 > (face org-table-row) 20 29 (face org-table) 29 30 (face org-table-row))) > :value nil :explanation (array-elt 2 (different-atoms (97 "#x61" "?a") (66 > "#x42" "?B")))) > > 13 skipped results: > SKIPPED org-missing-dependency/test-ob-R ((skip-unless nil) :form nil > :value nil) > SKIPPED org-missing-dependency/test-ob-clojure ((skip-unless nil) :form > nil :value nil) > SKIPPED org-missing-dependency/test-ob-haskell-ghci ((skip-unless nil) > :form nil :value nil) > SKIPPED org-missing-dependency/test-ob-julia ((skip-unless nil) :form > nil :value nil) > SKIPPED org-missing-dependency/test-ob-lua ((skip-unless nil) :form nil > :value nil) > SKIPPED org-missing-dependency/test-ob-octave ((skip-unless nil) :form > nil :value nil) > SKIPPED org-missing-dependency/test-ob-python ((skip-unless nil) :form > nil :value nil) > SKIPPED org-missing-dependency/test-ob-ruby ((skip-unless nil) :form > nil :value nil) > SKIPPED org-missing-dependency/test-ob-scheme ((skip-unless nil) :form > nil :value nil) > SKIPPED org-missing-dependency/test-org-attach-git ((skip-unless nil) > :form nil :value nil) > SKIPPED test-ob-shell/bash-uses-assoc-arrays ((skip-unless (if-let > ((bash (executable-find "bash"))) (eq 0 (process-file bash nil nil nil "-c" > "declare -A assoc_array")))) :form (let* ((bash (and t (executable-find > "bash")))) (if bash (eq 0 (process-file bash nil nil nil "-c" "declare -A > assoc_array")) nil)) :value nil) > SKIPPED test-ob-shell/bash-uses-assoc-arrays-with-lists ((skip-unless > (if-let ((bash (executable-find "bash"))) (eq 0 (process-file bash nil nil > nil "-c" "declare -A assoc_array")))) :form (let* ((bash (and t > (executable-find "bash")))) (if bash (eq 0 (process-file bash nil nil nil > "-c" "declare -A assoc_array")) nil)) :value nil) > SKIPPED test-org-fold/org-fold-display-inline-images ((skip-unless (not > noninteractive)) :form (not t) :value nil) > > make: *** [test] Error 1 > > > > > > > On Wed, Sep 18, 2024 at 3:43 AM Ihor Radchenko <yantar92@posteo.net> wrote: > >> Benjamin McMillan <mcmillanbb@gmail.com> writes: >> >> > I attach the patch here. >> >> Thanks! >> >> > However, I have two questions. >> > First, I am not certain that I set up the repository correctly, because >> > when I run "make test" it generates 55 unexpected failures. This without >> > making any changes. >> > (The patch submitted here does not generate any new failures.) >> >> That's odd. May you share the log? >> >> > Second, the existing comment at the patch becomes slightly out of date >> with >> > the change. >> >> Then, may you please update the comment? >> >> Also, may you change the commit message to not sound like it is a new >> feature? Just explain the purpose of the change as you did in this >> email thread (but shorter, and then add a link to this thread). >> >> > In fact, I propose that it might be good to update the docstring for >> > `org-src-fontify-natively' to explicitly state that it enable >> fontification >> > for src, example, and export blocks. >> >> I'd rather not document this in `org-src-fontify-natively'. The name of >> this variable does not really hint that it has anything to do with >> export or example blocks. >> >> We may eventually rename it to something more generic, but example >> blocks may need to be re-considered because specifying language of the >> example block is not even a part of Org syntax. So, generalizing and >> documenting this is a bit tricky. >> >> -- >> 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> >> > From c245df2136778fd34d3ed263208331ca4e35e54d Mon Sep 17 00:00:00 2001 > From: Benjamin McMillan <mcmillanbb@gmail.com> > Date: Fri, 20 Sep 2024 23:43:55 +0900 > Subject: [PATCH] lisp/org.el: Add "export" to list of native fontified blocks > > * lisp/org.el (org-fontify-meta-lines-and-blocks-1): Add "export" to > list of block types that are fontified if org-src-fontify-natively > is non-nil. > > Link: https://list.orgmode.org/87h6aejf17.fsf@localhost/ > TINYCHANGE > --- > lisp/org.el | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/lisp/org.el b/lisp/org.el > index d5c1dcb35..df58b47be 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -5490,14 +5490,14 @@ by a #." > (org-remove-flyspell-overlays-in nl-before-endline end-of-endline) > (cond > ((and org-src-fontify-natively > - ;; Technically, according to > + ;; Technically, according to the > ;; `org-src-fontify-natively' docstring, we should > ;; only fontify src blocks. However, it is common > - ;; to use undocumented fontification of example > - ;; blocks with undocumented language specifier. > - ;; Keep this undocumented feature for user > - ;; convenience. > - (member block-type '("src" "example"))) > + ;; to use undocumented fontification of export and > + ;; example blocks. (The latter which do not support a > + ;; language specifier.) Keep this undocumented feature > + ;; for user convenience. > + (member block-type '("src" "export" "example"))) > (save-match-data > (org-src-font-lock-fontify-block (or lang "") block-start block-end)) > (add-text-properties bol-after-beginline block-end '(src-block t))) > -- > 2.46.0 > -- 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-09-22 9:53 ` Ihor Radchenko @ 2024-09-23 13:17 ` Benjamin McMillan 2024-11-03 18:00 ` Ihor Radchenko 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-09-23 13:17 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 24491 bytes --] Thank you! And you are right, I haven't installed java on this computer, and a terminal call to java returns the message "The operation couldn’t be completed. Unable to locate a Java Runtime." Is that expected behavior? I'm not very familiar with testing frameworks, but wouldn't expect that the environment should be a source of failed tests like that. If it's not important, we can let the matter rest here. But for future contributions, I would want the regression tests to be providing useful feedback! On Sun, Sep 22, 2024 at 6:51 PM Ihor Radchenko <yantar92@posteo.net> wrote: > [ Adding Org mailing list back to CC to keep the conversation public ] > > Benjamin McMillan <mcmillanbb@gmail.com> writes: > > > Dear Ihor, > > I am happy to make the changes. > > I am not sure what exactly made the last commit message read like a new > > feature, but hopefully the following is better: > > lisp/org.el: Add "export" to list of native fontified blocks > > If not, I can modify again. > > Thanks! > Applied, onto bugfix. > I modified the commit message a bit. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2a85367ea8 > > I also added you to the contributor list. > https://git.sr.ht/~bzg/worg/commit/84bb23ce > > Fixed. > > > And thanks for the explanation, it makes sense. > > > > Regards the logs, it may be because I don't have the org git repository > set > > up properly. > > I cloned the source into a folder that has no relation to my emacs setup, > > so that might be causing problems. > > Logs: > > Ran 1284 tests, 1216 results as expected, 55 unexpected, 13 skipped > > (2024-09-17 19:52:08+0900, 75.466775 sec) > > 2 expected failures > > ... > > Most of the failing tests are concerning running external programs (java > and maxima). It looks like you have them installed, but they somehow > misbehave. Maybe old versions? > > > FAILED test-org-table/sort-lines ((should (equal "| a | x |\n| B | 4 > > |\n| c | 3 |\n" (org-test-with-temp-text "| <point>a | x |\n| c | 3 |\n| > B > > | 4 |\n" (org-table-sort-lines nil 97) (buffer-string)))) :form (equal > "| a > > | x |\n| B | 4 |\n| c | 3 |\n" #("| B | 4 |\n| a | x |\n| c | 3 |\n" 0 9 > > (face org-table) 9 10 (face org-table-row) 10 19 (face org-table) 19 20 > > (face org-table-row) 20 29 (face org-table) 29 30 (face org-table-row))) > > :value nil :explanation (array-elt 2 (different-atoms (97 "#x61" "?a") > (66 > > "#x42" "?B")))) > > This is probably your locale. The test is checking sorting and sorting > depends on language settings. This one is kind of expected. Although it > would be nice to make test account for locales as well. > > > 55 unexpected results: > > FAILED ob-java/args-quoted-string ((should (string= "forty > two\n42\n" > > (org-babel-execute-src-block))) :form (string= "forty two\n42\n" "") > :value > > nil :explanation (arrays-of-different-length 13 0 "forty two\n42\n" "" > > first-mismatch-at 0)) > > FAILED ob-java/import_library ((should (string= "encoded=NDI=, > > decoded=42" (org-babel-execute-src-block))) :form (string= "encoded=NDI=, > > decoded=42" "") :value nil :explanation (arrays-of-different-length 24 0 > > "encoded=NDI=, decoded=42" "" first-mismatch-at 0)) > > FAILED ob-java/import_library_inline ((should (string= > "encoded=NDI=, > > decoded=42" (org-babel-execute-src-block))) :form (string= "encoded=NDI=, > > decoded=42" "") :value nil :explanation (arrays-of-different-length 24 0 > > "encoded=NDI=, decoded=42" "" first-mismatch-at 0)) > > FAILED ob-java/inhomogeneous_table ((should (equal '(("forty" 4) > > ("two" 2)) (org-babel-execute-src-block))) :form (equal (("forty" 4) > ("two" > > 2)) "") :value nil :explanation (different-types (("forty" 4) ("two" 2)) > > "")) > > FAILED ob-java/integer-var ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/list-var ((should (equal '("forty" "two") > > (org-babel-execute-src-block))) :form (equal ("forty" "two") "") :value > nil > > :explanation (different-types ("forty" "two") "")) > > FAILED ob-java/matrix-var ((should (equal '((2 4) (1 2)) > > (org-babel-execute-src-block))) :form (equal ((2 4) (1 2)) "") :value nil > > :explanation (different-types ((2 4) (1 2)) "")) > > FAILED ob-java/matrix-var-with-header ((should (equal '(("col1" > > "col2") hline (2 4) (1 2)) (org-babel-execute-src-block))) :form (equal > > (("col1" "col2") hline (2 4) (1 2)) ((""))) :value nil :explanation > > (proper-lists-of-different-length 4 1 (("col1" "col2") hline (2 4) (1 2)) > > (("")) first-mismatch-at 0)) > > FAILED ob-java/one-arg ((should (string= "fortytwo" > > (org-babel-execute-src-block))) :form (string= "fortytwo" "") :value nil > > :explanation (arrays-of-different-length 8 0 "fortytwo" "" > > first-mismatch-at 0)) > > FAILED ob-java/output-list-with-spaces ((should (equal "forty > > two\nforty two\n" (org-babel-execute-src-block))) :form (equal "forty > > two\nforty two\n" "") :value nil :explanation (arrays-of-different-length > > 20 0 "forty two\nforty two\n" "" first-mismatch-at 0)) > > FAILED ob-java/output-table-with-header ((should (equal > > "|col1|col2|\n|-\n|2|1\n|4|2\n" (org-babel-execute-src-block))) :form > > (equal "|col1|col2|\n|-\n|2|1\n|4|2\n" "") :value nil :explanation > > (arrays-of-different-length 25 0 "|col1|col2|\n|-\n|2|1\n|4|2\n" "" > > first-mismatch-at 0)) > > FAILED ob-java/read-list-return-array ((should (equal '("forty" > "two") > > (org-babel-execute-src-block))) :form (equal ("forty" "two") "") :value > nil > > :explanation (different-types ("forty" "two") "")) > > FAILED ob-java/read-return-list ((should (equal '("forty" "two") > > (org-babel-execute-src-block))) :form (equal ("forty" "two") "") :value > nil > > :explanation (different-types ("forty" "two") "")) > > FAILED ob-java/read-return-list-with-package ((should (equal > '("forty" > > "two") (org-babel-execute-src-block))) :form (equal ("forty" "two") "") > > :value nil :explanation (different-types ("forty" "two") "")) > > FAILED ob-java/return-vector-using-array ((should (equal '((4) (2)) > > (org-babel-execute-src-block))) :form (equal ((4) (2)) ((""))) :value nil > > :explanation (proper-lists-of-different-length 2 1 ((4) (2)) (("")) > > first-mismatch-at 0)) > > FAILED ob-java/return-vector-using-list ((should (equal '((4) (2)) > > (org-babel-execute-src-block))) :form (equal ((4) (2)) ((""))) :value nil > > :explanation (proper-lists-of-different-length 2 1 ((4) (2)) (("")) > > first-mismatch-at 0)) > > FAILED ob-java/simple ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-dir ((should (string= "42" (unwind-protect > > (org-babel-execute-src-block) (delete-file (concat ... "Main.java")) > > (delete-file (concat ... "Main.class"))))) :form (string= "42" "") :value > > nil :explanation (arrays-of-different-length 2 0 "42" "" > first-mismatch-at > > 0)) > > FAILED ob-java/simple-dir-with-package ((should (string= "42" > > (unwind-protect (org-babel-execute-src-block) (delete-file (concat ... > > "pkg/Main.java")) (delete-file (concat ... "pkg/Main.class")) > > (delete-directory (concat ... "pkg"))))) :form (string= "42" "") :value > nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-return-float ((should (equal 42.0 > > (org-babel-execute-src-block))) :form (equal 42.0 "") :value nil > > :explanation (different-types 42.0 "")) > > FAILED ob-java/simple-return-int ((should (eq 42 > > (org-babel-execute-src-block))) :form (eq 42 "") :value nil) > > FAILED ob-java/simple-return-string ((should (string= "forty two" > > (org-babel-execute-src-block))) :form (string= "forty two" "") :value nil > > :explanation (arrays-of-different-length 9 0 "forty two" "" > > first-mismatch-at 0)) > > FAILED ob-java/simple-with-bracket ((should (string= "[42" > > (org-babel-execute-src-block))) :form (string= "[42" "") :value nil > > :explanation (arrays-of-different-length 3 0 "[42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-with-class ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-with-class-and-package ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-with-class-attr ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-with-class-attr-with-package ((should (string= > > "42" (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-with-main ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-with-main-args-array ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-with-main-whitespace ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-with-no-main ((should (string= "success" > > (org-babel-execute-src-block))) :form (string= "success" "") :value nil > > :explanation (arrays-of-different-length 7 0 "success" "" > first-mismatch-at > > 0)) > > FAILED ob-java/simple-with-non-public-class ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/simple-with-quote ((should (string= "\"42\"" > > (org-babel-execute-src-block))) :form (string= "\"42\"" "") :value nil > > :explanation (arrays-of-different-length 4 0 "\"42\"" "" > first-mismatch-at > > 0)) > > FAILED ob-java/simple-with-two-methods ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/string-var ((should (string= "forty two, len=9" > > (org-babel-execute-src-block))) :form (string= "forty two, len=9" "") > > :value nil :explanation (arrays-of-different-length 16 0 "forty two, > len=9" > > "" first-mismatch-at 0)) > > FAILED ob-java/two-vars ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/var-with-class ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/var-with-class-and-hanging-curlies ((should (string= > > "42" (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/var-with-class-and-package ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/var-with-main ((should (string= "42" > > (org-babel-execute-src-block))) :form (string= "42" "") :value nil > > :explanation (arrays-of-different-length 2 0 "42" "" first-mismatch-at > 0)) > > FAILED ob-java/vector-var ((should (equal '("forty" "two") > > (org-babel-execute-src-block))) :form (equal ("forty" "two") "") :value > nil > > :explanation (different-types ("forty" "two") "")) > > FAILED ob-maxima/batch+verbatim ((should (equal > > (org-babel-execute-src-block) "(assume(z > > > 0),integrate(exp(-t)*t^z,t,0,inf))\n > > gamma(z + 1)")) :form (equal "(linenum:0,\n(assume(z > > > 0),integrate(exp(-t)*t^z,t,0,inf))\n > > gamma(z + 1)" "(assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n > > gamma(z + 1)") :value nil :explanation > > (arrays-of-different-length 104 92 "(linenum:0,\n(assume(z > > > 0),integrate(exp(-t)*t^z,t,0,inf))\n > > gamma(z + 1)" "(assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n > > gamma(z + 1)" first-mismatch-at 1)) > > FAILED ob-maxima/batch+verbatim+:lisp ((should (equal > > (org-babel-execute-src-block) "((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))")) > :form > > (equal "(%i1) (linenum:0,\n((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))" "((%GAMMA > > SIMP) ((MPLUS SIMP) 1 $Z))") :value nil :explanation > > (arrays-of-different-length 53 35 "(%i1) (linenum:0,\n((%GAMMA SIMP) > > ((MPLUS SIMP) 1 $Z))" "((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))" > > first-mismatch-at 1)) > > FAILED ob-maxima/batch+verbatim+empty-string ((should (equal > > (org-babel-execute-src-block) "(%i1) \"\"\n(%o1) ")) :form (equal "(%i1) > > (linenum:0,\n(%i1) \"\"\n(%o1) " "(%i1) \"\"\n(%o1) ") :value nil > > :explanation (arrays-of-different-length 33 15 "(%i1) (linenum:0,\n(%i1) > > \"\"\n(%o1) " "(%i1) \"\"\n(%o1) " first-mismatch-at 6)) > > FAILED ob-maxima/batch+verbatim+empty-string-vq ((should (equal > > (org-babel-execute-src-block) "\"\"\n ")) :form (equal > "(linenum:0,\n\"\"\n > > " "\"\"\n ") :value nil :explanation (arrays-of-different-length 16 4 > > "(linenum:0,\n\"\"\n " "\"\"\n " first-mismatch-at 0)) > > FAILED ob-maxima/batch+verbatim+quiet ((should (equal > > (org-babel-execute-src-block) "(%i1) (assume(z > > > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) > > gamma(z + 1)")) :form (equal "(%i1) (linenum:0,\n(%i1) (assume(z > > > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) > > gamma(z + 1)" "(%i1) (assume(z > > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) > > gamma(z + 1)") :value nil :explanation > > (arrays-of-different-length 116 98 "(%i1) (linenum:0,\n(%i1) (assume(z > > > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) > > gamma(z + 1)" "(%i1) (assume(z > > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) > > gamma(z + 1)" first-mismatch-at 7)) > > FAILED ob-maxima/batch+verbatim+whitespace-string ((should (equal > > (org-babel-execute-src-block) "(%i1) \" \"\n(%o1) > > ")) :form (equal "(%i1) (linenum:0,\n(%i1) \" \"\n(%o1) > > " "(%i1) \" \"\n(%o1) > > ") :value nil :explanation (arrays-of-different-length 68 50 "(%i1) > > (linenum:0,\n(%i1) \" \"\n(%o1) " > "(%i1) > > \" \"\n(%o1) " first-mismatch-at 6)) > > FAILED ob-maxima/integer-input ((should (equal 4 > > (org-babel-execute-src-block))) :form (equal 4 (("(linenum:0,") (4))) > > :value nil :explanation (different-types 4 (("(linenum:0,") (4)))) > > FAILED ob-maxima/list-input ((should (equal "[2, [2, 3], 4] " > > (org-babel-execute-src-block))) :form (equal "[2, [2, 3], 4] " > > "(linenum:0,\n[2, [2, 3], 4] ") :value nil :explanation > > (arrays-of-different-length 15 27 "[2, [2, 3], 4] " "(linenum:0,\n[2, [2, > > 3], 4] " first-mismatch-at 0)) > > FAILED ob-maxima/matrix-output ((should (equal '((1 2 3) (2 3 4) (3 > 4 > > 5)) (org-babel-execute-src-block))) :form (equal ((1 2 3) (2 3 4) (3 4 > 5)) > > (("(linenum:0," "" "") (1 2 3) (2 3 4) (3 4 5))) :value nil :explanation > > (proper-lists-of-different-length 3 4 ((1 2 3) (2 3 4) (3 4 5)) > > (("(linenum:0," "" "") (1 2 3) (2 3 4) (3 4 5)) first-mismatch-at 0)) > > FAILED ob-maxima/simple-list-input ((should (equal "[1, 2, 3] " > > (org-babel-execute-src-block))) :form (equal "[1, 2, 3] " > "(linenum:0,\n[1, > > 2, 3] ") :value nil :explanation (arrays-of-different-length 10 22 "[1, > 2, > > 3] " "(linenum:0,\n[1, 2, 3] " first-mismatch-at 0)) > > FAILED ob-maxima/string-input ((should (equal "- sin(x)" > > (org-babel-execute-src-block))) :form (equal "- sin(x)" (("(linenum:0," > "") > > ("-" "sin(x)"))) :value nil :explanation (different-types "- sin(x)" > > (("(linenum:0," "") ("-" "sin(x)")))) > > FAILED ob-maxima/table-input1 ((should (equal "[[2.0], [3.0]] " > > (org-babel-execute-src-block))) :form (equal "[[2.0], [3.0]] " > > "(linenum:0,\n[[2.0], [3.0]] ") :value nil :explanation > > (arrays-of-different-length 15 27 "[[2.0], [3.0]] " "(linenum:0,\n[[2.0], > > [3.0]] " first-mismatch-at 0)) > > FAILED ob-maxima/table-input2 ((should (equal "[[2.0, 3.0]] " > > (org-babel-execute-src-block))) :form (equal "[[2.0, 3.0]] " > > "(linenum:0,\n[[2.0, 3.0]] ") :value nil :explanation > > (arrays-of-different-length 13 25 "[[2.0, 3.0]] " "(linenum:0,\n[[2.0, > > 3.0]] " first-mismatch-at 0)) > > FAILED test-org-table/sort-lines ((should (equal "| a | x |\n| B | 4 > > |\n| c | 3 |\n" (org-test-with-temp-text "| <point>a | x |\n| c | 3 |\n| > B > > | 4 |\n" (org-table-sort-lines nil 97) (buffer-string)))) :form (equal > "| a > > | x |\n| B | 4 |\n| c | 3 |\n" #("| B | 4 |\n| a | x |\n| c | 3 |\n" 0 9 > > (face org-table) 9 10 (face org-table-row) 10 19 (face org-table) 19 20 > > (face org-table-row) 20 29 (face org-table) 29 30 (face org-table-row))) > > :value nil :explanation (array-elt 2 (different-atoms (97 "#x61" "?a") > (66 > > "#x42" "?B")))) > > > > 13 skipped results: > > SKIPPED org-missing-dependency/test-ob-R ((skip-unless nil) :form nil > > :value nil) > > SKIPPED org-missing-dependency/test-ob-clojure ((skip-unless nil) > :form > > nil :value nil) > > SKIPPED org-missing-dependency/test-ob-haskell-ghci ((skip-unless > nil) > > :form nil :value nil) > > SKIPPED org-missing-dependency/test-ob-julia ((skip-unless nil) :form > > nil :value nil) > > SKIPPED org-missing-dependency/test-ob-lua ((skip-unless nil) :form > nil > > :value nil) > > SKIPPED org-missing-dependency/test-ob-octave ((skip-unless nil) > :form > > nil :value nil) > > SKIPPED org-missing-dependency/test-ob-python ((skip-unless nil) > :form > > nil :value nil) > > SKIPPED org-missing-dependency/test-ob-ruby ((skip-unless nil) :form > > nil :value nil) > > SKIPPED org-missing-dependency/test-ob-scheme ((skip-unless nil) > :form > > nil :value nil) > > SKIPPED org-missing-dependency/test-org-attach-git ((skip-unless nil) > > :form nil :value nil) > > SKIPPED test-ob-shell/bash-uses-assoc-arrays ((skip-unless (if-let > > ((bash (executable-find "bash"))) (eq 0 (process-file bash nil nil nil > "-c" > > "declare -A assoc_array")))) :form (let* ((bash (and t (executable-find > > "bash")))) (if bash (eq 0 (process-file bash nil nil nil "-c" "declare -A > > assoc_array")) nil)) :value nil) > > SKIPPED test-ob-shell/bash-uses-assoc-arrays-with-lists ((skip-unless > > (if-let ((bash (executable-find "bash"))) (eq 0 (process-file bash nil > nil > > nil "-c" "declare -A assoc_array")))) :form (let* ((bash (and t > > (executable-find "bash")))) (if bash (eq 0 (process-file bash nil nil nil > > "-c" "declare -A assoc_array")) nil)) :value nil) > > SKIPPED test-org-fold/org-fold-display-inline-images ((skip-unless > (not > > noninteractive)) :form (not t) :value nil) > > > > make: *** [test] Error 1 > > > > > > > > > > > > > > On Wed, Sep 18, 2024 at 3:43 AM Ihor Radchenko <yantar92@posteo.net> > wrote: > > > >> Benjamin McMillan <mcmillanbb@gmail.com> writes: > >> > >> > I attach the patch here. > >> > >> Thanks! > >> > >> > However, I have two questions. > >> > First, I am not certain that I set up the repository correctly, > because > >> > when I run "make test" it generates 55 unexpected failures. This > without > >> > making any changes. > >> > (The patch submitted here does not generate any new failures.) > >> > >> That's odd. May you share the log? > >> > >> > Second, the existing comment at the patch becomes slightly out of date > >> with > >> > the change. > >> > >> Then, may you please update the comment? > >> > >> Also, may you change the commit message to not sound like it is a new > >> feature? Just explain the purpose of the change as you did in this > >> email thread (but shorter, and then add a link to this thread). > >> > >> > In fact, I propose that it might be good to update the docstring for > >> > `org-src-fontify-natively' to explicitly state that it enable > >> fontification > >> > for src, example, and export blocks. > >> > >> I'd rather not document this in `org-src-fontify-natively'. The name of > >> this variable does not really hint that it has anything to do with > >> export or example blocks. > >> > >> We may eventually rename it to something more generic, but example > >> blocks may need to be re-considered because specifying language of the > >> example block is not even a part of Org syntax. So, generalizing and > >> documenting this is a bit tricky. > >> > >> -- > >> 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> > >> > > From c245df2136778fd34d3ed263208331ca4e35e54d Mon Sep 17 00:00:00 2001 > > From: Benjamin McMillan <mcmillanbb@gmail.com> > > Date: Fri, 20 Sep 2024 23:43:55 +0900 > > Subject: [PATCH] lisp/org.el: Add "export" to list of native fontified > blocks > > > > * lisp/org.el (org-fontify-meta-lines-and-blocks-1): Add "export" to > > list of block types that are fontified if org-src-fontify-natively > > is non-nil. > > > > Link: https://list.orgmode.org/87h6aejf17.fsf@localhost/ > > TINYCHANGE > > --- > > lisp/org.el | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/lisp/org.el b/lisp/org.el > > index d5c1dcb35..df58b47be 100644 > > --- a/lisp/org.el > > +++ b/lisp/org.el > > @@ -5490,14 +5490,14 @@ by a #." > > (org-remove-flyspell-overlays-in nl-before-endline > end-of-endline) > > (cond > > ((and org-src-fontify-natively > > - ;; Technically, according to > > + ;; Technically, according to the > > ;; `org-src-fontify-natively' docstring, we should > > ;; only fontify src blocks. However, it is common > > - ;; to use undocumented fontification of example > > - ;; blocks with undocumented language specifier. > > - ;; Keep this undocumented feature for user > > - ;; convenience. > > - (member block-type '("src" "example"))) > > + ;; to use undocumented fontification of export and > > + ;; example blocks. (The latter which do not support a > > + ;; language specifier.) Keep this undocumented > feature > > + ;; for user convenience. > > + (member block-type '("src" "export" "example"))) > > (save-match-data > > (org-src-font-lock-fontify-block (or lang "") > block-start block-end)) > > (add-text-properties bol-after-beginline block-end > '(src-block t))) > > -- > > 2.46.0 > > > > -- > 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> > [-- Attachment #2: Type: text/html, Size: 31950 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-09-23 13:17 ` Benjamin McMillan @ 2024-11-03 18:00 ` Ihor Radchenko 2024-11-04 12:58 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-11-03 18:00 UTC (permalink / raw) To: Benjamin McMillan; +Cc: emacs-orgmode Benjamin McMillan <mcmillanbb@gmail.com> writes: > Thank you! > And you are right, I haven't installed java on this computer, and a > terminal call to java returns the message "The operation couldn’t be > completed. Unable to locate a Java Runtime." > Is that expected behavior? I'm not very familiar with testing frameworks, > but wouldn't expect that the environment should be a source of failed tests > like that. Org's test suite checks whether java and javac executables are available, and disabled tests otherwise. However, on your system, "java" command is available, but is not working. What happens if you type "java --version"? -- 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-11-03 18:00 ` Ihor Radchenko @ 2024-11-04 12:58 ` Benjamin McMillan 2024-11-04 20:13 ` Ihor Radchenko 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-11-04 12:58 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1403 bytes --] A call of "java --version" returns "The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java." This is on a mac, it seems that they provide a stub of java, but not the full environment. Is it possible that the test suite takes this response to mean that java is available, even though it is not? On Mon, Nov 4, 2024 at 2:58 AM Ihor Radchenko <yantar92@posteo.net> wrote: > Benjamin McMillan <mcmillanbb@gmail.com> writes: > > > Thank you! > > And you are right, I haven't installed java on this computer, and a > > terminal call to java returns the message "The operation couldn’t be > > completed. Unable to locate a Java Runtime." > > Is that expected behavior? I'm not very familiar with testing frameworks, > > but wouldn't expect that the environment should be a source of failed > tests > > like that. > > Org's test suite checks whether java and javac executables are available, > and disabled tests otherwise. However, on your system, "java" command > is available, but is not working. > > What happens if you type "java --version"? > > -- > 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> > [-- Attachment #2: Type: text/html, Size: 2196 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-11-04 12:58 ` Benjamin McMillan @ 2024-11-04 20:13 ` Ihor Radchenko 2024-11-05 1:00 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-11-04 20:13 UTC (permalink / raw) To: Benjamin McMillan; +Cc: emacs-orgmode Benjamin McMillan <mcmillanbb@gmail.com> writes: > A call of "java --version" returns > "The operation couldn’t be completed. Unable to locate a Java Runtime. > Please visit http://www.java.com for information on installing Java." > This is on a mac, it seems that they provide a stub of java, but not the > full environment. Hmm. What about the return code? Something like java --version && echo "yes" || echo "no" > Is it possible that the test suite takes this response to mean that java is > available, even though it is not? The test simply checks if there is an executable. Whether it is working or not is not tested. Maybe we can use java --version somehow (as in the above). -- 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-11-04 20:13 ` Ihor Radchenko @ 2024-11-05 1:00 ` Benjamin McMillan 2024-11-09 14:55 ` Ihor Radchenko 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-11-05 1:00 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1259 bytes --] Yes, that seems to work. It returns: "The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java. no" On Tue, Nov 5, 2024 at 5:11 AM Ihor Radchenko <yantar92@posteo.net> wrote: > Benjamin McMillan <mcmillanbb@gmail.com> writes: > > > A call of "java --version" returns > > "The operation couldn’t be completed. Unable to locate a Java Runtime. > > Please visit http://www.java.com for information on installing Java." > > This is on a mac, it seems that they provide a stub of java, but not the > > full environment. > > Hmm. What about the return code? Something like > java --version && echo "yes" || echo "no" > > > Is it possible that the test suite takes this response to mean that java > is > > available, even though it is not? > > The test simply checks if there is an executable. Whether it is working > or not is not tested. > > Maybe we can use java --version somehow (as in the above). > > -- > 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> > [-- Attachment #2: Type: text/html, Size: 2101 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-11-05 1:00 ` Benjamin McMillan @ 2024-11-09 14:55 ` Ihor Radchenko 2024-11-10 13:26 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-11-09 14:55 UTC (permalink / raw) To: Benjamin McMillan; +Cc: emacs-orgmode Benjamin McMillan <mcmillanbb@gmail.com> writes: > Yes, that seems to work. It returns: > "The operation couldn’t be completed. Unable to locate a Java Runtime. > Please visit http://www.java.com for information on installing Java. > > no" I just updated main with a patch that should detect scenarios like yours and skip java tests. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cab233fb96 May you try running "make test" on the latest main? -- 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-11-09 14:55 ` Ihor Radchenko @ 2024-11-10 13:26 ` Benjamin McMillan 2024-11-12 19:12 ` Ihor Radchenko 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-11-10 13:26 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 6496 bytes --] Yes, that fixes the java related errors, thanks! The test output now: Ran 1243 tests, 1214 results as expected, 14 unexpected, 15 skipped (2024-11-10 21:57:05+0900, 86.333090 sec) The remaining unexpected fails are mostly maxima tests. I do have some version of maxima installed, but never use it, so no idea if it is integrated into emacs (and (featurep 'ob-maxima) returns nil). I copy the output here in case useful: FAILED ob-maxima/batch+verbatim ((should (equal (org-babel-execute-src-block) "(assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n gamma(z + 1)")) :form (equal "(linenum:0,\n(assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n gamma(z + 1)" "(assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n gamma(z + 1)") :value nil :explanation (arrays-of-different-length 104 92 "(linenum:0,\n(assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n gamma(z + 1)" "(assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n gamma(z + 1)" first-mismatch-at 1)) FAILED ob-maxima/batch+verbatim+:lisp ((should (equal (org-babel-execute-src-block) "((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))")) :form (equal "(%i1) (linenum:0,\n((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))" "((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))") :value nil :explanation (arrays-of-different-length 53 35 "(%i1) (linenum:0,\n((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))" "((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z))" first-mismatch-at 1)) FAILED ob-maxima/batch+verbatim+empty-string ((should (equal (org-babel-execute-src-block) "(%i1) \"\"\n(%o1) ")) :form (equal "(%i1) (linenum:0,\n(%i1) \"\"\n(%o1) " "(%i1) \"\"\n(%o1) ") :value nil :explanation (arrays-of-different-length 33 15 "(%i1) (linenum:0,\n(%i1) \"\"\n(%o1) " "(%i1) \"\"\n(%o1) " first-mismatch-at 6)) FAILED ob-maxima/batch+verbatim+empty-string-vq ((should (equal (org-babel-execute-src-block) "\"\"\n ")) :form (equal "(linenum:0,\n\"\"\n " "\"\"\n ") :value nil :explanation (arrays-of-different-length 16 4 "(linenum:0,\n\"\"\n " "\"\"\n " first-mismatch-at 0)) FAILED ob-maxima/batch+verbatim+quiet ((should (equal (org-babel-execute-src-block) "(%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) gamma(z + 1)")) :form (equal "(%i1) (linenum:0,\n(%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) gamma(z + 1)" "(%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) gamma(z + 1)") :value nil :explanation (arrays-of-different-length 116 98 "(%i1) (linenum:0,\n(%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) gamma(z + 1)" "(%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf))\n(%o1) gamma(z + 1)" first-mismatch-at 7)) FAILED ob-maxima/batch+verbatim+whitespace-string ((should (equal (org-babel-execute-src-block) "(%i1) \" \"\n(%o1) ")) :form (equal "(%i1) (linenum:0,\n(%i1) \" \"\n(%o1) " "(%i1) \" \"\n(%o1) ") :value nil :explanation (arrays-of-different-length 68 50 "(%i1) (linenum:0,\n(%i1) \" \"\n(%o1) " "(%i1) \" \"\n(%o1) " first-mismatch-at 6)) FAILED ob-maxima/integer-input ((should (equal 4 (org-babel-execute-src-block))) :form (equal 4 (("(linenum:0,") (4))) :value nil :explanation (different-types 4 (("(linenum:0,") (4)))) FAILED ob-maxima/list-input ((should (equal "[2, [2, 3], 4] " (org-babel-execute-src-block))) :form (equal "[2, [2, 3], 4] " "(linenum:0,\n[2, [2, 3], 4] ") :value nil :explanation (arrays-of-different-length 15 27 "[2, [2, 3], 4] " "(linenum:0,\n[2, [2, 3], 4] " first-mismatch-at 0)) FAILED ob-maxima/matrix-output ((should (equal '((1 2 3) (2 3 4) (3 4 5)) (org-babel-execute-src-block))) :form (equal ((1 2 3) (2 3 4) (3 4 5)) (("(linenum:0," "" "") (1 2 3) (2 3 4) (3 4 5))) :value nil :explanation (proper-lists-of-different-length 3 4 ((1 2 3) (2 3 4) (3 4 5)) (("(linenum:0," "" "") (1 2 3) (2 3 4) (3 4 5)) first-mismatch-at 0)) FAILED ob-maxima/simple-list-input ((should (equal "[1, 2, 3] " (org-babel-execute-src-block))) :form (equal "[1, 2, 3] " "(linenum:0,\n[1, 2, 3] ") :value nil :explanation (arrays-of-different-length 10 22 "[1, 2, 3] " "(linenum:0,\n[1, 2, 3] " first-mismatch-at 0)) FAILED ob-maxima/string-input ((should (equal "- sin(x)" (org-babel-execute-src-block))) :form (equal "- sin(x)" (("(linenum:0," "") ("-" "sin(x)"))) :value nil :explanation (different-types "- sin(x)" (("(linenum:0," "") ("-" "sin(x)")))) FAILED ob-maxima/table-input1 ((should (equal "[[2.0], [3.0]] " (org-babel-execute-src-block))) :form (equal "[[2.0], [3.0]] " "(linenum:0,\n[[2.0], [3.0]] ") :value nil :explanation (arrays-of-different-length 15 27 "[[2.0], [3.0]] " "(linenum:0,\n[[2.0], [3.0]] " first-mismatch-at 0)) FAILED ob-maxima/table-input2 ((should (equal "[[2.0, 3.0]] " (org-babel-execute-src-block))) :form (equal "[[2.0, 3.0]] " "(linenum:0,\n[[2.0, 3.0]] ") :value nil :explanation (arrays-of-different-length 13 25 "[[2.0, 3.0]] " "(linenum:0,\n[[2.0, 3.0]] " first-mismatch-at 0)) FAILED test-org-table/sort-lines ((should (equal "| a | x |\n| B | 4 |\n| c | 3 |\n" (org-test-with-temp-text "| <point>a | x |\n| c | 3 |\n| B | 4 |\n" (org-table-sort-lines nil 97) (buffer-string)))) :form (equal "| a | x |\n| B | 4 |\n| c | 3 |\n" #("| B | 4 |\n| a | x |\n| c | 3 |\n" 0 9 (face org-table) 9 10 (face org-table-row) 10 19 (face org-table) 19 20 (face org-table-row) 20 29 (face org-table) 29 30 (face org-table-row))) :value nil :explanation (array-elt 2 (different-atoms (97 "#x61" "?a") (66 "#x42" "?B")))) On Sat, Nov 9, 2024 at 11:54 PM Ihor Radchenko <yantar92@posteo.net> wrote: > Benjamin McMillan <mcmillanbb@gmail.com> writes: > > > Yes, that seems to work. It returns: > > "The operation couldn’t be completed. Unable to locate a Java Runtime. > > Please visit http://www.java.com for information on installing Java. > > > > no" > > I just updated main with a patch that should detect scenarios like > yours and skip java tests. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cab233fb96 > > May you try running "make test" on the latest main? > > -- > 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> > [-- Attachment #2: Type: text/html, Size: 8897 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-11-10 13:26 ` Benjamin McMillan @ 2024-11-12 19:12 ` Ihor Radchenko 2024-11-14 5:59 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-11-12 19:12 UTC (permalink / raw) To: Benjamin McMillan; +Cc: emacs-orgmode Benjamin McMillan <mcmillanbb@gmail.com> writes: > The remaining unexpected fails are mostly maxima tests. > I do have some version of maxima installed, but never use it, so no idea if > it is integrated into emacs (and (featurep 'ob-maxima) returns nil). May you check the maxima version? -- 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-11-12 19:12 ` Ihor Radchenko @ 2024-11-14 5:59 ` Benjamin McMillan 2024-11-23 19:15 ` Ihor Radchenko 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-11-14 5:59 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 702 bytes --] Sure, a call of maxima --version returns Maxima 5.47.0 On Wed, Nov 13, 2024 at 4:10 AM Ihor Radchenko <yantar92@posteo.net> wrote: > Benjamin McMillan <mcmillanbb@gmail.com> writes: > > > The remaining unexpected fails are mostly maxima tests. > > I do have some version of maxima installed, but never use it, so no idea > if > > it is integrated into emacs (and (featurep 'ob-maxima) returns nil). > > May you check the maxima version? > > -- > 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> > [-- Attachment #2: Type: text/html, Size: 1366 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-11-14 5:59 ` Benjamin McMillan @ 2024-11-23 19:15 ` Ihor Radchenko 2024-11-24 6:02 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-11-23 19:15 UTC (permalink / raw) To: Benjamin McMillan; +Cc: emacs-orgmode Benjamin McMillan <mcmillanbb@gmail.com> writes: > Sure, a call of > maxima --version > returns > Maxima 5.47.0 I have the same and all the tests are passing. Might be something Mac-related. What if you try 1. M-: (require 'ob-maxima) 2. Evaluate the following src block #+begin_src maxima :var s=4 print(s); #+end_src -- 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] 2024-11-23 19:15 ` Ihor Radchenko @ 2024-11-24 6:02 ` Benjamin McMillan 2024-12-08 12:24 ` [BUG] ob-maxima outputs linenum:0 in results on MacOS (was: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)]) Ihor Radchenko 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-11-24 6:02 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1352 bytes --] This outputs #+RESULTS: | (linenum:0, | | 4 | I suppose the issue is the "linenum:0". In fact, running any of the test src blocks does that, e.g. #+begin_src maxima :results verbatim :batch batch (assume(z>0), integrate(exp(-t)*t^z, t, 0, inf)); #+end_src #+RESULTS: #+begin_example (linenum:0, (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) gamma(z + 1) #+end_example This does not match the (should (equal ...)) in test-ob-maxima.el I don't know maxima, and haven't made any explicit modifications regards it, so I don't know why my setup would be outputting linenum:0 On Sun, Nov 24, 2024 at 4:13 AM Ihor Radchenko <yantar92@posteo.net> wrote: > Benjamin McMillan <mcmillanbb@gmail.com> writes: > > > Sure, a call of > > maxima --version > > returns > > Maxima 5.47.0 > > I have the same and all the tests are passing. > Might be something Mac-related. > > What if you try > > 1. M-: (require 'ob-maxima) > > 2. Evaluate the following src block > > #+begin_src maxima :var s=4 > print(s); > #+end_src > > -- > 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> > [-- Attachment #2: Type: text/html, Size: 2216 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* [BUG] ob-maxima outputs linenum:0 in results on MacOS (was: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)]) 2024-11-24 6:02 ` Benjamin McMillan @ 2024-12-08 12:24 ` Ihor Radchenko 2024-12-09 15:11 ` [BUG] ob-maxima outputs linenum:0 in results on MacOS Leo Butler 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-12-08 12:24 UTC (permalink / raw) To: Benjamin McMillan, Leo Butler; +Cc: emacs-orgmode Benjamin McMillan <mcmillanbb@gmail.com> writes: > This outputs > #+RESULTS: > | (linenum:0, | > | 4 | > > I suppose the issue is the "linenum:0". In fact, running any of the test > src blocks does that, e.g. > #+begin_src maxima :results verbatim :batch batch > (assume(z>0), > integrate(exp(-t)*t^z, t, 0, inf)); > #+end_src > > #+RESULTS: > #+begin_example > (linenum:0, > (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) > gamma(z + 1) > #+end_example > This does not match the (should (equal ...)) in test-ob-maxima.el > > I don't know maxima, and haven't made any explicit modifications regards > it, so I don't know why my setup would be outputting linenum:0 Setting linenum was introduced in https://list.orgmode.org/orgmode/87jzsrai3x.fsf@localhost/ It clearly does not affect Linux, but Maxima on MacOS appears to have slightly different behavior. I am CCing the author of the original patch that introduced this setting. Leo, maybe you have some insight? Unless we can do something to solve the problem on Mac, I am tentatively inclined to revert the linenum part of the patch, so that ob-maxima is not broken on MacOS. -- Ihor Radchenko // yantar92, Org mode maintainer, 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-08 12:24 ` [BUG] ob-maxima outputs linenum:0 in results on MacOS (was: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)]) Ihor Radchenko @ 2024-12-09 15:11 ` Leo Butler 2024-12-09 20:17 ` Leo Butler 0 siblings, 1 reply; 32+ messages in thread From: Leo Butler @ 2024-12-09 15:11 UTC (permalink / raw) To: Ihor Radchenko; +Cc: Benjamin McMillan, emacs-orgmode@gnu.org On Sun, Dec 08 2024, Ihor Radchenko <yantar92@posteo.net> wrote: > Benjamin McMillan <mcmillanbb@gmail.com> writes: > >> This outputs >> #+RESULTS: >> | (linenum:0, | >> | 4 | >> >> I suppose the issue is the "linenum:0". In fact, running any of the test >> src blocks does that, e.g. >> #+begin_src maxima :results verbatim :batch batch >> (assume(z>0), >> integrate(exp(-t)*t^z, t, 0, inf)); >> #+end_src >> >> #+RESULTS: >> #+begin_example >> (linenum:0, >> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) >> gamma(z + 1) >> #+end_example >> This does not match the (should (equal ...)) in test-ob-maxima.el >> >> I don't know maxima, and haven't made any explicit modifications regards >> it, so I don't know why my setup would be outputting linenum:0 > > Setting linenum was introduced in > https://list.orgmode.org/orgmode/87jzsrai3x.fsf@localhost/ > > It clearly does not affect Linux, but Maxima on MacOS appears to have > slightly different behavior. > > I am CCing the author of the original patch that introduced this setting. > Leo, maybe you have some insight? > > Unless we can do something to solve the problem on Mac, I am tentatively > inclined to revert the linenum part of the patch, so that ob-maxima is > not broken on MacOS. Benjamin, Could you include the output of #+begin_src maxima :results verbatim build_info(); #+end_src , please? I think the bug is in the Mac build of Maxima, but I need more information to figure it out. Best, Leo ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-09 15:11 ` [BUG] ob-maxima outputs linenum:0 in results on MacOS Leo Butler @ 2024-12-09 20:17 ` Leo Butler 2024-12-10 8:58 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Leo Butler @ 2024-12-09 20:17 UTC (permalink / raw) To: Ihor Radchenko; +Cc: Benjamin McMillan, emacs-orgmode@gnu.org On Mon, Dec 09 2024, Leo Butler <Leo.Butler@umanitoba.ca> wrote: > On Sun, Dec 08 2024, Ihor Radchenko <yantar92@posteo.net> wrote: > >> Benjamin McMillan <mcmillanbb@gmail.com> writes: >> >>> This outputs >>> #+RESULTS: >>> | (linenum:0, | >>> | 4 | >>> >>> I suppose the issue is the "linenum:0". In fact, running any of the test >>> src blocks does that, e.g. >>> #+begin_src maxima :results verbatim :batch batch >>> (assume(z>0), >>> integrate(exp(-t)*t^z, t, 0, inf)); >>> #+end_src >>> >>> #+RESULTS: >>> #+begin_example >>> (linenum:0, >>> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) >>> gamma(z + 1) >>> #+end_example >>> This does not match the (should (equal ...)) in test-ob-maxima.el >>> >>> I don't know maxima, and haven't made any explicit modifications regards >>> it, so I don't know why my setup would be outputting linenum:0 Benjamin, When you execute your source code block, ob-maxima prints the shell command as a message. Could you copy that shell command from *Messages* and send it, along with the batch file that ob-maxima creates? Thanks, Leo >> >> Setting linenum was introduced in >> https://list.orgmode.org/orgmode/87jzsrai3x.fsf@localhost/ >> >> It clearly does not affect Linux, but Maxima on MacOS appears to have >> slightly different behavior. >> >> I am CCing the author of the original patch that introduced this setting. >> Leo, maybe you have some insight? >> >> Unless we can do something to solve the problem on Mac, I am tentatively >> inclined to revert the linenum part of the patch, so that ob-maxima is >> not broken on MacOS. > > Benjamin, > Could you include the output of > > #+begin_src maxima :results verbatim > build_info(); > #+end_src > > , please? I think the bug is in the Mac build of Maxima, but I need more > information to figure it out. > > Best, > Leo ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-09 20:17 ` Leo Butler @ 2024-12-10 8:58 ` Benjamin McMillan 2024-12-10 18:02 ` Leo Butler 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-12-10 8:58 UTC (permalink / raw) To: Leo Butler; +Cc: Ihor Radchenko, emacs-orgmode@gnu.org [-- Attachment #1.1: Type: text/plain, Size: 2730 bytes --] Hi Leo, I get the following output: #+RESULTS: #+begin_example (linenum:0, #+end_example and from *messages*: Executing Maxima source code block maxima -r \(linenum\:0\,\ batchload\(\"/var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/maxima-Swf2M2.max\"\)\)\$ --very-quiet Wrote /var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/ob-input-Rbgtzp Code block evaluation complete (took 0.1s). The contents of that file (which I also attach) are: build_info(); If there's more information I can give, just let me know. Thanks, Benjamin On Tue, Dec 10, 2024 at 9:17 AM Leo Butler <Leo.Butler@umanitoba.ca> wrote: > On Mon, Dec 09 2024, Leo Butler <Leo.Butler@umanitoba.ca> wrote: > > > On Sun, Dec 08 2024, Ihor Radchenko <yantar92@posteo.net> wrote: > > > >> Benjamin McMillan <mcmillanbb@gmail.com> writes: > >> > >>> This outputs > >>> #+RESULTS: > >>> | (linenum:0, | > >>> | 4 | > >>> > >>> I suppose the issue is the "linenum:0". In fact, running any of the > test > >>> src blocks does that, e.g. > >>> #+begin_src maxima :results verbatim :batch batch > >>> (assume(z>0), > >>> integrate(exp(-t)*t^z, t, 0, inf)); > >>> #+end_src > >>> > >>> #+RESULTS: > >>> #+begin_example > >>> (linenum:0, > >>> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) > >>> gamma(z + 1) > >>> #+end_example > >>> This does not match the (should (equal ...)) in test-ob-maxima.el > >>> > >>> I don't know maxima, and haven't made any explicit modifications > regards > >>> it, so I don't know why my setup would be outputting linenum:0 > > Benjamin, > When you execute your source code block, ob-maxima prints the shell > command as a message. Could you copy that shell command from *Messages* > and send it, along with the batch file that ob-maxima creates? > > Thanks, > Leo > > >> > >> Setting linenum was introduced in > >> https://list.orgmode.org/orgmode/87jzsrai3x.fsf@localhost/ > >> > >> It clearly does not affect Linux, but Maxima on MacOS appears to have > >> slightly different behavior. > >> > >> I am CCing the author of the original patch that introduced this > setting. > >> Leo, maybe you have some insight? > >> > >> Unless we can do something to solve the problem on Mac, I am tentatively > >> inclined to revert the linenum part of the patch, so that ob-maxima is > >> not broken on MacOS. > > > > Benjamin, > > Could you include the output of > > > > #+begin_src maxima :results verbatim > > build_info(); > > #+end_src > > > > , please? I think the bug is in the Mac build of Maxima, but I need more > > information to figure it out. > > > > Best, > > Leo [-- Attachment #1.2: Type: text/html, Size: 3957 bytes --] [-- Attachment #2: maxima-dtnZ7x.max --] [-- Type: application/octet-stream, Size: 14 bytes --] build_info(); ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-10 8:58 ` Benjamin McMillan @ 2024-12-10 18:02 ` Leo Butler 2024-12-12 20:27 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Leo Butler @ 2024-12-10 18:02 UTC (permalink / raw) To: Benjamin McMillan; +Cc: Ihor Radchenko, emacs-orgmode@gnu.org On Tue, Dec 10 2024, Benjamin McMillan <mcmillanbb@gmail.com> wrote: > Hi Leo, > I get the following output: > > #+RESULTS: > > #+begin_example > (linenum:0, > #+end_example > > and from *messages*: > > Executing Maxima source code block > maxima -r \(linenum\:0\,\ > batchload\(\"/var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/maxima-Swf2M2.max\"\)\)\$ > --very-quiet > Wrote > /var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/ob-input-Rbgtzp > Code block evaluation complete (took 0.1s). > > The contents of that file (which I also attach) are: > > build_info(); > > If there's more information I can give, just let me know. > Thanks, > Benjamin > > On Tue, Dec 10, 2024 at 9:17 AM Leo Butler <Leo.Butler@umanitoba.ca> wrote: > >> On Mon, Dec 09 2024, Leo Butler <Leo.Butler@umanitoba.ca> wrote: >> >> > On Sun, Dec 08 2024, Ihor Radchenko <yantar92@posteo.net> wrote: >> > >> >> Benjamin McMillan <mcmillanbb@gmail.com> writes: >> >> >> >>> This outputs >> >>> #+RESULTS: >> >>> | (linenum:0, | >> >>> | 4 | >> >>> >> >>> I suppose the issue is the "linenum:0". In fact, running any of the >> test >> >>> src blocks does that, e.g. >> >>> #+begin_src maxima :results verbatim :batch batch >> >>> (assume(z>0), >> >>> integrate(exp(-t)*t^z, t, 0, inf)); >> >>> #+end_src >> >>> >> >>> #+RESULTS: >> >>> #+begin_example >> >>> (linenum:0, >> >>> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) >> >>> gamma(z + 1) >> >>> #+end_example >> >>> This does not match the (should (equal ...)) in test-ob-maxima.el >> >>> >> >>> I don't know maxima, and haven't made any explicit modifications >> regards >> >>> it, so I don't know why my setup would be outputting linenum:0 >> >> Benjamin, >> When you execute your source code block, ob-maxima prints the shell >> command as a message. Could you copy that shell command from *Messages* >> and send it, along with the batch file that ob-maxima creates? >> >> Thanks, >> Leo >> >> >> >> >> Setting linenum was introduced in >> >> https://list.orgmode.org/orgmode/87jzsrai3x.fsf@localhost/ >> >> >> >> It clearly does not affect Linux, but Maxima on MacOS appears to have >> >> slightly different behavior. >> >> >> >> I am CCing the author of the original patch that introduced this >> setting. >> >> Leo, maybe you have some insight? >> >> >> >> Unless we can do something to solve the problem on Mac, I am tentatively >> >> inclined to revert the linenum part of the patch, so that ob-maxima is >> >> not broken on MacOS. >> > >> > Benjamin, >> > Could you include the output of >> > >> > #+begin_src maxima :results verbatim >> > build_info(); >> > #+end_src >> > >> > , please? I think the bug is in the Mac build of Maxima, but I need more >> > information to figure it out. >> > >> > Best, >> > Leo Hi Benjamin, Let me preface my requests by saying that I do not have access to a Mac, and the problem you are seeing seems to be Mac-specific, so I am searching in the dark for a solution to the problem. I have a couple ideas. * First idea ** Add the regexp =^(linenum:0,= to =org-babel-maxima--output-filter-regexps= #+begin_src elisp :exports none :results raw (add-to-list 'org-babel-maxima--output-filter-regexps "^(linenum:0,") #+end_src ** Evaluate your Maxima code block #+name: max #+begin_src maxima :results raw :batch batch (assume(z>0), integrate(exp(-t)*t^z, t, 0, inf)); #+end_src If all goes well, you should see the output: #+RESULTS: max (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) gamma(z + 1) Please evaluate these code blocks in an Org buffer and tell us how it goes. * Second idea We could introduce a customization variable, e.g. org-babel-maxima-batch/load-format-string, whose default is the current value is "(linenum:0, %s(%S))$". You could change that to "%s(%S)$". I would prefer to see if the first idea works for you, though, before pursuing this. TIA, Leo ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-10 18:02 ` Leo Butler @ 2024-12-12 20:27 ` Benjamin McMillan 2024-12-14 23:11 ` Leo Butler 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-12-12 20:27 UTC (permalink / raw) To: Leo Butler; +Cc: Ihor Radchenko, emacs-orgmode@gnu.org [-- Attachment #1: Type: text/plain, Size: 5042 bytes --] Hi Leo, The first suggestion, to add to org-babel-maxima--output-filter-regexps does fix the src block you ask about here. However, the regexp doesn't match for other maxima tests. For example: #+name: ob-maxima/batch+verbatim #+begin_src maxima :results verbatim :batch batch :cmdline --quiet (assume(z>0), integrate(exp(-t)*t^z, t, 0, inf)); #+end_src #+RESULTS: ob-maxima/batch+verbatim #+begin_example (%i1) (linenum:0, (%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) (%o1) gamma(z + 1) #+end_example Best, Ben On Wed, Dec 11, 2024 at 7:02 AM Leo Butler <Leo.Butler@umanitoba.ca> wrote: > On Tue, Dec 10 2024, Benjamin McMillan <mcmillanbb@gmail.com> wrote: > > > Hi Leo, > > I get the following output: > > > > #+RESULTS: > > > > #+begin_example > > (linenum:0, > > #+end_example > > > > and from *messages*: > > > > Executing Maxima source code block > > maxima -r \(linenum\:0\,\ > > > batchload\(\"/var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/maxima-Swf2M2.max\"\)\)\$ > > --very-quiet > > Wrote > > > /var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/ob-input-Rbgtzp > > Code block evaluation complete (took 0.1s). > > > > The contents of that file (which I also attach) are: > > > > build_info(); > > > > If there's more information I can give, just let me know. > > Thanks, > > Benjamin > > > > On Tue, Dec 10, 2024 at 9:17 AM Leo Butler <Leo.Butler@umanitoba.ca> > wrote: > > > >> On Mon, Dec 09 2024, Leo Butler <Leo.Butler@umanitoba.ca> wrote: > >> > >> > On Sun, Dec 08 2024, Ihor Radchenko <yantar92@posteo.net> wrote: > >> > > >> >> Benjamin McMillan <mcmillanbb@gmail.com> writes: > >> >> > >> >>> This outputs > >> >>> #+RESULTS: > >> >>> | (linenum:0, | > >> >>> | 4 | > >> >>> > >> >>> I suppose the issue is the "linenum:0". In fact, running any of the > >> test > >> >>> src blocks does that, e.g. > >> >>> #+begin_src maxima :results verbatim :batch batch > >> >>> (assume(z>0), > >> >>> integrate(exp(-t)*t^z, t, 0, inf)); > >> >>> #+end_src > >> >>> > >> >>> #+RESULTS: > >> >>> #+begin_example > >> >>> (linenum:0, > >> >>> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) > >> >>> gamma(z + 1) > >> >>> #+end_example > >> >>> This does not match the (should (equal ...)) in test-ob-maxima.el > >> >>> > >> >>> I don't know maxima, and haven't made any explicit modifications > >> regards > >> >>> it, so I don't know why my setup would be outputting linenum:0 > >> > >> Benjamin, > >> When you execute your source code block, ob-maxima prints the shell > >> command as a message. Could you copy that shell command from *Messages* > >> and send it, along with the batch file that ob-maxima creates? > >> > >> Thanks, > >> Leo > >> > >> >> > >> >> Setting linenum was introduced in > >> >> https://list.orgmode.org/orgmode/87jzsrai3x.fsf@localhost/ > >> >> > >> >> It clearly does not affect Linux, but Maxima on MacOS appears to have > >> >> slightly different behavior. > >> >> > >> >> I am CCing the author of the original patch that introduced this > >> setting. > >> >> Leo, maybe you have some insight? > >> >> > >> >> Unless we can do something to solve the problem on Mac, I am > tentatively > >> >> inclined to revert the linenum part of the patch, so that ob-maxima > is > >> >> not broken on MacOS. > >> > > >> > Benjamin, > >> > Could you include the output of > >> > > >> > #+begin_src maxima :results verbatim > >> > build_info(); > >> > #+end_src > >> > > >> > , please? I think the bug is in the Mac build of Maxima, but I need > more > >> > information to figure it out. > >> > > >> > Best, > >> > Leo > > Hi Benjamin, > > Let me preface my requests by saying that I do not have access to a Mac, > and the problem you are seeing seems to be Mac-specific, so I am > searching in the dark for a solution to the problem. > > I have a couple ideas. > > * First idea > ** Add the regexp =^(linenum:0,= to > =org-babel-maxima--output-filter-regexps= > > #+begin_src elisp :exports none :results raw > (add-to-list 'org-babel-maxima--output-filter-regexps "^(linenum:0,") > #+end_src > > ** Evaluate your Maxima code block > > #+name: max > #+begin_src maxima :results raw :batch batch > (assume(z>0), integrate(exp(-t)*t^z, t, 0, inf)); > #+end_src > > If all goes well, you should see the output: > > #+RESULTS: max > (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) > gamma(z + 1) > > Please evaluate these code blocks in an Org buffer and tell us how it > goes. > > * Second idea > > We could introduce a customization variable, e.g. > org-babel-maxima-batch/load-format-string, whose default is the current > value is "(linenum:0, %s(%S))$". You could change that to "%s(%S)$". > > I would prefer to see if the first idea works for you, though, before > pursuing this. > > TIA, > Leo [-- Attachment #2: Type: text/html, Size: 7128 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-12 20:27 ` Benjamin McMillan @ 2024-12-14 23:11 ` Leo Butler 2024-12-15 8:43 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Leo Butler @ 2024-12-14 23:11 UTC (permalink / raw) To: Benjamin McMillan; +Cc: Ihor Radchenko, emacs-orgmode@gnu.org Benjamin, What if you remove the anchor at the beginning of the regexp? Does the following work with the other tests? (add-to-list 'org-babel-maxima--output-filter-regexps "(linenum:0,") Best regards, Leo On Fri, Dec 13 2024, Benjamin McMillan <mcmillanbb@gmail.com> wrote: > Hi Leo, > The first suggestion, to add to org-babel-maxima--output-filter-regexps > does fix the src block you ask about here. > However, the regexp doesn't match for other maxima tests. For example: > > #+name: ob-maxima/batch+verbatim > #+begin_src maxima :results verbatim :batch batch :cmdline --quiet > > (assume(z>0), > integrate(exp(-t)*t^z, t, 0, inf)); > #+end_src > > #+RESULTS: ob-maxima/batch+verbatim > #+begin_example > > (%i1) (linenum:0, > (%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) > (%o1) gamma(z + 1) > #+end_example > > Best, > Ben > > On Wed, Dec 11, 2024 at 7:02 AM Leo Butler <Leo.Butler@umanitoba.ca> wrote: > >> On Tue, Dec 10 2024, Benjamin McMillan <mcmillanbb@gmail.com> wrote: >> >> > Hi Leo, >> > I get the following output: >> > >> > #+RESULTS: >> > >> > #+begin_example >> > (linenum:0, >> > #+end_example >> > >> > and from *messages*: >> > >> > Executing Maxima source code block >> > maxima -r \(linenum\:0\,\ >> > >> batchload\(\"/var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/maxima-Swf2M2.max\"\)\)\$ >> > --very-quiet >> > Wrote >> > >> /var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/ob-input-Rbgtzp >> > Code block evaluation complete (took 0.1s). >> > >> > The contents of that file (which I also attach) are: >> > >> > build_info(); >> > >> > If there's more information I can give, just let me know. >> > Thanks, >> > Benjamin >> > >> > On Tue, Dec 10, 2024 at 9:17 AM Leo Butler <Leo.Butler@umanitoba.ca> >> wrote: >> > >> >> On Mon, Dec 09 2024, Leo Butler <Leo.Butler@umanitoba.ca> wrote: >> >> >> >> > On Sun, Dec 08 2024, Ihor Radchenko <yantar92@posteo.net> wrote: >> >> > >> >> >> Benjamin McMillan <mcmillanbb@gmail.com> writes: >> >> >> >> >> >>> This outputs >> >> >>> #+RESULTS: >> >> >>> | (linenum:0, | >> >> >>> | 4 | >> >> >>> >> >> >>> I suppose the issue is the "linenum:0". In fact, running any of the >> >> test >> >> >>> src blocks does that, e.g. >> >> >>> #+begin_src maxima :results verbatim :batch batch >> >> >>> (assume(z>0), >> >> >>> integrate(exp(-t)*t^z, t, 0, inf)); >> >> >>> #+end_src >> >> >>> >> >> >>> #+RESULTS: >> >> >>> #+begin_example >> >> >>> (linenum:0, >> >> >>> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) >> >> >>> gamma(z + 1) >> >> >>> #+end_example >> >> >>> This does not match the (should (equal ...)) in test-ob-maxima.el >> >> >>> >> >> >>> I don't know maxima, and haven't made any explicit modifications >> >> regards >> >> >>> it, so I don't know why my setup would be outputting linenum:0 >> >> >> >> Benjamin, >> >> When you execute your source code block, ob-maxima prints the shell >> >> command as a message. Could you copy that shell command from *Messages* >> >> and send it, along with the batch file that ob-maxima creates? >> >> >> >> Thanks, >> >> Leo >> >> >> >> >> >> >> >> Setting linenum was introduced in >> >> >> https://list.orgmode.org/orgmode/87jzsrai3x.fsf@localhost/ >> >> >> >> >> >> It clearly does not affect Linux, but Maxima on MacOS appears to have >> >> >> slightly different behavior. >> >> >> >> >> >> I am CCing the author of the original patch that introduced this >> >> setting. >> >> >> Leo, maybe you have some insight? >> >> >> >> >> >> Unless we can do something to solve the problem on Mac, I am >> tentatively >> >> >> inclined to revert the linenum part of the patch, so that ob-maxima >> is >> >> >> not broken on MacOS. >> >> > >> >> > Benjamin, >> >> > Could you include the output of >> >> > >> >> > #+begin_src maxima :results verbatim >> >> > build_info(); >> >> > #+end_src >> >> > >> >> > , please? I think the bug is in the Mac build of Maxima, but I need >> more >> >> > information to figure it out. >> >> > >> >> > Best, >> >> > Leo >> >> Hi Benjamin, >> >> Let me preface my requests by saying that I do not have access to a Mac, >> and the problem you are seeing seems to be Mac-specific, so I am >> searching in the dark for a solution to the problem. >> >> I have a couple ideas. >> >> * First idea >> ** Add the regexp =^(linenum:0,= to >> =org-babel-maxima--output-filter-regexps= >> >> #+begin_src elisp :exports none :results raw >> (add-to-list 'org-babel-maxima--output-filter-regexps "^(linenum:0,") >> #+end_src >> >> ** Evaluate your Maxima code block >> >> #+name: max >> #+begin_src maxima :results raw :batch batch >> (assume(z>0), integrate(exp(-t)*t^z, t, 0, inf)); >> #+end_src >> >> If all goes well, you should see the output: >> >> #+RESULTS: max >> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) >> gamma(z + 1) >> >> Please evaluate these code blocks in an Org buffer and tell us how it >> goes. >> >> * Second idea >> >> We could introduce a customization variable, e.g. >> org-babel-maxima-batch/load-format-string, whose default is the current >> value is "(linenum:0, %s(%S))$". You could change that to "%s(%S)$". >> >> I would prefer to see if the first idea works for you, though, before >> pursuing this. >> >> TIA, >> Leo ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-14 23:11 ` Leo Butler @ 2024-12-15 8:43 ` Benjamin McMillan 2024-12-16 3:32 ` Leo Butler 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-12-15 8:43 UTC (permalink / raw) To: Leo Butler; +Cc: Ihor Radchenko, emacs-orgmode@gnu.org [-- Attachment #1: Type: text/plain, Size: 6052 bytes --] Dear Leo, Ah right, good idea. That works! Best, Ben On Sun, Dec 15, 2024 at 12:11 PM Leo Butler <Leo.Butler@umanitoba.ca> wrote: > Benjamin, > > What if you remove the anchor at the beginning of the regexp? Does the > following work with the other tests? > > (add-to-list 'org-babel-maxima--output-filter-regexps "(linenum:0,") > > Best regards, > Leo > > On Fri, Dec 13 2024, Benjamin McMillan <mcmillanbb@gmail.com> wrote: > > > Hi Leo, > > The first suggestion, to add to org-babel-maxima--output-filter-regexps > > does fix the src block you ask about here. > > However, the regexp doesn't match for other maxima tests. For example: > > > > #+name: ob-maxima/batch+verbatim > > #+begin_src maxima :results verbatim :batch batch :cmdline --quiet > > > > (assume(z>0), > > integrate(exp(-t)*t^z, t, 0, inf)); > > #+end_src > > > > #+RESULTS: ob-maxima/batch+verbatim > > #+begin_example > > > > (%i1) (linenum:0, > > (%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) > > (%o1) gamma(z + 1) > > #+end_example > > > > Best, > > Ben > > > > On Wed, Dec 11, 2024 at 7:02 AM Leo Butler <Leo.Butler@umanitoba.ca> > wrote: > > > >> On Tue, Dec 10 2024, Benjamin McMillan <mcmillanbb@gmail.com> wrote: > >> > >> > Hi Leo, > >> > I get the following output: > >> > > >> > #+RESULTS: > >> > > >> > #+begin_example > >> > (linenum:0, > >> > #+end_example > >> > > >> > and from *messages*: > >> > > >> > Executing Maxima source code block > >> > maxima -r \(linenum\:0\,\ > >> > > >> > batchload\(\"/var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/maxima-Swf2M2.max\"\)\)\$ > >> > --very-quiet > >> > Wrote > >> > > >> > /var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/ob-input-Rbgtzp > >> > Code block evaluation complete (took 0.1s). > >> > > >> > The contents of that file (which I also attach) are: > >> > > >> > build_info(); > >> > > >> > If there's more information I can give, just let me know. > >> > Thanks, > >> > Benjamin > >> > > >> > On Tue, Dec 10, 2024 at 9:17 AM Leo Butler <Leo.Butler@umanitoba.ca> > >> wrote: > >> > > >> >> On Mon, Dec 09 2024, Leo Butler <Leo.Butler@umanitoba.ca> wrote: > >> >> > >> >> > On Sun, Dec 08 2024, Ihor Radchenko <yantar92@posteo.net> wrote: > >> >> > > >> >> >> Benjamin McMillan <mcmillanbb@gmail.com> writes: > >> >> >> > >> >> >>> This outputs > >> >> >>> #+RESULTS: > >> >> >>> | (linenum:0, | > >> >> >>> | 4 | > >> >> >>> > >> >> >>> I suppose the issue is the "linenum:0". In fact, running any of > the > >> >> test > >> >> >>> src blocks does that, e.g. > >> >> >>> #+begin_src maxima :results verbatim :batch batch > >> >> >>> (assume(z>0), > >> >> >>> integrate(exp(-t)*t^z, t, 0, inf)); > >> >> >>> #+end_src > >> >> >>> > >> >> >>> #+RESULTS: > >> >> >>> #+begin_example > >> >> >>> (linenum:0, > >> >> >>> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) > >> >> >>> gamma(z + 1) > >> >> >>> #+end_example > >> >> >>> This does not match the (should (equal ...)) in test-ob-maxima.el > >> >> >>> > >> >> >>> I don't know maxima, and haven't made any explicit modifications > >> >> regards > >> >> >>> it, so I don't know why my setup would be outputting linenum:0 > >> >> > >> >> Benjamin, > >> >> When you execute your source code block, ob-maxima prints the shell > >> >> command as a message. Could you copy that shell command from > *Messages* > >> >> and send it, along with the batch file that ob-maxima creates? > >> >> > >> >> Thanks, > >> >> Leo > >> >> > >> >> >> > >> >> >> Setting linenum was introduced in > >> >> >> https://list.orgmode.org/orgmode/87jzsrai3x.fsf@localhost/ > >> >> >> > >> >> >> It clearly does not affect Linux, but Maxima on MacOS appears to > have > >> >> >> slightly different behavior. > >> >> >> > >> >> >> I am CCing the author of the original patch that introduced this > >> >> setting. > >> >> >> Leo, maybe you have some insight? > >> >> >> > >> >> >> Unless we can do something to solve the problem on Mac, I am > >> tentatively > >> >> >> inclined to revert the linenum part of the patch, so that > ob-maxima > >> is > >> >> >> not broken on MacOS. > >> >> > > >> >> > Benjamin, > >> >> > Could you include the output of > >> >> > > >> >> > #+begin_src maxima :results verbatim > >> >> > build_info(); > >> >> > #+end_src > >> >> > > >> >> > , please? I think the bug is in the Mac build of Maxima, but I need > >> more > >> >> > information to figure it out. > >> >> > > >> >> > Best, > >> >> > Leo > >> > >> Hi Benjamin, > >> > >> Let me preface my requests by saying that I do not have access to a Mac, > >> and the problem you are seeing seems to be Mac-specific, so I am > >> searching in the dark for a solution to the problem. > >> > >> I have a couple ideas. > >> > >> * First idea > >> ** Add the regexp =^(linenum:0,= to > >> =org-babel-maxima--output-filter-regexps= > >> > >> #+begin_src elisp :exports none :results raw > >> (add-to-list 'org-babel-maxima--output-filter-regexps "^(linenum:0,") > >> #+end_src > >> > >> ** Evaluate your Maxima code block > >> > >> #+name: max > >> #+begin_src maxima :results raw :batch batch > >> (assume(z>0), integrate(exp(-t)*t^z, t, 0, inf)); > >> #+end_src > >> > >> If all goes well, you should see the output: > >> > >> #+RESULTS: max > >> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) > >> gamma(z + 1) > >> > >> Please evaluate these code blocks in an Org buffer and tell us how it > >> goes. > >> > >> * Second idea > >> > >> We could introduce a customization variable, e.g. > >> org-babel-maxima-batch/load-format-string, whose default is the current > >> value is "(linenum:0, %s(%S))$". You could change that to "%s(%S)$". > >> > >> I would prefer to see if the first idea works for you, though, before > >> pursuing this. > >> > >> TIA, > >> Leo [-- Attachment #2: Type: text/html, Size: 9245 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-15 8:43 ` Benjamin McMillan @ 2024-12-16 3:32 ` Leo Butler 2024-12-16 17:44 ` Ihor Radchenko 0 siblings, 1 reply; 32+ messages in thread From: Leo Butler @ 2024-12-16 3:32 UTC (permalink / raw) To: Benjamin McMillan; +Cc: Ihor Radchenko, emacs-orgmode@gnu.org [-- Attachment #1: Type: text/plain, Size: 104 bytes --] Ihor, Attached is a patch to fix the problem that Benjamin has encountered. Best regards, Leo [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-lisp-ob-maxima.el-fix-Mac-related-bug.patch --] [-- Type: text/x-diff; name="0001-lisp-ob-maxima.el-fix-Mac-related-bug.patch", Size: 1596 bytes --] From acc099ca608b59c60f941d8dbff25a17e7adbf8c Mon Sep 17 00:00:00 2001 From: Leo Butler <leo.butler@umanitoba.ca> Date: Sun, 15 Dec 2024 21:20:26 -0600 Subject: [PATCH] lisp/ob-maxima.el: fix Mac-related bug * ob-maxima.el (org-babel-maxima--output-filter-regexps): Filter out lines that include the literal string "(linenum:0,". Benjamin McMillan reports that, on his Mac, this string is appearing in the Maxima output. Maxima is echoing part of the command-line arguments passed to it (but it should not), which appears to be a Mac-specific problem. Benjamin reports that the additional regexp removes the errant strings and that all tests are passed. Reported-By: Benjamin McMillan Link: https://list.orgmode.org/87plm2e50v.fsf@localhost/ --- lisp/ob-maxima.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el index afd615f8d..19d530179 100644 --- a/lisp/ob-maxima.el +++ b/lisp/ob-maxima.el @@ -110,7 +110,8 @@ output. See `org-babel-maxima-expand'.") "\n"))) (defvar org-babel-maxima--output-filter-regexps - '("batch" ;; remove the `batch' or `batchload' line + '("(linenum:0," ;; remove fragment from command-line (see `org-babel-execute:maxima') + "batch" ;; remove the `batch' or `batchload' line "^rat: replaced .*$" ;; remove notices from `rat' "^;;; Loading #P" ;; remove notices from the lisp implementation "^read and interpret" ;; remove notice from `batch' -- 2.45.2 [-- Attachment #3: ATT00001.txt --] [-- Type: text/plain, Size: 6329 bytes --] On Sun, Dec 15 2024, Benjamin McMillan <mcmillanbb@gmail.com> wrote: > Dear Leo, > Ah right, good idea. That works! > Best, > Ben > > On Sun, Dec 15, 2024 at 12:11â¯PM Leo Butler <Leo.Butler@umanitoba.ca> wrote: > >> Benjamin, >> >> What if you remove the anchor at the beginning of the regexp? Does the >> following work with the other tests? >> >> (add-to-list 'org-babel-maxima--output-filter-regexps "(linenum:0,") >> >> Best regards, >> Leo >> >> On Fri, Dec 13 2024, Benjamin McMillan <mcmillanbb@gmail.com> wrote: >> >> > Hi Leo, >> > The first suggestion, to add to org-babel-maxima--output-filter-regexps >> > does fix the src block you ask about here. >> > However, the regexp doesn't match for other maxima tests. For example: >> > >> > #+name: ob-maxima/batch+verbatim >> > #+begin_src maxima :results verbatim :batch batch :cmdline --quiet >> > >> > (assume(z>0), >> > integrate(exp(-t)*t^z, t, 0, inf)); >> > #+end_src >> > >> > #+RESULTS: ob-maxima/batch+verbatim >> > #+begin_example >> > >> > (%i1) (linenum:0, >> > (%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) >> > (%o1) gamma(z + 1) >> > #+end_example >> > >> > Best, >> > Ben >> > >> > On Wed, Dec 11, 2024 at 7:02â¯AM Leo Butler <Leo.Butler@umanitoba.ca> >> wrote: >> > >> >> On Tue, Dec 10 2024, Benjamin McMillan <mcmillanbb@gmail.com> wrote: >> >> >> >> > Hi Leo, >> >> > I get the following output: >> >> > >> >> > #+RESULTS: >> >> > >> >> > #+begin_example >> >> > (linenum:0, >> >> > #+end_example >> >> > >> >> > and from *messages*: >> >> > >> >> > Executing Maxima source code block >> >> > maxima -r \(linenum\:0\,\ >> >> > >> >> >> batchload\(\"/var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/maxima-Swf2M2.max\"\)\)\$ >> >> > --very-quiet >> >> > Wrote >> >> > >> >> >> /var/folders/f5/6nrph1812wdf0nlg4ddcs_580000gn/T/babel-wImUPJ/ob-input-Rbgtzp >> >> > Code block evaluation complete (took 0.1s). >> >> > >> >> > The contents of that file (which I also attach) are: >> >> > >> >> > build_info(); >> >> > >> >> > If there's more information I can give, just let me know. >> >> > Thanks, >> >> > Benjamin >> >> > >> >> > On Tue, Dec 10, 2024 at 9:17â¯AM Leo Butler <Leo.Butler@umanitoba.ca> >> >> wrote: >> >> > >> >> >> On Mon, Dec 09 2024, Leo Butler <Leo.Butler@umanitoba.ca> wrote: >> >> >> >> >> >> > On Sun, Dec 08 2024, Ihor Radchenko <yantar92@posteo.net> wrote: >> >> >> > >> >> >> >> Benjamin McMillan <mcmillanbb@gmail.com> writes: >> >> >> >> >> >> >> >>> This outputs >> >> >> >>> #+RESULTS: >> >> >> >>> | (linenum:0, | >> >> >> >>> | 4 | >> >> >> >>> >> >> >> >>> I suppose the issue is the "linenum:0". In fact, running any of >> the >> >> >> test >> >> >> >>> src blocks does that, e.g. >> >> >> >>> #+begin_src maxima :results verbatim :batch batch >> >> >> >>> (assume(z>0), >> >> >> >>> integrate(exp(-t)*t^z, t, 0, inf)); >> >> >> >>> #+end_src >> >> >> >>> >> >> >> >>> #+RESULTS: >> >> >> >>> #+begin_example >> >> >> >>> (linenum:0, >> >> >> >>> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) >> >> >> >>> gamma(z + 1) >> >> >> >>> #+end_example >> >> >> >>> This does not match the (should (equal ...)) in test-ob-maxima.el >> >> >> >>> >> >> >> >>> I don't know maxima, and haven't made any explicit modifications >> >> >> regards >> >> >> >>> it, so I don't know why my setup would be outputting linenum:0 >> >> >> >> >> >> Benjamin, >> >> >> When you execute your source code block, ob-maxima prints the shell >> >> >> command as a message. Could you copy that shell command from >> *Messages* >> >> >> and send it, along with the batch file that ob-maxima creates? >> >> >> >> >> >> Thanks, >> >> >> Leo >> >> >> >> >> >> >> >> >> >> >> Setting linenum was introduced in >> >> >> >> https://list.orgmode.org/orgmode/87jzsrai3x.fsf@localhost/ >> >> >> >> >> >> >> >> It clearly does not affect Linux, but Maxima on MacOS appears to >> have >> >> >> >> slightly different behavior. >> >> >> >> >> >> >> >> I am CCing the author of the original patch that introduced this >> >> >> setting. >> >> >> >> Leo, maybe you have some insight? >> >> >> >> >> >> >> >> Unless we can do something to solve the problem on Mac, I am >> >> tentatively >> >> >> >> inclined to revert the linenum part of the patch, so that >> ob-maxima >> >> is >> >> >> >> not broken on MacOS. >> >> >> > >> >> >> > Benjamin, >> >> >> > Could you include the output of >> >> >> > >> >> >> > #+begin_src maxima :results verbatim >> >> >> > build_info(); >> >> >> > #+end_src >> >> >> > >> >> >> > , please? I think the bug is in the Mac build of Maxima, but I need >> >> more >> >> >> > information to figure it out. >> >> >> > >> >> >> > Best, >> >> >> > Leo >> >> >> >> Hi Benjamin, >> >> >> >> Let me preface my requests by saying that I do not have access to a Mac, >> >> and the problem you are seeing seems to be Mac-specific, so I am >> >> searching in the dark for a solution to the problem. >> >> >> >> I have a couple ideas. >> >> >> >> * First idea >> >> ** Add the regexp =^(linenum:0,= to >> >> =org-babel-maxima--output-filter-regexps= >> >> >> >> #+begin_src elisp :exports none :results raw >> >> (add-to-list 'org-babel-maxima--output-filter-regexps "^(linenum:0,") >> >> #+end_src >> >> >> >> ** Evaluate your Maxima code block >> >> >> >> #+name: max >> >> #+begin_src maxima :results raw :batch batch >> >> (assume(z>0), integrate(exp(-t)*t^z, t, 0, inf)); >> >> #+end_src >> >> >> >> If all goes well, you should see the output: >> >> >> >> #+RESULTS: max >> >> (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) >> >> gamma(z + 1) >> >> >> >> Please evaluate these code blocks in an Org buffer and tell us how it >> >> goes. >> >> >> >> * Second idea >> >> >> >> We could introduce a customization variable, e.g. >> >> org-babel-maxima-batch/load-format-string, whose default is the current >> >> value is "(linenum:0, %s(%S))$". You could change that to "%s(%S)$". >> >> >> >> I would prefer to see if the first idea works for you, though, before >> >> pursuing this. >> >> >> >> TIA, >> >> Leo ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-16 3:32 ` Leo Butler @ 2024-12-16 17:44 ` Ihor Radchenko 2024-12-17 3:13 ` Leo Butler 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-12-16 17:44 UTC (permalink / raw) To: Leo Butler; +Cc: Benjamin McMillan, emacs-orgmode@gnu.org Leo Butler <Leo.Butler@umanitoba.ca> writes: > Attached is a patch to fix the problem that Benjamin has encountered. Thanks! > + '("(linenum:0," ;; remove fragment from command-line (see `org-babel-execute:maxima') I am a bit worried that such a simple regexp may catch false positives. May we somehow avoid it? For example, what if we put setting linenum into the batch file we generate? -- Ihor Radchenko // yantar92, Org mode maintainer, 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-16 17:44 ` Ihor Radchenko @ 2024-12-17 3:13 ` Leo Butler 2024-12-17 17:36 ` Ihor Radchenko 0 siblings, 1 reply; 32+ messages in thread From: Leo Butler @ 2024-12-17 3:13 UTC (permalink / raw) To: Ihor Radchenko; +Cc: Benjamin McMillan, emacs-orgmode@gnu.org On Mon, Dec 16 2024, Ihor Radchenko <yantar92@posteo.net> wrote: > Leo Butler <Leo.Butler@umanitoba.ca> writes: > >> Attached is a patch to fix the problem that Benjamin has encountered. > > Thanks! > >> + '("(linenum:0," ;; remove fragment from command-line (see `org-babel-execute:maxima') Benjamin, In taking Ihor's concern into account, could you test the regexp "(linenum:0,$" > I am a bit worried that such a simple regexp may catch false positives. > May we somehow avoid it? > For example, what if we put setting linenum into the batch file we generate? Ihor, Putting that into the batch file will result in it appearing in the output of the source-code block. We are trying to stop that. I think, if the above regexp works for Benjamin, then we should use it. The regexp only matches an incomplete (hence mal-formed) line of input, and so it can only match the errant output that Benjamin is seeing. Best regards, Leo ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-17 3:13 ` Leo Butler @ 2024-12-17 17:36 ` Ihor Radchenko 2024-12-17 21:06 ` Leo Butler 0 siblings, 1 reply; 32+ messages in thread From: Ihor Radchenko @ 2024-12-17 17:36 UTC (permalink / raw) To: Leo Butler; +Cc: Benjamin McMillan, emacs-orgmode@gnu.org Leo Butler <Leo.Butler@umanitoba.ca> writes: > Putting that into the batch file will result in it appearing in the > output of the source-code block. We are trying to stop that. FYI, I have basically no experience with Maxima. So, I was simply shooting in the dark. AFAIU, linenum:0 simply sets variable value. If setting a value can be done from inside a script... > I think, if the above regexp works for Benjamin, then we should use > it. The regexp only matches an incomplete (hence mal-formed) line of > input, and so it can only match the errant output that Benjamin is > seeing. Unless we find a better solution, I have no problem with it. It is just that regexp filtering can cause issues, like what we keep seeing again and again with prompt filtering in ob-shell. -- Ihor Radchenko // yantar92, Org mode maintainer, 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> ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-17 17:36 ` Ihor Radchenko @ 2024-12-17 21:06 ` Leo Butler 2024-12-19 8:47 ` Benjamin McMillan 0 siblings, 1 reply; 32+ messages in thread From: Leo Butler @ 2024-12-17 21:06 UTC (permalink / raw) To: Ihor Radchenko; +Cc: Benjamin McMillan, emacs-orgmode@gnu.org On Tue, Dec 17 2024, Ihor Radchenko <yantar92@posteo.net> wrote: > Leo Butler <Leo.Butler@umanitoba.ca> writes: > >> Putting that into the batch file will result in it appearing in the >> output of the source-code block. We are trying to stop that. > > FYI, I have basically no experience with Maxima. So, I was simply > shooting in the dark. AFAIU, linenum:0 simply sets variable value. If > setting a value can be done from inside a script... To explain, Maxima keeps track of the "line numbers" of each complete input in the variable linenum. When it executes the batch script that Org sends it, that command is on line 1, so line numbering in the script would begin at 2. We set linenum to 0 so that the line numbering in the script starts at 1. > >> I think, if the above regexp works for Benjamin, then we should use >> it. The regexp only matches an incomplete (hence mal-formed) line of >> input, and so it can only match the errant output that Benjamin is >> seeing. > > Unless we find a better solution, I have no problem with it. It is just > that regexp filtering can cause issues, like what we keep seeing again > and again with prompt filtering in ob-shell. Agreed. One alternative would be to have Maxima add a command-line option that re-starts line-numbering in a batch file at line 1. That would not fix Benjamin's problem, in the short term, though. Leo ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-17 21:06 ` Leo Butler @ 2024-12-19 8:47 ` Benjamin McMillan 2024-12-20 20:40 ` [PATCH] " Leo Butler 0 siblings, 1 reply; 32+ messages in thread From: Benjamin McMillan @ 2024-12-19 8:47 UTC (permalink / raw) To: Leo Butler; +Cc: Ihor Radchenko, emacs-orgmode@gnu.org [-- Attachment #1: Type: text/plain, Size: 1716 bytes --] The modified suggestion: (add-to-list 'org-babel-maxima--output-filter-regexps "(linenum:0,$") also fixes the problem in the cases that I checked. Benjamin On Wed, Dec 18, 2024 at 10:06 AM Leo Butler <Leo.Butler@umanitoba.ca> wrote: > On Tue, Dec 17 2024, Ihor Radchenko <yantar92@posteo.net> wrote: > > > Leo Butler <Leo.Butler@umanitoba.ca> writes: > > > >> Putting that into the batch file will result in it appearing in the > >> output of the source-code block. We are trying to stop that. > > > > FYI, I have basically no experience with Maxima. So, I was simply > > shooting in the dark. AFAIU, linenum:0 simply sets variable value. If > > setting a value can be done from inside a script... > > To explain, Maxima keeps track of the "line numbers" of each complete > input in the variable linenum. When it executes the batch script that > Org sends it, that command is on line 1, so line numbering in the script > would begin at 2. We set linenum to 0 so that the line numbering in the > script starts at 1. > > > > >> I think, if the above regexp works for Benjamin, then we should use > >> it. The regexp only matches an incomplete (hence mal-formed) line of > >> input, and so it can only match the errant output that Benjamin is > >> seeing. > > > > Unless we find a better solution, I have no problem with it. It is just > > that regexp filtering can cause issues, like what we keep seeing again > > and again with prompt filtering in ob-shell. > > Agreed. One alternative would be to have Maxima add a command-line > option that re-starts line-numbering in a batch file at line 1. That > would not fix Benjamin's problem, in the short term, though. > > Leo [-- Attachment #2: Type: text/html, Size: 2363 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH] Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS 2024-12-19 8:47 ` Benjamin McMillan @ 2024-12-20 20:40 ` Leo Butler 0 siblings, 0 replies; 32+ messages in thread From: Leo Butler @ 2024-12-20 20:40 UTC (permalink / raw) To: Ihor Radchenko, emacs-orgmode@gnu.org; +Cc: Benjamin McMillan [-- Attachment #1: Type: text/plain, Size: 149 bytes --] Ihor, Please find attached the amended patch. All things considered, I think this is the best option to fix the issue that has arisen. Leo [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-lisp-ob-maxima.el-fix-Mac-related-bug.patch --] [-- Type: text/x-diff; name="0001-lisp-ob-maxima.el-fix-Mac-related-bug.patch", Size: 1598 bytes --] From db509cf4b81f78a5c85cf12c7f7b2879f2a47397 Mon Sep 17 00:00:00 2001 From: Leo Butler <leo.butler@umanitoba.ca> Date: Sun, 15 Dec 2024 21:20:26 -0600 Subject: [PATCH] lisp/ob-maxima.el: fix Mac-related bug * ob-maxima.el (org-babel-maxima--output-filter-regexps): Filter out lines that end with the literal string "(linenum:0,". Benjamin McMillan reports that, on his Mac, this string is appearing in the Maxima output. Maxima is echoing part of the command-line arguments passed to it (but it should not), which appears to be a Mac-specific problem. Benjamin reports that the additional regexp removes the errant strings and that all tests are passed. Reported-By: Benjamin McMillan Link: https://list.orgmode.org/87plm2e50v.fsf@localhost/ --- lisp/ob-maxima.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el index afd615f8d..35438a880 100644 --- a/lisp/ob-maxima.el +++ b/lisp/ob-maxima.el @@ -110,7 +110,8 @@ output. See `org-babel-maxima-expand'.") "\n"))) (defvar org-babel-maxima--output-filter-regexps - '("batch" ;; remove the `batch' or `batchload' line + '("(linenum:0,$" ;; remove fragment from command-line (see `org-babel-execute:maxima') + "batch" ;; remove the `batch' or `batchload' line "^rat: replaced .*$" ;; remove notices from `rat' "^;;; Loading #P" ;; remove notices from the lisp implementation "^read and interpret" ;; remove notice from `batch' -- 2.45.2 [-- Attachment #3: ATT00001.txt --] [-- Type: text/plain, Size: 1835 bytes --] On Thu, Dec 19 2024, Benjamin McMillan <mcmillanbb@gmail.com> wrote: > The modified suggestion: > (add-to-list 'org-babel-maxima--output-filter-regexps "(linenum:0,$") > also fixes the problem in the cases that I checked. > > Benjamin > > On Wed, Dec 18, 2024 at 10:06â¯AM Leo Butler <Leo.Butler@umanitoba.ca> wrote: > >> On Tue, Dec 17 2024, Ihor Radchenko <yantar92@posteo.net> wrote: >> >> > Leo Butler <Leo.Butler@umanitoba.ca> writes: >> > >> >> Putting that into the batch file will result in it appearing in the >> >> output of the source-code block. We are trying to stop that. >> > >> > FYI, I have basically no experience with Maxima. So, I was simply >> > shooting in the dark. AFAIU, linenum:0 simply sets variable value. If >> > setting a value can be done from inside a script... >> >> To explain, Maxima keeps track of the "line numbers" of each complete >> input in the variable linenum. When it executes the batch script that >> Org sends it, that command is on line 1, so line numbering in the script >> would begin at 2. We set linenum to 0 so that the line numbering in the >> script starts at 1. >> >> > >> >> I think, if the above regexp works for Benjamin, then we should use >> >> it. The regexp only matches an incomplete (hence mal-formed) line of >> >> input, and so it can only match the errant output that Benjamin is >> >> seeing. >> > >> > Unless we find a better solution, I have no problem with it. It is just >> > that regexp filtering can cause issues, like what we keep seeing again >> > and again with prompt filtering in ob-shell. >> >> Agreed. One alternative would be to have Maxima add a command-line >> option that re-starts line-numbering in a batch file at line 1. That >> would not fix Benjamin's problem, in the short term, though. >> >> Leo ^ permalink raw reply related [flat|nested] 32+ messages in thread
end of thread, other threads:[~2024-12-20 20:41 UTC | newest] Thread overview: 32+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-09-01 4:35 [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)] Benjamin McMillan 2024-09-10 17:01 ` Ihor Radchenko 2024-09-16 14:27 ` Benjamin McMillan 2024-09-17 12:29 ` Benjamin McMillan 2024-09-17 18:44 ` Ihor Radchenko [not found] ` <CALo8A5Vm-gik0qQC7KacNg7kN2VzL0Y1e8_LXxV8S7-we9CYSw@mail.gmail.com> 2024-09-22 9:53 ` Ihor Radchenko 2024-09-23 13:17 ` Benjamin McMillan 2024-11-03 18:00 ` Ihor Radchenko 2024-11-04 12:58 ` Benjamin McMillan 2024-11-04 20:13 ` Ihor Radchenko 2024-11-05 1:00 ` Benjamin McMillan 2024-11-09 14:55 ` Ihor Radchenko 2024-11-10 13:26 ` Benjamin McMillan 2024-11-12 19:12 ` Ihor Radchenko 2024-11-14 5:59 ` Benjamin McMillan 2024-11-23 19:15 ` Ihor Radchenko 2024-11-24 6:02 ` Benjamin McMillan 2024-12-08 12:24 ` [BUG] ob-maxima outputs linenum:0 in results on MacOS (was: [BUG] export blocks no longer fontifying [9.7.10 (release_9.7.10 @ /Users/ben/Scripts/emacs/lisp/org/)]) Ihor Radchenko 2024-12-09 15:11 ` [BUG] ob-maxima outputs linenum:0 in results on MacOS Leo Butler 2024-12-09 20:17 ` Leo Butler 2024-12-10 8:58 ` Benjamin McMillan 2024-12-10 18:02 ` Leo Butler 2024-12-12 20:27 ` Benjamin McMillan 2024-12-14 23:11 ` Leo Butler 2024-12-15 8:43 ` Benjamin McMillan 2024-12-16 3:32 ` Leo Butler 2024-12-16 17:44 ` Ihor Radchenko 2024-12-17 3:13 ` Leo Butler 2024-12-17 17:36 ` Ihor Radchenko 2024-12-17 21:06 ` Leo Butler 2024-12-19 8:47 ` Benjamin McMillan 2024-12-20 20:40 ` [PATCH] " Leo Butler
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).