* Seeking further clarification of org-refile-targets variable
@ 2008-12-18 6:27 Charles Cave
2008-12-18 13:43 ` Matthew Lundin
2008-12-18 14:01 ` Bernt Hansen
0 siblings, 2 replies; 6+ messages in thread
From: Charles Cave @ 2008-12-18 6:27 UTC (permalink / raw)
To: emacs-orgmode
I am having trouble understanding the help text for org-refile-targets.
I don't know what a "cons cell" is and I would like to see some examples
of customising the variable.
For example, how can I specify headings of levels 1 and 2?
I entered the value of
(:level . N).
in the customization prompt but now I get a message
"No refile targets".
Perhaps some examples for non-Lisp programmers would be helpful.
As org-mode popularity increases, the users are not necessarily
Lisp-literate, and I have read messages from users willing to learn
Emacs just to use org-mode!
Thanks,
Charles
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Seeking further clarification of org-refile-targets variable
2008-12-18 6:27 Seeking further clarification of org-refile-targets variable Charles Cave
@ 2008-12-18 13:43 ` Matthew Lundin
2008-12-18 13:51 ` Matthew Lundin
2008-12-18 14:01 ` Bernt Hansen
1 sibling, 1 reply; 6+ messages in thread
From: Matthew Lundin @ 2008-12-18 13:43 UTC (permalink / raw)
To: charles_cave; +Cc: emacs-orgmode
Hi Charles,
Charles Cave <charles_cave@optusnet.com.au> writes:
> I am having trouble understanding the help text for org-refile-targets.
> I don't know what a "cons cell" is and I would like to see some examples
> of customising the variable.
>
> For example, how can I specify headings of levels 1 and 2?
> I entered the value of
> (:level . N).
> in the customization prompt but now I get a message
> "No refile targets".
>
I believe you need to substitute a number for N, such as:
(:level . 2:)
But I think the setting you're looking for is:
(:maxlevel . 2:)
As I understand it, the difference between level and maxlevel is that
the level setting only offers level 2 headlines as targets, while the
maxlevel offers both level 1 or level 2 headlines as targets.
I think this is a good candidate for an FAQ entry. I'll put it up on
Worg.
> Perhaps some examples for non-Lisp programmers would be helpful.
>
> As org-mode popularity increases, the users are not necessarily
> Lisp-literate, and I have read messages from users willing to learn
> Emacs just to use org-mode!
Yes, as a long-time vim user, I was certainly in that category. And I
have to say that your very helpful and accessible tutorials were one
of the first things that drew me to org-mode (and emacs) in the first
place.
Best,
Matt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Seeking further clarification of org-refile-targets variable
2008-12-18 13:43 ` Matthew Lundin
@ 2008-12-18 13:51 ` Matthew Lundin
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Lundin @ 2008-12-18 13:51 UTC (permalink / raw)
To: Matthew Lundin; +Cc: emacs-orgmode, charles_cave
Matthew Lundin <mdl@imapmail.org> writes:
>
> I believe you need to substitute a number for N, such as:
>
> (:level . 2:)
>
> But I think the setting you're looking for is:
>
> (:maxlevel . 2:)
Oops, that should be:
(:level . 2)
(:maxlevel . 2)
[Thank goodness for smileys in gnus, which alerted me to my own error.
I'm afraid I'm too used to PmWiki markup, so I tried to close the
opening parenthesis-colon.]
For good measure my own full setting is:
(setq org-refile-targets '((org-agenda-files :maxlevel . 2)))
Best,
Matt
>
> As I understand it, the difference between level and maxlevel is that
> the level setting only offers level 2 headlines as targets, while the
> maxlevel offers both level 1 or level 2 headlines as targets.
>
> I think this is a good candidate for an FAQ entry. I'll put it up on
> Worg.
>
>> Perhaps some examples for non-Lisp programmers would be helpful.
>>
>> As org-mode popularity increases, the users are not necessarily
>> Lisp-literate, and I have read messages from users willing to learn
>> Emacs just to use org-mode!
>
> Yes, as a long-time vim user, I was certainly in that category. And I
> have to say that your very helpful and accessible tutorials were one
> of the first things that drew me to org-mode (and emacs) in the first
> place.
>
> Best,
>
> 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] 6+ messages in thread
* Re: Seeking further clarification of org-refile-targets variable
2008-12-18 6:27 Seeking further clarification of org-refile-targets variable Charles Cave
2008-12-18 13:43 ` Matthew Lundin
@ 2008-12-18 14:01 ` Bernt Hansen
2008-12-18 14:25 ` Matthew Lundin
2008-12-20 22:03 ` Carsten Dominik
1 sibling, 2 replies; 6+ messages in thread
From: Bernt Hansen @ 2008-12-18 14:01 UTC (permalink / raw)
To: charles_cave; +Cc: emacs-orgmode
Charles Cave <charles_cave@optusnet.com.au> writes:
> I am having trouble understanding the help text for org-refile-targets.
> I don't know what a "cons cell" is and I would like to see some examples
> of customising the variable.
>
> For example, how can I specify headings of levels 1 and 2?
> I entered the value of
> (:level . N).
> in the customization prompt but now I get a message
> "No refile targets".
>
> Perhaps some examples for non-Lisp programmers would be helpful.
>
> As org-mode popularity increases, the users are not necessarily
> Lisp-literate, and I have read messages from users willing to learn
> Emacs just to use org-mode!
A cons cell is a lisp structure which has two values in parentheses
separated by a dot
ie. (A . B)
There are functions (car and cdr) which returns the two values in the
cons cell respectively.
The easiest way to modify org-refile-targets is with the customize
interface.
C-h v org-refile-targets RET
then click the "You can _customize_ this variable." link
and then use the buttons to construct the value.
I have this value set as follows:
,----
| org-refile-targets is a variable defined in `org.el'.
| Its value is
| ((org-agenda-files :level . 1)
| (nil :level . 1))
`----
where:
(org-agenda-files :level . 1) specifies all level 1 targets in all
of my org files listed in
org-agenda-files
(nil :level . 1) specifies all level 1 files in the
current buffer
Sometimes I work in org-files which are not part of my
org-agenda-files list and I want to be able to refile to level 1 targets
in that file too.
I think you want the following setting:
,----
| org-refile-targets is a variable defined in `org.el'.
| Its value is
| ((org-agenda-files :level . 1)
| (org-agenda-files :level . 2))
`----
HTH,
Bernt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: Seeking further clarification of org-refile-targets variable
2008-12-18 14:01 ` Bernt Hansen
@ 2008-12-18 14:25 ` Matthew Lundin
2008-12-20 22:03 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Matthew Lundin @ 2008-12-18 14:25 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode, charles_cave
Hi Bernt,
Bernt Hansen <bernt@norang.ca> writes:
> Charles Cave <charles_cave@optusnet.com.au> writes:
>
> I have this value set as follows:
>
> ,----
> | org-refile-targets is a variable defined in `org.el'.
> | Its value is
> | ((org-agenda-files :level . 1)
> | (nil :level . 1))
> `----
>
> where:
>
> (org-agenda-files :level . 1) specifies all level 1 targets in all
> of my org files listed in
> org-agenda-files
>
> (nil :level . 1) specifies all level 1 files in the
> current buffer
>
> Sometimes I work in org-files which are not part of my
> org-agenda-files list and I want to be able to refile to level 1 targets
> in that file too.
I hadn't realized one could mix and match refile targets. This is very
nice. Thanks for the clarification.
Matt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: Seeking further clarification of org-refile-targets variable
2008-12-18 14:01 ` Bernt Hansen
2008-12-18 14:25 ` Matthew Lundin
@ 2008-12-20 22:03 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2008-12-20 22:03 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode, charles_cave
On Dec 18, 2008, at 3:01 PM, Bernt Hansen wrote:
> Charles Cave <charles_cave@optusnet.com.au> writes:
>
>> I am having trouble understanding the help text for org-refile-
>> targets.
>> I don't know what a "cons cell" is and I would like to see some
>> examples
>> of customising the variable.
>>
>> For example, how can I specify headings of levels 1 and 2?
>> I entered the value of
>> (:level . N).
>> in the customization prompt but now I get a message
>> "No refile targets".
>>
>> Perhaps some examples for non-Lisp programmers would be helpful.
>>
>> As org-mode popularity increases, the users are not necessarily
>> Lisp-literate, and I have read messages from users willing to learn
>> Emacs just to use org-mode!
>
> A cons cell is a lisp structure which has two values in parentheses
> separated by a dot
>
> ie. (A . B)
>
> There are functions (car and cdr) which returns the two values in the
> cons cell respectively.
>
> The easiest way to modify org-refile-targets is with the customize
> interface.
>
> C-h v org-refile-targets RET
>
> then click the "You can _customize_ this variable." link
>
> and then use the buttons to construct the value.
>
> I have this value set as follows:
>
> ,----
> | org-refile-targets is a variable defined in `org.el'.
> | Its value is
> | ((org-agenda-files :level . 1)
> | (nil :level . 1))
> `----
>
> where:
>
> (org-agenda-files :level . 1) specifies all level 1 targets in all
> of my org files listed in
> org-agenda-files
>
> (nil :level . 1) specifies all level 1 files in the
> current buffer
>
> Sometimes I work in org-files which are not part of my
> org-agenda-files list and I want to be able to refile to level 1
> targets
> in that file too.
>
> I think you want the following setting:
>
> ,----
> | org-refile-targets is a variable defined in `org.el'.
> | Its value is
> | ((org-agenda-files :level . 1)
> | (org-agenda-files :level . 2))
> `----
This works well, but faster is:
((org-agenda-files :maxlevel . 2))
Because it will do only one pass over all involved files.
- Carsten
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-20 22:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-18 6:27 Seeking further clarification of org-refile-targets variable Charles Cave
2008-12-18 13:43 ` Matthew Lundin
2008-12-18 13:51 ` Matthew Lundin
2008-12-18 14:01 ` Bernt Hansen
2008-12-18 14:25 ` Matthew Lundin
2008-12-20 22:03 ` 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).