emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: caroute@free.fr
To: emacs-orgmode@gnu.org
Subject: [BUG] With custom results keyword ([9.7-pre (release_9.6.24-1407-ga2514c)])
Date: Mon, 29 Apr 2024 11:18:47 +0200 (CEST)	[thread overview]
Message-ID: <297951359.-1716480072.1714382327340.JavaMail.root@zimbra71-e12.priv.proxad.net> (raw)
In-Reply-To: <565059008.-1716491868.1714382181258.JavaMail.root@zimbra71-e12.priv.proxad.net>

Hi


With a custom results keyword the function
org-babel-where-is-src-block-result doesn't find the results block
when the src block is unnamed.



#+name: config
#+begin_src emacs-lisp
  (setopt org-babel-results-keyword "RÉSULTATS")
#+end_src

#+RÉSULTATS: config
: RÉSULTATS








#+begin_src emacs-lisp
  (+ 1 6)
#+end_src

#+RÉSULTATS:
: 7

#+RÉSULTATS:
: 7

#+RÉSULTATS:
: 7




A possible fix (in ob-core.el):

#+begin_src elisp
    
  (defconst org-babel-result-regexp
    (rx (seq bol
             (zero-or-more (any "\t "))
             (literal (format "#+%s" org-babel-results-keyword))
             (opt "["
  		;; Time stamp part.
  		(opt "("
                       (= 4 digit) (= 2 "-" (= 2 digit))
                       " "
                       (= 2 digit) (= 2 ":" (= 2 digit))
                       ") ")
  		;; SHA1 hash.
  		(group (one-or-more hex-digit))
  		"]")
             ":"
             (zero-or-more (any "\t "))))
    "Regular expression used to match result lines.
  If the results are associated with a hash key then the hash will
  be saved in match group 1.")
   org-babel-result-regexp
#+end_src

#+RÉSULTATS:
: ^[	 ]*#\+RÉSULTATS\(?:\[\(?:([[:digit:]]\{4\}\(?:-[[:digit:]]\{2\}\)\{2\} [[:digit:]]\{2\}\(?::[[:digit:]]\{2\}\)\{2\}) \)?\([[:xdigit:]]+\)]\)?:[	 ]*



but it doesn't work a run time.





Best regards 

Vincek



Emacs  : GNU Emacs 29.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
 of 2024-03-26
Package: Org mode version 9.7-pre (release_9.6.24-1407-ga2514c @ ~/.emacs30.d/straight/build/org/)

current state:
==============
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-roam-db-gc-threshold 800000
 org-hide-emphasis-markers t
 org-bibtex-headline-format-function 'org-bibtex-headline-format-default
 org-babel-exp-inline-code-template "src_%lang[%switches%flags]{%body}"
 org-roam-mode-hook '(org-roam-bibtex-mode)
 org-pretty-table-mode-hook '(org-pretty-table-mode-set-explicitly)
  org-roam-node-display-template #("${title:*} ${tags:20}" 11 21 (face org-tag))
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-format-latex-options '(:foreground default :background default :scale 2.0 :html-foreground
			    "Black" :html-background "Transparent" :html-scale 1.0 :matchers
			    ("begin" "$1" "$" "$$" "\\(" "\\["))
 org-export-before-parsing-hook '(org-attach-expand-links org-babel-jupyter-strip-ansi-escapes)
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 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-archive-hook '(org-attach-archive-delete-maybe)
 org-modern-list '((42 . "•") (43 . "‣"))
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-ascii-format-drawer-function '(closure (t) (_name contents _width) contents)
 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-yank-image-file-name-function 'org-yank-image-autogen-filename
 org-mode-hook '((closure
		  (org--rds visual-fill-column-width org-clock-history 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-end-time-was-given org-time-was-given
		   org-state org-agenda-headline-snapshot-before-repeat org-struct-menu
		   org-last-state org-clock-start-time remember-data-file align-mode-rules-list
		   org-inlinetask-min-level t)
		  nil (add-hook 'change-major-mode-hook 'org-fold-show-all 'append 'local))
		 #[0 "\301\211\x10\207" [imenu-create-index-function org-imenu-get-tree] 2]
		 flyspell-mode (lambda nil (flycheck-mode 1)) org-modern-mode
		 (lambda nil (org-bullets-mode 1)) jupyter-org-interaction-mode
		 (closure
		  (org--rds 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-priority-regexp
		   org-mode-abbrev-table org-element-cache-persistent org-element-cache-version
		   buffer-face-mode-face 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 crm-separator 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)
		  nil (add-hook 'change-major-mode-hook 'org-fold-show-all 'append 'local))
		 #[0 "\300\301\302\303\304$\207"
		   [add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
		 org-babel-result-hide-spec org-babel-hide-all-hashes org-cdlatex-mode
		 auto-fill-mode org-babel-jupyter-make-local-aliases org-modern-indent-mode)
 org-babel-load-languages '((shell . t) (latex . t) (C . t) (jupyter . t) (maxima . t) (giac . t))
 org-roam-ref-annotation-function 'org-roam-ref-read--annotation
 org-modern-timestamp nil
 org-roam-directory "~/Documents/Memo/roam/"
 org-agenda-time-grid '((daily today require-timed) (800 1000 1200 1400 1600 1800 2000) "......"
			"----------------")
 org-latex-format-drawer-function '(closure
				    (engrave-faces-latex-mathescape
				     engrave-faces-current-preset-style
				     engrave-faces-latex-output-style t)
				    (_ contents) contents)
 org-ellipsis "…"
 org-roam-db-node-include-function '(closure (t) nil t)
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-html-format-drawer-function '(closure
				   (htmlize-buffer-places org-html-format-table-no-css
				    htmlize-css-name-prefix htmlize-output-type htmlize-output-type
				    htmlize-css-name-prefix t)
				   (_name contents) contents)
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-src-lang-modes '(("jupyter-sage" . sage) ("jupyter-python" . python) ("jupyter-R" . r)
		      ("jupyter-sage" . sage-shell) ("jupyter-python" . python-ts) ("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-babel-results-keyword "RÉSULTATS"
 org-agenda-current-time-string "now - - - - - - - - - - - - - - - - - - - - - - - - -"
 org-agenda-block-separator 61
 org-roam-indirect-buffer-hook '(org-roam--register-completion-functions-h)
 org-hugo-date-format "%d-%m-%Y"
 )










       reply	other threads:[~2024-04-30 12:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <565059008.-1716491868.1714382181258.JavaMail.root@zimbra71-e12.priv.proxad.net>
2024-04-29  9:18 ` caroute [this message]
2024-04-30 12:53   ` [BUG] With custom results keyword ([9.7-pre (release_9.6.24-1407-ga2514c)]) Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=297951359.-1716480072.1714382327340.JavaMail.root@zimbra71-e12.priv.proxad.net \
    --to=caroute@free.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).