Hi
Can we add a support for whitespace prefix such that the prefix of a
noweb-ref replaced by whitespace characters?
Here is a use case,
#+begin_src elisp :noweb-ref varable-bindings
(a 0)
(b 1)
#+end_src
#+begin_src elisp :noweb-ref do-something
`(,a ,b)
#+end_src
#+name: a-fragment
#+begin_s
Ihor Radchenko 于2024年3月29日周五 03:25写道:
>
> Doerthous writes:
>
> > Can we add a support for whitespace prefix such that the prefix of a
> > noweb-ref replaced by whitespace characters?
> >
> > ...
> > #+name: a-fragment
> > #+begin_src elisp :
Ihor Radchenko writes:
> I think that a more general approach could be allowing :noweb-prefix to
> have a value of string that will be appended to each line on the
> expansion.
With the use case discussed before, is allowing :noweb-prefix to have a
value of string means I need to provide a strin
Ihor Radchenko writes:
> I still feel that what you are really looking for is major-mode-specific
> indentation, not a prefix. Because indentation may require tabs, not
> spaces. Or may interfere with programming language.
I kind of understand what you mean: what I need is just the no
option, af
Thanks, I'll check it out.
Ihor Radchenko writes:
> Doerthous writes:
>
>> For getting properties of an org entry by ID, I currently (org 9.7) use
>> (org-entry-get (org-id-find ID t) PROP), but `org-id-find' seems too
>> slow. So I wonder this there any recommended ways to do this job?
>
org-id-find10005.451268 0.0054512689
org-entry-get 10000.460270 0.0004602709
x/org-id-prop 10000.007889 7.889...e-06
265 70% - org-entry-get
261 69% - org-id-find
...
257 68%- org-id-find-id-in-file
257 68% - cond
249 6
date-id-locations'.
Indeed, the patch below may fix this issue.
>From 6d2d2a114870df2582be341ffbd5e8d26dded461 Mon Sep 17 00:00:00 2001
From: doerthous
Date: Mon, 28 Apr 2025 18:54:10 +0800
Subject: [PATCH] org-id: Cache entry position
* lisp/org-id.el: To speedup org id location lookup
Ihor Radchenko writes:
>
> (when pos ...) will be more clean.
>
changed.
>> +(when (and (null where) file)
>>(setq where (org-id-find-id-in-file id file markerp)))
>> (unless where
>>(org-id-update-id-locations nil t)
>>(setq file (org-id-find-id-file id))
>>
org-element-cache-store-key 2 0.000152 7.6e-05
Environment:
Org mode version 9.8-pre (release_9.7.28-319-g24d155 @
~/.emacs.d/org-mode/lisp/)
GNU Emacs 31.0.50 (build 3, x86_64-w64-mingw32) of 2025-04-26
>From c4fed8529791f20e10c2119c6390bc6288c2a667 Mon Sep 17 00:00:00 2001
From: doerth
Hi all,
For getting properties of an org entry by ID, I currently (org 9.7) use
(org-entry-get (org-id-find ID t) PROP), but `org-id-find' seems too
slow. So I wonder this there any recommended ways to do this job?
or, maybe we can cache also the marker returned by `org-id-find' in
`org-id-locat
11 matches
Mail list logo