!rUhEinythPhVTdddsb:matrix.org

org-mode

860 Members
org-mode: digital and analog122 Servers

Load older messages


SenderMessageTime
13 Mar 2025
@yantar92:matrix.orgyantar92 (Org maintainer)
In reply to @dadinn:matrix.org
How does the element cache work, and what are its main benefits? I mean in general, I assume that when calling `org-sort-entries` or `org-map-entries` to do some heavy lifting then it makes sense to disable it? Or did I overlook something?
Cache works akin tree-sitter. Most of the time you don't want to disable it
04:45:51
@dadinn:matrix.orgdadinnI think it's mostly about the massive size of the org buffer I've been sorting. It's generated as part of an archival script I wrote, at which end I sort the buffer... actually I sort by the CLOSED property, not the TIMESTAMP as in the code above.10:38:42
@indric:matrix.orgindric joined the room.11:12:33
@indric:matrix.orgindric

Hello org mode gurus!

I have the following org mode blocks:

#+name: foo
#+begin_src elisp
(mapconcat 'identity (list "foo" "bar") " ")
#+end_src

#+name: show-src-block
#+begin_src sh :noweb yes
echo "Here's my source block: <<foo>>"
#+end_src

#+call: show-src-block()

#+RESULTS:
: Here's my source block: (mapconcat 'identity (list foo bar)  )

#+name: bar
#+begin_src elisp
(mapconcat 'identity (list "baz" "qux") " ")
#+end_src

#+name: show-src-block-bar
#+begin_src sh :noweb yes
echo "Here's my source block: <<bar>>"
#+end_src

#+RESULTS: show-src-block-bar
: Here's my source block: (mapconcat 'identity (list baz qux)  )

The problem here is that how-src-block-bar src bock is only different from show-src-block by a noweb reference that it uses. I would like to remove this repetition.
What I want is to call show-src-block, which would now show a different source block using noweb. Is there a way I can achieve this?
The point is I would like to be able to embed the body of a source block into other src block, but I would like to be able to reuse as much as possible.

11:15:34
@indric:matrix.orgindric *

Hello org mode gurus!

I have the following org mode blocks:

#+name: foo
#+begin_src elisp
(mapconcat 'identity (list "foo" "bar") " ")
#+end_src

#+name: show-src-block
#+begin_src sh :noweb yes
echo "Here's my source block: <<foo>>"
#+end_src

#+call: show-src-block()

#+RESULTS:
: Here's my source block: (mapconcat 'identity (list foo bar)  )

#+name: bar
#+begin_src elisp
(mapconcat 'identity (list "baz" "qux") " ")
#+end_src

#+name: show-src-block-bar
#+begin_src sh :noweb yes
echo "Here's my source block: <<bar>>"
#+end_src

#+RESULTS: show-src-block-bar
: Here's my source block: (mapconcat 'identity (list baz qux)  )

The problem here is that show-src-block-bar src block is only different from show-src-block by a noweb reference that it uses. I would like to remove this repetition.
What I want is to call show-src-block, which would now show a different source block using noweb. Is there a way I can achieve this?
The point is I would like to be able to embed the body of a source block into other src block, but I would like to be able to reuse as much as possible.

11:18:39
@drishal:matrix.orgDrishal joined the room.11:56:14
@drishal:matrix.orgDrishala small question, is there any known fix to org mode code blocks losing syntax highlighting ?11:59:58
@drishal:matrix.orgDrishalimage.png
Download image.png
12:00:03
@drishal:matrix.orgDrishalimage.png
Download image.png
12:00:21
@drishal:matrix.orgDrishalon using org reload its fine 12:00:22
@yantar92:matrix.orgyantar92 (Org maintainer)
In reply to @drishal:matrix.org
a small question, is there any known fix to org mode code blocks losing syntax highlighting ?
I did not see this. Maybe problem with config
12:29:35
@yantar92:matrix.orgyantar92 (Org maintainer)
In reply to @dadinn:matrix.org
I think it's mostly about the massive size of the org buffer I've been sorting. It's generated as part of an archival script I wrote, at which end I sort the buffer... actually I sort by the CLOSED property, not the TIMESTAMP as in the code above.
Massive size should not matter
12:29:49
@drishal:matrix.orgDrishalI wonder if this has something to do with doom themes16:13:35
14 Mar 2025
@defolos:matrix.orgDan Čermák changed their display name from defolos to Dan Čermák.11:15:35
15 Mar 2025
@trevdev:matrix.orgtrevdev Setting org-html-postamble-format to something other than default in my publish script isn't doing anything, and I'm wondering why 15:36:48
@trevdev:matrix.orgtrevdev Build script is ran by emacs -Q and I'm using setq just before calling (org-publish-all) 15:38:17
@trevdev:matrix.orgtrevdev * Build script is run by emacs -Q and I'm using setq just before calling (org-publish-all) 15:38:34
@trevdev:matrix.orgtrevdev I can explicitly set org-html-postamble to a string and it works, but setting org-html-postamble-format to '(("en" "<p>Hello, world</p>)) changes nothing 15:48:38
@trevdev:matrix.orgtrevdev * I can explicitly set org-html-postamble to a string and it works, but setting org-html-postamble-format to '(("en" "<p>Hello, world</p>")) changes nothing 15:48:47
@trevdev:matrix.orgtrevdev Setting org-html-postamble t works 15:49:53
@trevdev:matrix.orgtrevdevI can then use the format I hope15:50:01
@trevdev:matrix.orgtrevdevYep I can. Thanks for being my rubber ducks15:54:24
@yantar92:matrix.orgyantar92 (Org maintainer)Redacted or Malformed Event16:12:18
@nv-elisp:matrix.orgnv-elispRecommended mirror for Org while Savannah is dealing with constant DDOS? I'm looking for something I can be comfortable pointing Elpaca users to by default.16:34:30
@yantar92:matrix.orgyantar92 (Org maintainer)
In reply to @nv-elisp:matrix.org
Recommended mirror for Org while Savannah is dealing with constant DDOS?
I'm looking for something I can be comfortable pointing Elpaca users to by default.
sr.ht/~bzg/org lists the official mirror
16:43:14
@z:freelanguagetools.orgzRedacted or Malformed Event20:18:49
@z:freelanguagetools.orgzRedacted or Malformed Event20:25:30
@z:freelanguagetools.orgzanyone getting issues with hanging when using equation environments using the new latex preview branch?22:27:25
@0402-saline:matrix.org0402-salineRedacted or Malformed Event23:31:34
@0402-saline:matrix.org0402-saline *

May I clarify that arguements can infact be passed via noweb calls like so:

<<block-name(arg-1="string" ag-2=10)

It seems like the manual:
https://orgmode.org/manual/Noweb-Reference-Syntax.html
Says you can do this but I am having a hell of time getting it to work. I have a block that I am inserting and evals correctly (ie. using default values) if I omit the arg passing but once I include that arguments nothing is inserted and there are no errors.

23:34:29

Show newer messages


Back to Room ListRoom Version: 1