all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to disable completely org-persist
@ 2022-12-03  0:19 Angelo Graziosi
  2022-12-03  6:05 ` tomas
  2022-12-04  9:27 ` Angelo Graziosi
  0 siblings, 2 replies; 29+ messages in thread
From: Angelo Graziosi @ 2022-12-03  0:19 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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,


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-03  0:19 How to disable completely org-persist Angelo Graziosi
@ 2022-12-03  6:05 ` tomas
  2022-12-04  8:25   ` Colin Baxter
  2022-12-04  9:27 ` Angelo Graziosi
  1 sibling, 1 reply; 29+ messages in thread
From: tomas @ 2022-12-03  6:05 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

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.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-04  8:25   ` Colin Baxter
@ 2022-12-04  3:33     ` Ihor Radchenko
  2022-12-04 11:57       ` Colin Baxter
  2022-12-13 13:02       ` Ihor Radchenko
  0 siblings, 2 replies; 29+ messages in thread
From: Ihor Radchenko @ 2022-12-04  3:33 UTC (permalink / raw)
  To: m43cap; +Cc: tomas, emacs-orgmode

Colin Baxter <m43cap@yandex.com> 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-04  9:27 ` Angelo Graziosi
@ 2022-12-04  4:34   ` Ihor Radchenko
  2022-12-05 15:47     ` Angelo Graziosi
  2022-12-04  9:32   ` Angelo Graziosi
  2022-12-04 10:14   ` tomas
  2 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2022-12-04  4:34 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-orgmode@gnu.org, emacs-devel@gnu.org

Angelo Graziosi <angelo.g0@libero.it> 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-03  6:05 ` tomas
@ 2022-12-04  8:25   ` Colin Baxter
  2022-12-04  3:33     ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Colin Baxter @ 2022-12-04  8:25 UTC (permalink / raw)
  To: tomas; +Cc: emacs-orgmode


>>>>>   <tomas@tuxteam.de> 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.


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-03  0:19 How to disable completely org-persist Angelo Graziosi
  2022-12-03  6:05 ` tomas
@ 2022-12-04  9:27 ` Angelo Graziosi
  2022-12-04  4:34   ` Ihor Radchenko
                     ` (2 more replies)
  1 sibling, 3 replies; 29+ messages in thread
From: Angelo Graziosi @ 2022-12-04  9:27 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org; +Cc: emacs-devel@gnu.org


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


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-04  9:27 ` Angelo Graziosi
  2022-12-04  4:34   ` Ihor Radchenko
@ 2022-12-04  9:32   ` Angelo Graziosi
  2022-12-04 10:14   ` tomas
  2 siblings, 0 replies; 29+ messages in thread
From: Angelo Graziosi @ 2022-12-04  9:32 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org; +Cc: emacs-devel@gnu.org



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

..



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-04  9:27 ` Angelo Graziosi
  2022-12-04  4:34   ` Ihor Radchenko
  2022-12-04  9:32   ` Angelo Graziosi
@ 2022-12-04 10:14   ` tomas
  2022-12-04 11:57     ` Jean Louis
  2 siblings, 1 reply; 29+ messages in thread
From: tomas @ 2022-12-04 10:14 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

On Sun, Dec 04, 2022 at 10:27:53AM +0100, Angelo Graziosi wrote:
> 
> 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..

Angelo: I do share your wish. I still think we all can do
without the hostility you express that wish. From where
I stand, it is horribly unjust. Ihor and the other folks
are doing a lot of work we can just profit from.

Especially given how friendly and helpful Org devels are.

I can understand that software doing things one doesn't like
can be infuriating. But this is free software. You get a
chance to do something about it!

At another point in this thread, Ihor has already stated
that it's possible to add a switch (and actually hinted
at where to look). He even considers adding that switch
later. If you are in a hurry about this...  how about
offering a patch?

Cheers
-- 
t 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-04  3:33     ` Ihor Radchenko
@ 2022-12-04 11:57       ` Colin Baxter
  2022-12-13 13:02       ` Ihor Radchenko
  1 sibling, 0 replies; 29+ messages in thread
From: Colin Baxter @ 2022-12-04 11:57 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: tomas, emacs-orgmode

>>>>> Ihor Radchenko <yantar92@posteo.net> writes:

    > Colin Baxter <m43cap@yandex.com> 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,


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-04 10:14   ` tomas
@ 2022-12-04 11:57     ` Jean Louis
  2022-12-04 12:37       ` Eli Zaretskii
  0 siblings, 1 reply; 29+ messages in thread
From: Jean Louis @ 2022-12-04 11:57 UTC (permalink / raw)
  To: tomas; +Cc: emacs-devel

* tomas@tuxteam.de <tomas@tuxteam.de> [2022-12-04 13:16]:
> On Sun, Dec 04, 2022 at 10:27:53AM +0100, Angelo Graziosi wrote:
> > 
> > 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..
> 
> Angelo: I do share your wish. I still think we all can do
> without the hostility you express that wish. From where
> I stand, it is horribly unjust. Ihor and the other folks
> are doing a lot of work we can just profit from.

I see that above as funny misunderstanding of course, not
hostility. How can that be hostility? Wondering about the answer it
means there is some missing information which was clarified by Ihor,
and there is bit irony, which I welcome. Irony and wondering are not
hostilities. 

Just my observation.

It is funny.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-04 11:57     ` Jean Louis
@ 2022-12-04 12:37       ` Eli Zaretskii
  2022-12-04 12:46         ` John ff
  0 siblings, 1 reply; 29+ messages in thread
From: Eli Zaretskii @ 2022-12-04 12:37 UTC (permalink / raw)
  To: Jean Louis; +Cc: tomas, emacs-devel

> Date: Sun, 4 Dec 2022 14:57:38 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: emacs-devel@gnu.org
> 
> * tomas@tuxteam.de <tomas@tuxteam.de> [2022-12-04 13:16]:
> > > I wonder what kind of answer is this.. Also not using ORG mode at all fixes the issue..
> > 
> > Angelo: I do share your wish. I still think we all can do
> > without the hostility you express that wish. From where
> > I stand, it is horribly unjust. Ihor and the other folks
> > are doing a lot of work we can just profit from.
> 
> I see that above as funny misunderstanding of course, not
> hostility. How can that be hostility? Wondering about the answer it
> means there is some missing information which was clarified by Ihor,
> and there is bit irony, which I welcome. Irony and wondering are not
> hostilities. 
> 
> Just my observation.

I guess you didn't read the entire thread if that is what you think.  Or
maybe your concept of hostility is very different from mine.  See
https://en.wikipedia.org/wiki/Hostility.



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-04 12:37       ` Eli Zaretskii
@ 2022-12-04 12:46         ` John ff
  0 siblings, 0 replies; 29+ messages in thread
From: John ff @ 2022-12-04 12:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Jean Louis, tomas, emacs-devel



⁣Get TypeApp for Android ​

On 4 Dec 2022, 12:38, at 12:38, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sun, 4 Dec 2022 14:57:38 +0300
>> From: Jean Louis <bugs@gnu.support>
>> Cc: emacs-devel@gnu.org
>>
>> * tomas@tuxteam.de <tomas@tuxteam.de> [2022-12-04 13:16]:
>> > > I wonder what kind of answer is this.. Also not using ORG mode at
>all fixes the issue..
>> >
>> > Angelo: I do share your wish. I still think we all can do
>> > without the hostility you express that wish. From where
>> > I stand, it is horribly unjust. Ihor and the other folks
>> > are doing a lot of work we can just profit from.
>>
>> I see that above as funny misunderstanding of course, not
>> hostility. How can that be hostility? Wondering about the answer it
>> means there is some missing information which was clarified by Ihor,
>> and there is bit irony, which I welcome. Irony and wondering are not
>> hostilities.
>>
>> Just my observation.
>
>I guess you didn't read the entire thread if that is what you think.
>Or
>maybe your concept of hostility is very different from mine.  See
>https://en.wikipedia.org/wiki/Hostility.




^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-04  4:34   ` Ihor Radchenko
@ 2022-12-05 15:47     ` Angelo Graziosi
  2022-12-05 17:58       ` Colin Baxter
  0 siblings, 1 reply; 29+ messages in thread
From: Angelo Graziosi @ 2022-12-05 15:47 UTC (permalink / raw)
  To: m43cap@yandex.com; +Cc: emacs-orgmode@gnu.org

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


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-05 15:47     ` Angelo Graziosi
@ 2022-12-05 17:58       ` Colin Baxter
  2022-12-30 12:11         ` Angelo Graziosi
  0 siblings, 1 reply; 29+ messages in thread
From: Colin Baxter @ 2022-12-05 17:58 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-orgmode@gnu.org

>>>>> Angelo Graziosi <angelo.g0@libero.it> 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.

Best wishes,


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-04  3:33     ` Ihor Radchenko
  2022-12-04 11:57       ` Colin Baxter
@ 2022-12-13 13:02       ` Ihor Radchenko
  2022-12-15  8:10         ` Ihor Radchenko
  1 sibling, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2022-12-13 13:02 UTC (permalink / raw)
  To: m43cap; +Cc: tomas, emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> Colin Baxter <m43cap@yandex.com> 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.

Upon further investigation, it looks like we need Org persist all the
time. As temporary storage, at least. In particular, downloading remote
images requires org-persist to store files somewhere. All the times.

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

So, we cannot disable org-persist and should not even do it with Emacs
-Q. Instead, we may redirect org-persist-directory to /tmp in some
scenarios. I will look into doing this soon.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-13 13:02       ` Ihor Radchenko
@ 2022-12-15  8:10         ` Ihor Radchenko
  2022-12-17  9:52           ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2022-12-15  8:10 UTC (permalink / raw)
  To: m43cap; +Cc: tomas, emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> Upon further investigation, it looks like we need Org persist all the
> time. As temporary storage, at least. In particular, downloading remote
> images requires org-persist to store files somewhere. All the times.
> ...
> So, we cannot disable org-persist and should not even do it with Emacs
> -Q. Instead, we may redirect org-persist-directory to /tmp in some
> scenarios. I will look into doing this soon.

I am going to do the following in order to reduce the issue with
littering `user-emacs-directory':

1. When there is no data stored by org-persist (e.g. when the user
   disabled `org-element-cache-persistent' and never uses image
   downloading), do not write anything and do not create the empty
   index.

2. `org-persist-disable-when-emacs-Q' will redirect
   `org-persist-directory' to a temporary directory.
   (this is a bugfix)
   
3. Users who think that org-persist is still on the way may set
   `org-persist-directory' explicitly to, say,
   `temporary-file-directory'.

Let me know if there are any objections.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-15  8:10         ` Ihor Radchenko
@ 2022-12-17  9:52           ` Ihor Radchenko
  0 siblings, 0 replies; 29+ messages in thread
From: Ihor Radchenko @ 2022-12-17  9:52 UTC (permalink / raw)
  To: m43cap; +Cc: tomas, emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> Upon further investigation, it looks like we need Org persist all the
>> time. As temporary storage, at least. In particular, downloading remote
>> images requires org-persist to store files somewhere. All the times.
>> ...
>> So, we cannot disable org-persist and should not even do it with Emacs
>> -Q. Instead, we may redirect org-persist-directory to /tmp in some
>> scenarios. I will look into doing this soon.
>
> I am going to do the following in order to reduce the issue with
> littering `user-emacs-directory':
> ...

Done on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=aa86ed534
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2944a2152

Fixed.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-05 17:58       ` Colin Baxter
@ 2022-12-30 12:11         ` Angelo Graziosi
  2022-12-30 12:38           ` tomas
  2022-12-30 13:04           ` Angelo Graziosi
  0 siblings, 2 replies; 29+ messages in thread
From: Angelo Graziosi @ 2022-12-30 12:11 UTC (permalink / raw)
  To: m43cap; +Cc: emacs-orgmode@gnu.org, thievol@posteo.net

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


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-30 12:11         ` Angelo Graziosi
@ 2022-12-30 12:38           ` tomas
  2022-12-30 13:35             ` Ihor Radchenko
  2022-12-30 13:04           ` Angelo Graziosi
  1 sibling, 1 reply; 29+ messages in thread
From: tomas @ 2022-12-30 12:38 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]

On Fri, Dec 30, 2022 at 01:11:12PM +0100, Angelo Graziosi wrote:
> > 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 &rest 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?

AFAIK there is now a defvar `org-element-cache-persistent'. Maybe it
works for you?

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-30 12:11         ` Angelo Graziosi
  2022-12-30 12:38           ` tomas
@ 2022-12-30 13:04           ` Angelo Graziosi
  2022-12-30 17:42             ` Colin Baxter
  1 sibling, 1 reply; 29+ messages in thread
From: Angelo Graziosi @ 2022-12-30 13:04 UTC (permalink / raw)
  To: m43cap; +Cc: emacs-orgmode@gnu.org, thievol@posteo.net

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.


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-30 12:38           ` tomas
@ 2022-12-30 13:35             ` Ihor Radchenko
  2022-12-30 13:39               ` tomas
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2022-12-30 13:35 UTC (permalink / raw)
  To: tomas; +Cc: emacs-orgmode

<tomas@tuxteam.de> writes:

> AFAIK there is now a defvar `org-element-cache-persistent'. Maybe it
> works for you?

The variable has been there since the beginning.
Now, org-persist is just more careful not to create the directory when
nothing needs to be stored there.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-30 13:35             ` Ihor Radchenko
@ 2022-12-30 13:39               ` tomas
  2022-12-30 14:18                 ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: tomas @ 2022-12-30 13:39 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

On Fri, Dec 30, 2022 at 01:35:39PM +0000, Ihor Radchenko wrote:
> <tomas@tuxteam.de> writes:
> 
> > AFAIK there is now a defvar `org-element-cache-persistent'. Maybe it
> > works for you?
> 
> The variable has been there since the beginning.

But you made me aware of it, and thanks for it :)

> Now, org-persist is just more careful not to create the directory when
> nothing needs to be stored there.

Understood.

Cheers & may the new year...
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-30 13:39               ` tomas
@ 2022-12-30 14:18                 ` Ihor Radchenko
  0 siblings, 0 replies; 29+ messages in thread
From: Ihor Radchenko @ 2022-12-30 14:18 UTC (permalink / raw)
  To: tomas; +Cc: emacs-orgmode

tomas@tuxteam.de writes:

>> The variable has been there since the beginning.
>
> But you made me aware of it, and thanks for it :)

https://orgmode.org/Changes.html ;)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-30 13:04           ` Angelo Graziosi
@ 2022-12-30 17:42             ` Colin Baxter
  2022-12-31  1:29               ` Angelo Graziosi
  2022-12-31 17:01               ` Angelo Graziosi
  0 siblings, 2 replies; 29+ messages in thread
From: Colin Baxter @ 2022-12-30 17:42 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-orgmode@gnu.org, thievol@posteo.net

>>>>> Angelo Graziosi <angelo.g0@libero.it> 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!

Best wishes,


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-30 17:42             ` Colin Baxter
@ 2022-12-31  1:29               ` Angelo Graziosi
  2022-12-31  6:06                 ` Ihor Radchenko
  2022-12-31  7:10                 ` tomas
  2022-12-31 17:01               ` Angelo Graziosi
  1 sibling, 2 replies; 29+ messages in thread
From: Angelo Graziosi @ 2022-12-31  1:29 UTC (permalink / raw)
  To: m43cap; +Cc: emacs-orgmode@gnu.org, thievol@posteo.net


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


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-31  1:29               ` Angelo Graziosi
@ 2022-12-31  6:06                 ` Ihor Radchenko
  2022-12-31  7:10                 ` tomas
  1 sibling, 0 replies; 29+ messages in thread
From: Ihor Radchenko @ 2022-12-31  6:06 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: m43cap, emacs-orgmode@gnu.org, thievol@posteo.net

Angelo Graziosi <angelo.g0@libero.it> writes:

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

I may indeed reappear somewhere.
As I stated in my last message and the commits, we now have the
following:

1. For emacs -Q, the folder, if created, is removed upon closing Emacs
   It may still stay if you do something like kill -9 (I can't do much
   about this scenario).
   Note that this situation is rather unlikely scenario. You need to do
   something manually with emacs -Q.
2. For normal emacs usage, the folder is created only when it is needed
   If you set org-element-cache-persistent to nil, Org may still use
   org-persist for other purposes, like LaTeX previews or caching remote
   images during export.
3. As I suggested in my other message, if you don't like (2), set
   `org-persist-directory' to the location that does not bother you.

   Alternatively, you can use
   https://github.com/emacscollective/no-littering that will organize
   .emacs.d closer to XDG schema.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-31  1:29               ` Angelo Graziosi
  2022-12-31  6:06                 ` Ihor Radchenko
@ 2022-12-31  7:10                 ` tomas
  2023-01-01 13:42                   ` Jean Louis
  1 sibling, 1 reply; 29+ messages in thread
From: tomas @ 2022-12-31  7:10 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1526 bytes --]

On Sat, Dec 31, 2022 at 02:29:43AM +0100, Angelo Graziosi wrote:
> 
> > 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.. 

Hm. I'm sure people are accepting patches?

Having persistence "centralised" in an org-persist facility
should make it easier for you (or me) to control what happens.

Otherwise, each exporter might be creating files everywhere.

Perhaps it would make sense to state the goals in more
detail. I can see many "aspects":

 - "I don't want my ~/.emacs.d/ littered beyond my explicit
   control"
 - "I don't have (nor want to have) XDG directories"
 - "I don't want things in /tmp" [1]
 - "I don't want my Emacs's session state to spill to
   persistent media"

What is it what you (or me, or anyone) wants to achieve?

Cheers

[1] Currently I see two directories in /tmp made by my emacs
   session: some `babel-...', which seems to be made at Org mode
   load (before any babel things are invoked), and `emacs1000'
   (I start Emacs as a server, so that's where the socket goes)
   
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-30 17:42             ` Colin Baxter
  2022-12-31  1:29               ` Angelo Graziosi
@ 2022-12-31 17:01               ` Angelo Graziosi
  1 sibling, 0 replies; 29+ messages in thread
From: Angelo Graziosi @ 2022-12-31 17:01 UTC (permalink / raw)
  To: m43cap; +Cc: emacs-orgmode@gnu.org, thievol@posteo.net


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


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: How to disable completely org-persist
  2022-12-31  7:10                 ` tomas
@ 2023-01-01 13:42                   ` Jean Louis
  0 siblings, 0 replies; 29+ messages in thread
From: Jean Louis @ 2023-01-01 13:42 UTC (permalink / raw)
  To: tomas; +Cc: emacs-orgmode

* tomas@tuxteam.de <tomas@tuxteam.de> [2022-12-31 10:12]:
> Perhaps it would make sense to state the goals in more
> detail. I can see many "aspects":
> 
>  - "I don't want my ~/.emacs.d/ littered beyond my explicit
>    control"

Isn't that happening anyway by various packages and functions? I see
there "auto-install", "auto-save-list" directories, I did not create
them myself. I see "desktop", though I used "desktop" package nobody
warned me it will be there. There is "erc-log" which I did not know it
will be there, there is "eshell", "games", "icons", "image-dired",
"multisession", "newsticker", "todo" and so on, too many.

I never had explicit control over creation of those files.

Using a package alone is not what I consider under "explicit", as I
was not asked directly about any of those directories.

>  - "I don't have (nor want to have) XDG directories"

Me too, I do not want to have, and I do not have, but some XDG
environment variables are there.

>  - "I don't want things in /tmp" [1]

Me too, but I keep it in my private $TMPDIR, as it is unsafe to keep
it in /tmp

I do keep /tmp encrypted for that reason as it is not safe. And my
/home is also encrypted on different partition. 

In general it is unsafe to choose /tmp for private information as then
maybe /tmp is not encrypted.

>  - "I don't want my Emacs's session state to spill to
>    persistent media"

Me too, unless I use "desktop" and that is saved on encrypted
partition.

But I would not like using Org files on remote servers and that
information is anywhere else stored unencrypted about which file I
opened and what I wrote.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2023-01-01 13:44 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-03  0:19 How to disable completely org-persist Angelo Graziosi
2022-12-03  6:05 ` tomas
2022-12-04  8:25   ` Colin Baxter
2022-12-04  3:33     ` Ihor Radchenko
2022-12-04 11:57       ` Colin Baxter
2022-12-13 13:02       ` Ihor Radchenko
2022-12-15  8:10         ` Ihor Radchenko
2022-12-17  9:52           ` Ihor Radchenko
2022-12-04  9:27 ` Angelo Graziosi
2022-12-04  4:34   ` Ihor Radchenko
2022-12-05 15:47     ` Angelo Graziosi
2022-12-05 17:58       ` Colin Baxter
2022-12-30 12:11         ` Angelo Graziosi
2022-12-30 12:38           ` tomas
2022-12-30 13:35             ` Ihor Radchenko
2022-12-30 13:39               ` tomas
2022-12-30 14:18                 ` Ihor Radchenko
2022-12-30 13:04           ` Angelo Graziosi
2022-12-30 17:42             ` Colin Baxter
2022-12-31  1:29               ` Angelo Graziosi
2022-12-31  6:06                 ` Ihor Radchenko
2022-12-31  7:10                 ` tomas
2023-01-01 13:42                   ` Jean Louis
2022-12-31 17:01               ` Angelo Graziosi
2022-12-04  9:32   ` Angelo Graziosi
2022-12-04 10:14   ` tomas
2022-12-04 11:57     ` Jean Louis
2022-12-04 12:37       ` Eli Zaretskii
2022-12-04 12:46         ` John ff

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.