Re: How to disable completely org-persist

2022-12-31 Thread Angelo Graziosi


> Il 30/12/2022 18:42 Colin Baxter ha scritto:
> 
>  
> >>>>> Angelo Graziosi writes:
> 
> > tomas wrote:
> >> there is now a defvar `org-element-cache-persistent'
> 
> > Ah! didn't knew that..
> 
> > Setting
> 
> > (setq org-element-cache-persistent nil)
> 
> > seems to work..
> 
> Indeed, although I'm not yet convinced that org-persist directories wont
> eventually start showing up in /tmp!

...or in ~/.cache..



Re: How to disable completely org-persist

2022-12-30 Thread Angelo Graziosi


> Il 30/12/2022 18:42 Colin Baxter ha scritto:
> 
>  
> >>>>> Angelo Graziosi writes:
> 
> > tomas wrote:
> >> there is now a defvar `org-element-cache-persistent'
> 
> > Ah! didn't knew that..
> 
> > Setting
> 
> > (setq org-element-cache-persistent nil)
> 
> > seems to work..
> 
> Indeed, although I'm not yet convinced that org-persist directories wont
> eventually start showing up in /tmp!

I fear that sooner or later it will reappear somewhere.. 

When it showed up few week ago, I found that setting and added it to the init 
file but that time it didn't solved the issue. That folder showed up even with 
that setting.. Instead now it seems to fix the issue hmm.. I wouldn't want it 
to be a Pyrrhic victory!



Re: How to disable completely org-persist

2022-12-30 Thread Angelo Graziosi
tomas wrote:

> there is now a defvar `org-element-cache-persistent'

Ah! didn't knew that..

Setting 

(setq org-element-cache-persistent nil)

seems to work..

Thanks,
 Angelo.



Re: How to disable completely org-persist

2022-12-30 Thread Angelo Graziosi
> Il 05/12/2022 18:58 Colin Baxter ha scritto:
> 
>  
> >>>>> Angelo Graziosi writes:
> 
> > Colin Baxter wrote:
> >> I too would like a means to disable org-persist.
> 
> > On emacs-devel there was this suggestion:
> 
> > https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg00125.html
> 
> It appears to work, after removing a couple of surplus brackets from the
> end of the last line.

After the last Emacs master build, the what suggested there, i.e.

;; As suggested here:
;; https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg00125.html
(setq org-persist-disable-when-emacs-Q t)

(defun tv/advice--org-persist (old-fn  args)
  (let (user-init-file)
(apply old-fn args)))

(advice-add 'org-persist-write :around #'tv/advice--org-persist)
(advice-add 'org-persist-read :around #'tv/advice--org-persist)
(advice-add 'org-persist-gc :around #'tv/advice--org-persist)

does not work any more: that directory is recreated even with that cod in the 
init.el

Someone knows how to avoid that?

TIA,
 Angelo.



Re: How to disable completely org-persist

2022-12-05 Thread Angelo Graziosi
Colin Baxter wrote:
>  I too would like a means to disable org-persist. 

On emacs-devel there was this suggestion:

https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg00125.html



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..



How to disable completely org-persist

2022-12-02 Thread Angelo Graziosi
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?

Emacs-devel people suggests to disable `org-element-cache-persistent` but

(setq org-element-cache-persistent nil)

does not fix the issue because the directory is recreated each time I quit from 
Emacs.. All this is very annoying.

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

Best wishes,