emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Gustavo Barros <gusbrs.2016@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: org-mode list <emacs-orgmode@gnu.org>
Subject: Re: How to disable org-persist in a given file?
Date: Sun, 23 Apr 2023 10:15:48 -0300	[thread overview]
Message-ID: <CAM9ALR8q-bWRT_8o8cDBMLTDEKfss6OhuSS9-JW1hCsrzTR_yg@mail.gmail.com> (raw)
In-Reply-To: <87fs8quapc.fsf@localhost>

Hi Ihor,

On Sun, 23 Apr 2023 at 07:55, Ihor Radchenko <yantar92@posteo.net> wrote:

> Thanks for letting us know about this scenario!

Yes, but there's little Emacs/Org can do there, I think. Once the
volume is mounted, there's no way to tell it is meant to be treated as
an encrypted file.

With time I'm learning that non-standard setups, while they may seem
attractive at first, come and bite you sooner or later. Not
necessarily because they are technically flawed, but because it breaks
people's expectations.

I do have some unusual partitioning scheme, and sometimes it becomes
an uphill battle to avoid leakages. On Emacs alone, I have to take
special care of backups, bookmarks (that's now fixed on 29), trash,
and now cache.

> You can use `org-persist-before-write-hook' to disable writing
> selectively.

Thanks! That's the one. Though it would be nice if a variable existed
for the purpose. `(add-hook 'org-persist-before-write-hook (lambda
(&rest _args) t) nil t)' is not our average file local variable. :)

> You can refer to the comment in org-persist.el for explanation about the
> core concepts about CONTAINER and ASSOCIATED terms.
>
> Let us know if you have difficulties understanding the commentary or if
> you think that things can be improved.

I took a closer look at it now, and I think it is clear. But I do have
a suggestion. I've seen the use of `org-persist' by `org-element' by
default announced in the news file. But I think this would deserve an
entry in the manual (as far as I can tell, currently there isn't one,
but I'm running built-in on 29, so I might be out of date), letting
people know it is enabled by default, and how to opt out, if they want
to. As my scenario above shows, there's little hope of being able to
cover "all cases", and people must take care of that for themselves
within reason. All Org can do is let people know, and on security
related issues, better be outspoken than shy.

And thank you very much for this nice feature!

Best,
Gustavo.


  reply	other threads:[~2023-04-23 14:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-22 19:32 How to disable org-persist in a given file? Gustavo Barros
2023-04-23 10:58 ` Ihor Radchenko
2023-04-23 13:15   ` Gustavo Barros [this message]
2023-04-23 13:35     ` Ruijie Yu via General discussions about Org-mode.
2023-04-23 14:27       ` Gustavo Barros
2023-04-23 13:54     ` Ihor Radchenko
2023-04-23 14:13       ` Gustavo Barros
2023-04-25 10:24         ` Ihor Radchenko
2023-04-25 10:52           ` Gustavo Barros
2023-05-02 20:36             ` Gustavo Barros
2023-05-02 20:57               ` Ihor Radchenko
2023-05-02 21:25                 ` Gustavo Barros
2023-05-03 10:58               ` Ihor Radchenko
2023-05-03 11:03                 ` Gustavo Barros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM9ALR8q-bWRT_8o8cDBMLTDEKfss6OhuSS9-JW1hCsrzTR_yg@mail.gmail.com \
    --to=gusbrs.2016@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).