From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Seeking further clarification of org-refile-targets variable Date: Sat, 20 Dec 2008 23:03:49 +0100 Message-ID: References: <200812180627.mBI6RfNi009606@mail01.syd.optusnet.com.au> <87myetoa4g.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LE9vP-0005QL-5h for emacs-orgmode@gnu.org; Sat, 20 Dec 2008 17:03:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LE9vN-0005Q7-Fq for emacs-orgmode@gnu.org; Sat, 20 Dec 2008 17:03:53 -0500 Received: from [199.232.76.173] (port=34487 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LE9vN-0005Q4-9R for emacs-orgmode@gnu.org; Sat, 20 Dec 2008 17:03:53 -0500 Received: from mail-ew0-f13.google.com ([209.85.219.13]:47402) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LE9vM-0000Tg-DT for emacs-orgmode@gnu.org; Sat, 20 Dec 2008 17:03:52 -0500 Received: by ewy6 with SMTP id 6so1717149ewy.18 for ; Sat, 20 Dec 2008 14:03:51 -0800 (PST) In-Reply-To: <87myetoa4g.fsf@gollum.intra.norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: emacs-orgmode@gnu.org, charles_cave@optusnet.com.au On Dec 18, 2008, at 3:01 PM, Bernt Hansen wrote: > Charles Cave 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