Re: Displaying macros differently

2022-12-04 Thread William Denton

On 4 December 2022, Vikas Rawal wrote:


I frequently use orgmode macros -- like {{{M(Year 1998--99)}}} -- in tables
designed for latex export. I find that the macro syntax occupies many
character spaces. At the very least, 9 spaces are taken up even if my macro
shortcut is just one character long. This is very difficult with wide
tables as often the tables go off the screen just because of this.

I was wondering if there is a simple way of making org display the macros
differently. That is, use some kind of overlay, and display the above macro
may be like M:Year 1998--99. Or some special character could be used to
denote that there is a macro underlying what is visible here.


Is this close enough?

(setq org-hide-macro-markers t)

That hides the {{{macro}}} curly brackets (if there's no leading space).

I also have this to toggle macro visibility in the document so I can see them 
when I want to:


#+begin_src emacs-lisp
(defun wtd/toggle-org-macro-markers ()
  "Toggle visibility of {{{macro}}} markers"
  (interactive)
  (setq org-hide-macro-markers (not org-hide-macro-markers))
  (font-lock-mode)
  (font-lock-mode))
#+end_src

I think there's been some discussion about evaluating the macros and showing the 
result, but I don't think that's possible.


Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-04 Thread Greg Minshall
for the record, these are the tests i ran with my off-the-cuff "fix"
(s/sequencep/listp/):

#+name: alist
- first item
- second item
- third item

#+begin_src R :var list=alist :session ss
 list
#+end_src

#+RESULTS:
| first item | second item | third item |

#+begin_src R :var variable='(a test)
  variable
#+end_src

#+RESULTS:
| a | test |

#+name: atable
| this | is | a | header | line |
|--++---++--|
| 1| 2  | 3 | 4  | 5|
| a| b  | c | d  | e|

#+begin_src R :var list=atable :session ss
 list
#+end_src

#+RESULTS:
| 1 | 2 | 3 | 4 | 5 |
| a | b | c | d | e |

#+begin_src R :var list='((1 2 3) (1 2))
  list
#+end_src

#+RESULTS:
| 1 | 2 | 3 |
| 1 | 2 |   |


#+begin_src elisp :var list=alist
 list
#+end_src

#+RESULTS:
| first item | second item | third item |



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-04 Thread Greg Minshall
i see this same behavior.  to me, (org-babel-R-assign-elisp) seems to be
the problem, but it hasn't changed any time recently.  (nor, if my =git
blame= is done correctly, has anything else in ob-R.el.)

i don't understand how (org-babel-R-assign-elisp) thinks.  it seems to
assign =max= and =min= assuming that =value= is a list of (at least one)
list(s).

this *might* be a fix.  but, i don't have a lot of confidence it will
not have bad side effects for other cases.  (though i tested it with a
simple list, and a simple table with more than one row, and a list of
two lists, the first of length 3, the second of length 2.):

modified   lisp/ob-R.el
@@ -241,7 +241,7 @@ This function is called by `org-babel-execute-src-block'."
 (defun org-babel-R-assign-elisp (name value colnames-p rownames-p)
   "Construct R code assigning the elisp VALUE to a variable named NAME."
   (if (listp value)
-  (let* ((lengths (mapcar 'length (cl-remove-if-not 'sequencep value)))
+  (let* ((lengths (mapcar 'length (cl-remove-if-not 'listp value)))
 (max (if lengths (apply 'max lengths) 0))
 (min (if lengths (apply 'min lengths) 0)))
 ;; Ensure VALUE has an orgtbl structure (depth of at least 2).




[PATCH] lisp/org-expiry.el: Account for org-time-stamp-formats

2022-12-04 Thread Tom Gillespie
Hi,
   Here is a patch for org-contrib/lisp/org-expiry.el to account for
recent changes to org-time-stamp-formats. Best,
Tom

PS is this list still the best place to send org-contrib patches?
From 2408e92a9c5e155b55a374462d1314aabbe50fe0 Mon Sep 17 00:00:00 2001
From: Tom Gillespie 
Date: Sun, 4 Dec 2022 01:02:35 -0800
Subject: [PATCH] lisp/org-expiry.el: Account for org-time-stamp-formats
 refactor

* lisp/org-expiry.el (org-expiry-insert-created)
(org-expiry-insert-expiry): timestamp formats dropped delimiters so a
slight modification is required following org commit
e3a7c01874c9bb80e04ffa58c578619faf09e7f0, also bump version to 0.3 and
add a dependency on org 9.6 to ensure that the new version of
org-time-stamp-formats is present and users of older versions of org
will not accidentally load the new version
---
 lisp/org-expiry.el | 21 -
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/lisp/org-expiry.el b/lisp/org-expiry.el
index 98ad58a..d8d604b 100644
--- a/lisp/org-expiry.el
+++ b/lisp/org-expiry.el
@@ -3,9 +3,10 @@
 ;; Copyright 2007-2021 Free Software Foundation, Inc.
 ;;
 ;; Author: Bastien Guerry 
-;; Version: 0.2
+;; Version: 0.3
 ;; Keywords: org, expiry
 ;; Homepage: https://git.sr.ht/~bzg/org-contrib
+;; Package-Requires: ((org "9.6"))
 
 ;; This file is not part of GNU Emacs.
 
@@ -299,10 +300,11 @@ update the date."
   (setq d-hour (format-time-string "%H:%M" d-time))
   (setq timestr
 	;; two C-u prefixes will call org-read-date
-	(if (equal arg '(16))
-		(concat "<" (org-read-date
-			 nil nil nil nil d-time d-hour) ">")
-	  (format-time-string (cdr org-time-stamp-formats
+(concat "<"
+(if (equal arg '(16))
+(org-read-date nil nil nil nil d-time d-hour)
+  (format-time-string (cdr org-time-stamp-formats)))
+">"))
   ;; maybe transform to inactive timestamp
   (if org-expiry-inactive-timestamps
 	  (setq timestr (concat "[" (substring timestr 1 -1) "]")))
@@ -320,10 +322,11 @@ and insert today's date."
 (setq d-time (if d (org-time-string-to-time d)
 		   (current-time)))
 (setq d-hour (format-time-string "%H:%M" d-time))
-(setq timestr (if today
-		  (format-time-string (cdr org-time-stamp-formats))
-		(concat "<" (org-read-date
- nil nil nil nil d-time d-hour) ">")))
+(setq timestr (concat "<"
+  (if today
+  (format-time-string (cdr org-time-stamp-formats))
+(org-read-date nil nil nil nil d-time d-hour))
+  ">"))
 ;; maybe transform to inactive timestamp
 (if org-expiry-inactive-timestamps
 	(setq timestr (concat "[" (substring timestr 1 -1) "]")))
-- 
2.37.4



Re: Clocking in is pretty slow in version 9.6 when the item has a large

2022-12-04 Thread Mark Barton


> On Dec 4, 2022, at 10:18 AM, Ihor Radchenko  wrote:
> 
> Ihor Radchenko mailto:yanta...@posteo.net>> writes:
> 
>> Eli Qian mailto:eli.q.q...@gmail.com>> writes:
>> 
>>> Any idea about speeding up clocking in?
>> 
>> Try reducing `org-element--cache-self-verify-frequency' to a smaller
>> number.
> 
> For some context, self-verify staff will only be enabled during pretest.
> It is an equivalent of ./configure --enable-checking in Emacs. We do it,
> because we absolutely need to catch all issues with org-element cache
> ASAP, before the code goes into Emacs release.

FYI here is how reducing that number helped with my clocktable updates in the 
order I tested each value.
*** org-element--cache-self-verify-frequency 0.01 
update takes 1:18 (minutes : seconds)
*** org-element--cache-self-verify-frequency 0.005
update takes 0:48
*** org-element--cache-self-verify-frequency 0.002
update takes 0:28
*** org-element--cache-self-verify-frequency 0.001
update takes 0:19
*** org-element--cache-self-verify-frequency 0.0005
update takes 0:20
*** org-element--cache-self-verify-frequency 0.03 (default value)
update takes 3:29



Re: Clocking in is pretty slow in version 9.6 when the item has a large

2022-12-04 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Eli Qian  writes:
>
>> Any idea about speeding up clocking in?
>
> Try reducing `org-element--cache-self-verify-frequency' to a smaller
> number.

For some context, self-verify staff will only be enabled during pretest.
It is an equivalent of ./configure --enable-checking in Emacs. We do it,
because we absolutely need to catch all issues with org-element cache
ASAP, before the code goes into Emacs release.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [External] : Re: Clocking in is pretty slow in version 9.6 when the item has a large

2022-12-04 Thread Daniel Ortmann

Eli,
I also had performance issues after the logbook was switched to true 
parsing instead of regular expressions.  In my case, I had logbook 
entries going back to 2012!


After I cleared out the excess entries the performance jumped back up.

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3790bf8ea1d070055a989f0b9587948e07877977

On 12/4/22 11:41, Ihor Radchenko wrote:

Eli Qian  writes:


Any idea about speeding up clocking in?

Try reducing `org-element--cache-self-verify-frequency' to a smaller
number.

--- Begin Message ---
Works perfectly after cleaning out old time log entries going back to 
2013.  :-)


On 10/20/22 00:37, Ihor Radchenko wrote:

Daniel Ortmann  writes:


(The performance drop was sudden and steep, by the way.)

It is because clocking now calls Org parser API.
https://urldefense.com/v3/__https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3790bf8ea1d070055a989f0b9587948e07877977__;!!ACWV5N9M2RV99hQ!KgwLbNpmmeNRH40ZJBT24H5ehmytyzRmS_wXhRSXlz7b-jzilorwtWKuAF0iQwTkP4UT779uIe4jNXhYh7W-$



--- End Message ---


Re: [HELP] Translate/extend `org-clock-clocktable-language-setup' for Spanish/Dutch/more languages

2022-12-04 Thread Jonathan Gregory


On 04 Dec 2022, Ihor Radchenko wrote:


Jonathan Gregory  writes:


Contributions for other languages are also welcome.


For Portuguese, I'd use the following:

("pt" "Arquivo" "N" "Data e hora" "Título" "Hora" "TODOS" "Hora 
total" "Hora do arquivo" "Resumo das horas em")


Thanks!
Would you mind making a patch?
(I am asking because I can see that you did it in the past)


Sure, patch attached. BTW there are some small differences between 
pt and pt-BR (Brazilian Portuguese). I speak the latter, so that's 
what I used.


--
Jonathan
>From b9844c021366a5470f05f6638cd0b7d61b683434 Mon Sep 17 00:00:00 2001
From: Jonathan Gregory 
Date: Sun, 4 Dec 2022 14:41:31 -0300
Subject: [PATCH] org-clock-clocktable-language-setup: Add Portuguese
 translation

* lisp/org-clock.el (org-clock-clocktable-language-setup): Do it.

TINYCHANGE
---
 lisp/org-clock.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 871687687..169b380f5 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -350,8 +350,8 @@ For more information, see `org-clocktable-write-default'."
 ("es" "Archivo"  "N"  "Fecha y hora" "Tarea" "Tiempo" "TODO" "Tiempo total" "Tiempo archivo" "Clock summary at")
 ("fr" "Fichier"  "N"  "Horodatage" "En-tête"  "Durée" "TOUT"  "Durée totale" "Durée fichier" "Horodatage sommaire à")
 ("nl" "Bestand"  "N"  "Tijdstip"   "Rubriek" "Duur"  "ALLES" "Totale duur"  "Bestandstijd" "Klok overzicht op")
-("de" "Datei""E"  "Zeitstempel" "Kopfzeile" "Dauer" "GESAMT"
- "Gesamtdauer"  "Dateizeit" "Erstellt am"))
+("de" "Datei""E"  "Zeitstempel" "Kopfzeile" "Dauer" "GESAMT" "Gesamtdauer"  "Dateizeit" "Erstellt am")
+("pt-BR" "Arquivo" "N" "Data e hora" "Título" "Hora" "TODOS" "Hora total" "Hora do arquivo" "Resumo das horas em"))
   "Terms used in clocktable, translated to different languages."
   :group 'org-clocktable
   :version "24.1"
-- 
2.25.1



Re: Clocking in is pretty slow in version 9.6 when the item has a large

2022-12-04 Thread Ihor Radchenko
Eli Qian  writes:

> Any idea about speeding up clocking in?

Try reducing `org-element--cache-self-verify-frequency' to a smaller
number.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Clocking in is pretty slow in version 9.6 when the item has a large

2022-12-04 Thread Mark Barton


> On Dec 4, 2022, at 4:12 AM, Eli Qian  wrote:
> 
> After investigation by using profiler, I found the problem is caused by
> `org-element-at-point`

I'm also seeing this slowdown after compliling from Emacs master around the 
time of the 29.1 cutoff. I use the org version in Emacs master. I use 
clocktable reports that scope a two week period to calculate the time spent on 
tasks. Normally the update to the table takes maybe 10s-30s, but lately it 
takes over 3 minutes to run.

Emacs 30.0.50 (Build 21G115) of 2022-12-02
Org mode version release_9.6-3-ga4d38e @ 
/Applications/Emacs.app/Contents/Resources/lisp/org/
Emacs  -Q
Open org file with clocking data and find the clocktable line as shown below. 
C-c C-c to update the clocktable report.

#+BEGIN: clocktable :scope file :maxlevel 6 :link nil :tstart "[2022-11-19 Sat 
00:00]" :tend "[2022-12-03 Sat 11:00]" :formula % :step day :stepskip0 t

This took over 3 minutes to run.

If I use an older build I have as my "stable" version for testing...
Emacs 29.0.50 (Build 21F79) of 2022-08-05
Org mode version 9.5.4-17-g6e991f 
then the same clocktable line takes 11s to update.

Mark

Clocking in is pretty slow in version 9.6 when the item has a large

2022-12-04 Thread Eli Qian
I use the following method to get the time taken for `org-clocl-in`:
(benchmark 1 '(org-clock-sum (org-clock-get-sum-start)))

In my case, the item has 1400+ entries in its logbook,  clocking in will
cost
1-2s to finish(benchmark results: "Elapsed time: 1.689801s (0.527506s in 7
GCs)"). That's abnormal because it is done very quickly in version
9.5.5.(benchmark result: "Elapsed time: 0.057270s")

After investigation by using profiler, I found the problem is caused by
`org-element-at-point`, which was added to `org-clock-sum` in version 9.6.

Any idea about speeding up clocking in?


Displaying macros differently

2022-12-04 Thread Vikas Rawal
Hi everyone,

I frequently use orgmode macros -- like {{{M(Year 1998--99)}}} -- in tables
designed for latex export. I find that the macro syntax occupies many
character spaces. At the very least, 9 spaces are taken up even if my macro
shortcut is just one character long. This is very difficult with wide
tables as often the tables go off the screen just because of this.

I was wondering if there is a simple way of making org display the macros
differently. That is, use some kind of overlay, and display the above macro
may be like M:Year 1998--99. Or some special character could be used to
denote that there is a macro underlying what is visible here.

I am aware of things like org-bullets which do something like this with
headlines. But I was wondering if anyone has done this with macros.

My apologies if I have not been able to express my problem clearly.

Best wishes,

Vikas


[BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-04 Thread Johan Tolö
After the changes to ob-core.el introduced in commit: 
b4e437f968771df9555f9306467846965857f632 plain lists passed to R 
source code blocks are generated with extra (empty) items.


Example:

#+name: alist
- first item
- second item
- third item

#+begin_src R :var list=alist
 list
#+end_src

#+RESULTS:
| first item | second item | third item |   |   |   |   |   |   | 
 |



Expected result would be:

#+RESULTS:
| first item | second item | third item |

as generated by:

#+begin_src elisp :var list=alist
 list
#+end_src

#+RESULTS:
| first item | second item | third item |


Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ 
Version 3.24.35, cairo version 1.17.6)

of 2022-12-01
Package: Org mode version 9.6 (release_9.6-3-ga4d38e @ 
/usr/share/emacs/30.0.50/lisp/org/)

--
Johan Tolö



Re: [PATCH] Fix two typos

2022-12-04 Thread Ihor Radchenko
Stefan Kangas  writes:

> The attached patch fixes two typos.

Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=60de19f91

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] Improve Swedish entry in org-export-dictionary

2022-12-04 Thread Ihor Radchenko
Stefan Kangas  writes:

> The attached patch improves the Swedish localization of
> org-export-dictionary, and adds several missing entries.

Thanks!
Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=81b083b08

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] warn when use org-capture [9.6 (release_9.6-3-ga4d38e @ /home/feng/emacs/emacs29/lisp/org/)]

2022-12-04 Thread Ihor Radchenko
Feng Shu  writes:

>> Do you see the warning frequently? If so, would you be able to bisect
>> your config and find out which part is causing the issue?
>
> emacs -Q
>
> --
> (global-set-key (kbd "C-c c") 'org-capture)
> (setq org-adapt-indentation 'headline-data)
>
> (setq org-capture-templates
>   (let ((file (concat "~/1.org")))
> `(("s" "Schedule" entry (file+headline ,file "待整理")
>"* TODO %?
>   SCHEDULED: %t
>   :PROPERTIES:
>   :created: %U
>   :END:
>
> %i"

Thanks! I can reproduce now. (got thrown off by the second warning)
Fixed on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7e6b55b8f

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] Clipboard text pasted in two windows with a cloned buffer [9.6-pre ( @ /home/chomwitt/.config/emacs/elpa/org-9.6pre0.20221110.85807/)]

2022-12-04 Thread Ihor Radchenko
Alexandros Prekates  writes:

> Observer behavior:
> WINDOW A --
> * FOO1
> ** goo2
> ** zoo2
> bla
> bla
> MOOO  <-- pasted text
>
> WINDOW B --
> * FOO1..MOOO

Thanks for reporting!
It turned out to be not "just a display glitch", but a more serious
oversight.
Fixed on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=461eb2a0e

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Adding #+name to result block in babel

2022-12-04 Thread Johan Tolö

Henrik Frisk  writes:
[snipped]

 Then you can use the result like this:

 #+begin_src sh :var value=my_result
 echo $value
 #+end_src
 
 #+RESULTS:

 : hello



This does not use the result but rather reevaluates the 
"my_result" code block.


Thank you! That was good to be reminded of, but I should have 
been more explicit in my first email. I'm working with a 
language (sclang)
that for various reasons does not have support for variables in 
this way. The only option I have to include the results from one 
block is by

using a noweb referens:

#+begin_src shell
   echo "Hello"
#+end_src

#+RESULTS:
#+name: my_result
: Hello

#+begin_src sclang :noweb yes
  <>
#+end_src


You could try adapting the examples for using :post at the end of: 
https://orgmode.org/manual/Results-of-Evaluation.html


But in my (limited) experience it is difficult to get the output 
right.


Another suggestion is to use a templating system for generating 
the src block and include the #+name: part in the template. I use 
yasnippet for this.



--
Johan Tolö



Re: How to disable completely org-persist

2022-12-04 Thread Colin Baxter
> Ihor Radchenko  writes:

> Colin Baxter  writes:
>> I too would like a means to disable org-persist. I don't doubt it
>> may be useful for those users with "large" org files with
>> multiply src-blocks, etc., etc., but, for me, I have not found
>> any improvement in performance. As remarked by the OP, the
>> feature should not be default-enabled.

> Note that org-persist is not only used to cache parser data for
> large files. For example, exported online images are also cached
> instead of being downloaded on every export. Other things may also
> be cached in future.

> Normally, org-persist stores the data in $XDG_CACHE_HOME. It only
> falls back to .emacs.d when cache directory does not exist. One
> can also customize the value manually.

> That being said, it should not be a big deal to allow disabling
> org-persist when desired. In fact, org-persist is already
> auto-disabled when using emacs -Q. I can add a user switch on top.

When you have time, of course, a disabling switch would be most useful -
in my opinion.

Best wishes,



Re: [HELP] Translate/extend `org-clock-clocktable-language-setup' for Spanish/Dutch/more languages

2022-12-04 Thread Ihor Radchenko
Max Nikulin  writes:

> For some reason I believed that gettext was available in Emacs. Actually 
> only a rudimentary variant of `ngettext' (for plurals) was added in 
> 2019. I was going to ask why .po files are not used in Org for 
> translations. Perhaps I confused it with old versions of TeXmacs that 
> sometimes tried to translate each component of file paths.

It would indeed be interesting to have a unified approach to bring
translations into Emacs. I'd discuss it on emacs-devel.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [HELP] Translate/extend `org-clock-clocktable-language-setup' for Spanish/Dutch/more languages

2022-12-04 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Slovak:
>
> ("sk" "Súbor" "L" "Časová značka" "Záhlavie" "Čas" "VŠETKO" "Celkový
> čas" "Čas súboru" "Časový súhrn pre")

Thanks! A patch would make it easier for me to apply the change with a
proper attribution ;)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [HELP] Translate/extend `org-clock-clocktable-language-setup' for Spanish/Dutch/more languages

2022-12-04 Thread Ihor Radchenko
Jonathan Gregory  writes:

>> Contributions for other languages are also welcome.
>
> For Portuguese, I'd use the following:
>
> ("pt" "Arquivo" "N" "Data e hora" "Título" "Hora" "TODOS" "Hora 
> total" "Hora do arquivo" "Resumo das horas em")

Thanks!
Would you mind making a patch?
(I am asking because I can see that you did it in the past)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [HELP] Translate/extend `org-clock-clocktable-language-setup' for Spanish/Dutch/more languages

2022-12-04 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Applied onto main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4af243166

And you are now officially listed as Org contributor ;)
https://git.sr.ht/~bzg/worg/commit/a26356a9

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [HELP] Translate/extend `org-clock-clocktable-language-setup' for Spanish/Dutch/more languages

2022-12-04 Thread Ihor Radchenko
Esteban Ordóñez  writes:

>> "Clock summary at" will be used as title:
>> 
>> #+TITLE: Clock summary at [2022-11-28]
>
> Then the translation looks OK.  Nevertheless, it sounds cranky.  If
> there is an example of what the title has below it, it might be easier
> to judge.  Perhaps the manual or another link has an example where it
> shows that title on a generated document.  I have not found it in my
> search.

For example:

#+BEGIN: clocktable :scope file :maxlevel 2
#+CAPTION: Clock summary at [2022-12-04 Sun 14:16]
|   Headline   |   Time|
|--+---|
| *Total time* | *0h 0min* |
#+END:

P.S. I did note your other responses. Will take a look later. Bugfixes
for Org 9.6 are higher priority now.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [HELP] Translate/extend `org-clock-clocktable-language-setup' for Spanish/Dutch/more languages

2022-12-04 Thread Ihor Radchenko
gerard.vermeu...@posteo.net writes:

>> I am attaching a patch under your name. Let me know if it fits your
>> suggestions.
>
> The patch fits my suggestions.

Thanks for confirming!
Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4af243166

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org-assert-version considered harmful

2022-12-04 Thread Ihor Radchenko
Stefan Monnier  writes:

> BTW, rather than unloading, `package.el` relies on forcibly "re"loading
> from the new version the already loaded files from the old version.
> It suffers from a different set of problem :-(
> [ I suspect `defvar` is the main problem for that solution.  ]

Could it be possible to force require use certain package version and
automatically re-load a package when older version is being loaded?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Bug org-cycke fails after "replace-string" is

2022-12-04 Thread Ihor Radchenko
Charles Millar  writes:

> Attached is an example
>
> 1. Open all headings etc. show the contents then Collapse all headings
> 2. Cycle First Heading to show its content
> 3. Cycle Second Heading to show only the subheadings, but not the 
> content of each subheading
> 3. Cycle Subheading B, to show its content.
> 4. go to point-min and then replace "Charlie" with a string of your choice
>
> After the replace string is executed, I cannot cycle Subheading A or 
> Subheading B
>
> Likewise if all headings are collapsed and I execute a replace-string 
> "Chas" I cannot org-cycle through "First heading" and "Second heading", 
> but I can cycle "Third heading"

I am unable to reproduce using Org 9.6 and Emacs 29.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: How to disable completely org-persist

2022-12-04 Thread Ihor Radchenko
Angelo Graziosi  writes:

> Ihor Radchenko on emacs-orgmode wrote:
>
>> That being said, it should not be a big deal to allow disabling
>> org-persist when desired. In fact, org-persist is already 
>> auto-disabled when using emacs -Q. I can add a user switch 
>> on top.
>
> I wonder what kind of answer is this.. Also not using ORG mode at all fixes 
> the issue..

The answer is: will do later when I have free time. It is not a critical
bug blocking usage for all users.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: How to disable completely org-persist

2022-12-04 Thread Angelo Graziosi



> Ihor Radchenko on emacs-orgmode wrote:
> I can add a user switch 
> > on top.
> 

Please, add an option to disable the caching

(org-cache 0)

which disables *all* other thing (org-persist and friends)..

...or disable *all* by default and the user that like that will set

(org-cache 1)

..



Re: How to disable completely org-persist

2022-12-04 Thread Angelo Graziosi


Ihor Radchenko on emacs-orgmode wrote:

> That being said, it should not be a big deal to allow disabling
> org-persist when desired. In fact, org-persist is already 
> auto-disabled when using emacs -Q. I can add a user switch 
> on top.

I wonder what kind of answer is this.. Also not using ORG mode at all fixes the 
issue..



Re: How to disable completely org-persist

2022-12-04 Thread Ihor Radchenko
Colin Baxter  writes:

> I too would like a means to disable org-persist. I don't doubt it may be
> useful for those users with "large" org files with multiply src-blocks,
> etc., etc., but, for me, I have not found any improvement in
> performance. As remarked by the OP, the feature should not be
> default-enabled.

Note that org-persist is not only used to cache parser data for large
files. For example, exported online images are also cached instead of
being downloaded on every export. Other things may also be cached in
future.

Normally, org-persist stores the data in $XDG_CACHE_HOME. It only falls
back to .emacs.d when cache directory does not exist. One can also
customize the value manually.

That being said, it should not be a big deal to allow disabling
org-persist when desired. In fact, org-persist is already auto-disabled
when using emacs -Q. I can add a user switch on top.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: How to disable completely org-persist

2022-12-04 Thread Colin Baxter


>writes:

> On Sat, Dec 03, 2022 at 01:19:47AM +0100, Angelo Graziosi wrote:
>> I have already posted this to emacs-devel people (see
>> https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg00045.html).
>> 
>> After a recent Emacs build from master I find `org-persist`
>> directory in my `.emacs.d` folder. It brings no benefit but only
>> garbage in `.emacs.d`. So how can I disable the creation of that
>> folder?

> Now, now... "garbage" seems unnecessarily loaded, But...

>> You should not enable this by default and let people that finds
>> it really useful to enable it in its own init.el.

> ...I won't quibble about the default, but I'd like to have a way
> to disable it, too.

I too would like a means to disable org-persist. I don't doubt it may be
useful for those users with "large" org files with multiply src-blocks,
etc., etc., but, for me, I have not found any improvement in
performance. As remarked by the OP, the feature should not be
default-enabled.

Best wishes,

Colin Baxter.