emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] archiving creates duplicate entries
@ 2021-05-09 21:37 Samuel Wales
  2021-05-10  2:05 ` Samuel Wales
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Wales @ 2021-05-09 21:37 UTC (permalink / raw)
  To: emacs-orgmode

when i do a bulk archive, it will sometimes put 2 copies
entries into the archive file.  it is more likely to occur
if i am archiving more tasks.  at times, it seems certain
entries do this repeatably, but i am not sure.

there are times when i think i have reset everything (git is
clean, archives are moved out of teh way) but this still
occurs.  i cannot make an mwe but it seemed worth reporting.
where is it getting the duplicates from?  idk.  it has to be
either the source .org file or the newly created and written
archive file.  idk if there are any caches or text
properties or some hidden stuff in the agenda.  but i can
tell you that there have been times when i experimented with
not cleaning everything and the duplicates increased.  each
run would create a new duplicate of certain entries.

btw i have been trying to archive tasks to files for a year
now.  it is too slow for me.  so i hit on the idea of moving
archives out of the way, then archiving a little at a time
to new archive files, then using the shell to append the new
archived entries to the old archive files, then moving the
old archive files back.  thus, this isn't an issue of big
archive files.

wish i could provide more for you or even figure out
debugging but i cannot; just hope it will ring bells.


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

* Re: [bug] archiving creates duplicate entries
  2021-05-09 21:37 [bug] archiving creates duplicate entries Samuel Wales
@ 2021-05-10  2:05 ` Samuel Wales
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Wales @ 2021-05-10  2:05 UTC (permalink / raw)
  To: emacs-orgmode

i have confirmed that this bug occurs as follows.

archiving commands append to a buffer for the archive.  they do not
save, revert, or kill that buffer.  my shell workaround, to allow
archiving given completely unusably slow archiving, moved the archive
files [so that they would not be slow].

therefore there were no archives on disk.  but a full buffer.

therefore, archiving appended to existing buffers that did not match
what was on disk.  then saved.  ergo duplicates.

suggested fix: kill the archive buffer before appending to it, if it
is marked as unmodified.

if it is not marked as unmodified, maybe it is ok to append?  idk.


On 5/9/21, Samuel Wales <samologist@gmail.com> wrote:
> when i do a bulk archive, it will sometimes put 2 copies
> entries into the archive file.  it is more likely to occur
> if i am archiving more tasks.  at times, it seems certain
> entries do this repeatably, but i am not sure.
>
> there are times when i think i have reset everything (git is
> clean, archives are moved out of teh way) but this still
> occurs.  i cannot make an mwe but it seemed worth reporting.
> where is it getting the duplicates from?  idk.  it has to be
> either the source .org file or the newly created and written
> archive file.  idk if there are any caches or text
> properties or some hidden stuff in the agenda.  but i can
> tell you that there have been times when i experimented with
> not cleaning everything and the duplicates increased.  each
> run would create a new duplicate of certain entries.
>
> btw i have been trying to archive tasks to files for a year
> now.  it is too slow for me.  so i hit on the idea of moving
> archives out of the way, then archiving a little at a time
> to new archive files, then using the shell to append the new
> archived entries to the old archive files, then moving the
> old archive files back.  thus, this isn't an issue of big
> archive files.
>
> wish i could provide more for you or even figure out
> debugging but i cannot; just hope it will ring bells.
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html


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

end of thread, other threads:[~2021-05-10  2:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-09 21:37 [bug] archiving creates duplicate entries Samuel Wales
2021-05-10  2:05 ` Samuel Wales

Code repositories for project(s) associated with this 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).