all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Samuel Wales <samologist@gmail.com>
Cc: emacs-orgmode@gnu.org, David Masterson <dsmasterson92630@outlook.com>
Subject: Re: archiving speed [was Re: Tips on maintaining history in Org Mode]
Date: Mon, 01 Mar 2021 14:02:29 +0800	[thread overview]
Message-ID: <87mtvn8l8q.fsf@localhost> (raw)
In-Reply-To: <CAJcAo8uRGXzMxZ_jm_mogGQ+kyR7=pEZf3gAciA_PxX0OX6_jQ@mail.gmail.com>

Samuel Wales <samologist@gmail.com> writes:

> that makes sense.  but why would appending to an archive as the result
> of bulk archiving lag?  if the problem is large archive files, which
> i'd bet is the case for a lot of users and not just me, then could org
> in principle be changed so that all it does is append?  thus not lag?
> like, build the entry in a temporary buffer?

Looking into the source code, the culprit appears to be the call to
org-show-all inside org-archive-subtree. The call to org-show-all on
master calls org-cycle-hide-drawers, which goes through every single
drawer (= every archived heading in archive file) and folds it manually
(just to unfold it later). Do not ask.

> as i see it, having more than one archive file per org file is good
> for speed, but doesn't work in existing org, because iirc e.g. v A in
> the agenda goes org agenda file -> corresponding archive file and will
> miss the archive files that do not have a corresponding org file with
> exactly the same basename sans extension.

The code from my config takes care about this. v A will work. I plan to
suggest it for master in future, but I am focused on the org-fold branch
for now. If you wish, feel free to propose a patch based on this code.

>> 3. (untested) Put #+STARTUP: showeverything at the beginning of the
>>    archives, so that nothing is going to be folded
>
> good idea.  my included-by-agenda archive files do seem to be in
> showeveryting mode already for some reason.  but perhaps not when bulk
> archiving.
>
> would it be a silly idea for an fr that org make this an option for
> bulk archiving?  hmm or for archive files in general?

Upon reviewing the source of org-archive-subtree, this should not be
needed. Actually, org-mode already disables startup visibility and
various hooks when opening archives. As you can see, it is not
sufficient, since org-archive shoots its own leg later by changing
visibility every time you archive a subtree.

>> Sorry, the config is actually not yet formatted for public use. You can
>> search for the code block containing "defun org-archive--compute-location".
>
> firefox find does not seem to find it.

This is odd. All I can suggest then is cloning the repo and searching
using Emacs. Emacs is more reliable when opening org files ;)

git clone https://github.com/yantar92/emacs-config
emacs emacs-config/config.org

Best,
Ihor


  reply	other threads:[~2021-03-01  5:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01  4:22 archiving speed [was Re: Tips on maintaining history in Org Mode] Samuel Wales
2021-03-01  6:02 ` Ihor Radchenko [this message]
2021-08-11  1:08 ` Samuel Wales
2021-08-11  4:13   ` Ihor Radchenko
2021-08-11  5:58     ` Samuel Wales
2021-08-11  6:43       ` Ihor Radchenko
2021-08-11 22:23         ` Samuel Wales
2021-08-12  0:24           ` Ihor Radchenko
2021-08-12  5:47             ` Samuel Wales
2021-08-12  3:38           ` Tim Cross
2021-08-12  5:49             ` Samuel Wales
2021-08-12  5:56               ` Tim Cross
2021-10-17 12:08       ` Ihor Radchenko

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

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

  git send-email \
    --in-reply-to=87mtvn8l8q.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=dsmasterson92630@outlook.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=samologist@gmail.com \
    /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 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.