Support for whitespace prefix for :noweb-prefix

2024-03-28 Thread Doerthous
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

Re: Support for whitespace prefix for :noweb-prefix

2024-03-28 Thread Doerthous
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 :

Re: Support for whitespace prefix for :noweb-prefix

2024-03-29 Thread Doerthous
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

Re: Support for whitespace prefix for :noweb-prefix

2024-03-29 Thread Doerthous
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

Re: Support for whitespace prefix for :noweb-prefix

2024-03-29 Thread Doerthous
Thanks, I'll check it out.

Re: Question about getting properties of org entry

2025-04-06 Thread Doerthous
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? >

Re: Question about getting properties of org entry

2025-04-16 Thread Doerthous
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

Re: Question about getting properties of org entry

2025-04-28 Thread Doerthous
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

Re: Question about getting properties of org entry

2025-04-29 Thread Doerthous
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)) >>

Re: Question about getting properties of org entry

2025-04-26 Thread Doerthous
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

Question about getting properties of org entry

2025-04-04 Thread Doerthous
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