emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem with archive location
@ 2009-01-10 17:55 Matthew Lundin
  2009-01-10 20:57 ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Matthew Lundin @ 2009-01-10 17:55 UTC (permalink / raw)
  To: emacs-orgmode


Hi Carsten et al,

When I have multiple org files archive to a single file, as in 

,----
| (setq org-archive-location "~/2009.org_archive::") 
`----

I find that including archive files in the agenda display (C-u v)
results in multiple identical entries in the agenda display (in my
case, when doing a word search).

In fact, the number of duplicate lines exactly matches the number of
agenda files that archive to that file (in my case 16). Is the agenda
function perhaps searching the archive file once for each of the
agenda files and then displaying the results as separate lines?

By the way, I find the same thing happens when I use the example in
the customize instructions:

,----
| "~/org/archive.org::"
| 	Archive in file ~/org/archive.org (absolute path), as top-level trees.
`----

Thanks,
Matt 

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

* Re: Problem with archive location
  2009-01-10 17:55 Problem with archive location Matthew Lundin
@ 2009-01-10 20:57 ` Carsten Dominik
  2009-01-11 15:08   ` Matthew Lundin
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-01-10 20:57 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode

Hi Matt,

indeed, this is a bug.  Fixed now, thanks for the report.

- Carsten

On Jan 10, 2009, at 6:55 PM, Matthew Lundin wrote:

>
> Hi Carsten et al,
>
> When I have multiple org files archive to a single file, as in
>
> ,----
> | (setq org-archive-location "~/2009.org_archive::")
> `----
>
> I find that including archive files in the agenda display (C-u v)
> results in multiple identical entries in the agenda display (in my
> case, when doing a word search).
>
> In fact, the number of duplicate lines exactly matches the number of
> agenda files that archive to that file (in my case 16). Is the agenda
> function perhaps searching the archive file once for each of the
> agenda files and then displaying the results as separate lines?
>
> By the way, I find the same thing happens when I use the example in
> the customize instructions:
>
> ,----
> | "~/org/archive.org::"
> | 	Archive in file ~/org/archive.org (absolute path), as top-level  
> trees.
> `----
>
> Thanks,
> Matt
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Problem with archive location
  2009-01-10 20:57 ` Carsten Dominik
@ 2009-01-11 15:08   ` Matthew Lundin
  2009-01-11 15:28     ` Matthew Lundin
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Matthew Lundin @ 2009-01-11 15:08 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


Hi Carsten,

Carsten Dominik <dominik@science.uva.nl> writes:

> Hi Matt,
>
> indeed, this is a bug.  Fixed now, thanks for the report.
>
> - Carsten

Thanks for fixing this. 

I had one more question/request concerning archives. Would it perhaps
be possible to enable the file name substitution (i.e., "%s") after
the double semi-colon, so that the file name can be used as a headline
within the archive file? My ideal setup would be to have a single
archive file for each year's work, with headlines named according to
the original files of the archived subtrees.

E.g.,

,----
| * finances.org
| ** archived item
| * notes.org
| ** archived item
| ** another archived item
`----

Thanks,

Matt

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

* Re: Problem with archive location
  2009-01-11 15:08   ` Matthew Lundin
@ 2009-01-11 15:28     ` Matthew Lundin
  2009-01-11 16:47       ` Matthew Lundin
  2009-01-13  7:40     ` Carsten Dominik
  2009-01-17  7:58     ` Carsten Dominik
  2 siblings, 1 reply; 8+ messages in thread
From: Matthew Lundin @ 2009-01-11 15:28 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode


Hi Carsten,

I should clarify a couple things in the previous post:

Matthew Lundin <mdl@imapmail.org> writes:
>
> I had one more question/request concerning archives. 

I'm specifically referring to org-archive-location here.

> Would it perhaps be possible to enable the file name substitution
> (i.e., "%s") after the double semi-colon, so that the file name can
> be used as a headline within the archive file? 

This should read "after the double colon". 

- Matt

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

* Re: Problem with archive location
  2009-01-11 15:28     ` Matthew Lundin
@ 2009-01-11 16:47       ` Matthew Lundin
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Lundin @ 2009-01-11 16:47 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode


Hi Carsten,

Matthew Lundin <mdl@imapmail.org> writes:
>
> I had one more question/request concerning archives. 

> Would it perhaps be possible to enable the file name substitution
> (i.e., "%s") after the double semi-colon, so that the file name can
> be used as a headline within the archive file? 

Sorry to follow up with one more post. Though I confess that I'm on
shaky ground here, I seem to have been able to accomplish the desired
behavior (i.e., a single yearly archive file with headings showing the
original file name) by advising the function org-archive-subtree.

,----
| (setq org-archive-location (concat "~/archive/" (format-time-string "%Y") ".org::"))
|
| (defadvice org-archive-subtree (around my-org-archive-subtree-around)
|   (let ((org-archive-location (concat "~/archive/" (format-time-string "%Y") ".org::* "(buffer-name))))
|     ad-do-it))
| 
| (ad-activate 'org-archive-subtree)
`----

If anyone sees anything blatantly wrong or hopelessly naive about this
setup, feel free to let me know. If it looks O.K., then please feel
free to disregard my previous request about changing the behavior of
org-archive-location.

Best,

Matt

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

* Re: Problem with archive location
  2009-01-11 15:08   ` Matthew Lundin
  2009-01-11 15:28     ` Matthew Lundin
@ 2009-01-13  7:40     ` Carsten Dominik
  2009-01-13 11:47       ` Matthew Lundin
  2009-01-17  7:58     ` Carsten Dominik
  2 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-01-13  7:40 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode


On Jan 11, 2009, at 4:08 PM, Matthew Lundin wrote:

>
> Hi Carsten,
>
> Carsten Dominik <dominik@science.uva.nl> writes:
>
>> Hi Matt,
>>
>> indeed, this is a bug.  Fixed now, thanks for the report.
>>
>> - Carsten
>
> Thanks for fixing this.
>
> I had one more question/request concerning archives. Would it perhaps
> be possible to enable the file name substitution (i.e., "%s") after
> the double semi-colon, so that the file name can be used as a headline
> within the archive file? My ideal setup would be to have a single
> archive file for each year's work, with headlines named according to
> the original files of the archived subtrees.


This is now implemented.  Thanks for the idea.

- Carsten

>
>
> E.g.,
>
> ,----
> | * finances.org
> | ** archived item
> | * notes.org
> | ** archived item
> | ** another archived item
> `----
>
> Thanks,
>
> Matt
>
>

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

* Re: Problem with archive location
  2009-01-13  7:40     ` Carsten Dominik
@ 2009-01-13 11:47       ` Matthew Lundin
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Lundin @ 2009-01-13 11:47 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <dominik@science.uva.nl> writes:

> On Jan 11, 2009, at 4:08 PM, Matthew Lundin wrote:
>>
>> I had one more question/request concerning archives. Would it perhaps
>> be possible to enable the file name substitution (i.e., "%s") after
>> the double semi-colon, so that the file name can be used as a headline
>> within the archive file? My ideal setup would be to have a single
>> archive file for each year's work, with headlines named according to
>> the original files of the archived subtrees.
>
>
> This is now implemented.  Thanks for the idea.
>
> - Carsten

Thanks!

- Matt

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

* Re: Problem with archive location
  2009-01-11 15:08   ` Matthew Lundin
  2009-01-11 15:28     ` Matthew Lundin
  2009-01-13  7:40     ` Carsten Dominik
@ 2009-01-17  7:58     ` Carsten Dominik
  2 siblings, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2009-01-17  7:58 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 947 bytes --]

Hi Matt,

sure, I can see how this will be useful when pointing a number
of files to the same archive.

I have implemented this.

- Carsten

On Jan 11, 2009, at 4:08 PM, Matthew Lundin wrote:

>
> Hi Carsten,
>
> Carsten Dominik <dominik@science.uva.nl> writes:
>
>> Hi Matt,
>>
>> indeed, this is a bug.  Fixed now, thanks for the report.
>>
>> - Carsten
>
> Thanks for fixing this.
>
> I had one more question/request concerning archives. Would it perhaps
> be possible to enable the file name substitution (i.e., "%s") after
> the double semi-colon, so that the file name can be used as a headline
> within the archive file? My ideal setup would be to have a single
> archive file for each year's work, with headlines named according to
> the original files of the archived subtrees.
>
> E.g.,
>
> ,----
> | * finances.org
> | ** archived item
> | * notes.org
> | ** archived item
> | ** another archived item
> `----
>
> Thanks,
>
> Matt
>
>


[-- Attachment #1.2: Type: text/html, Size: 1555 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2009-01-17  7:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-10 17:55 Problem with archive location Matthew Lundin
2009-01-10 20:57 ` Carsten Dominik
2009-01-11 15:08   ` Matthew Lundin
2009-01-11 15:28     ` Matthew Lundin
2009-01-11 16:47       ` Matthew Lundin
2009-01-13  7:40     ` Carsten Dominik
2009-01-13 11:47       ` Matthew Lundin
2009-01-17  7:58     ` Carsten Dominik

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