emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Level specification in refiling target
@ 2007-12-05 15:50 Wanrong Lin
  2007-12-09 21:32 ` Bastien
  2007-12-17 16:11 ` Carsten Dominik
  0 siblings, 2 replies; 3+ messages in thread
From: Wanrong Lin @ 2007-12-05 15:50 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I have a line like this (copied from the org release notes)

(setq org-refile-targets '((org-agenda-files . (:level . 2))))

My intention was to have all headings in level 2 AND level 1 in the 
target list. But it seems only level 2 headings are in the list. Is 
there a way to do it? If not, can we consider adding that? Thanks a lot.

Wanrong

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

* Re: Level specification in refiling target
  2007-12-05 15:50 Level specification in refiling target Wanrong Lin
@ 2007-12-09 21:32 ` Bastien
  2007-12-17 16:11 ` Carsten Dominik
  1 sibling, 0 replies; 3+ messages in thread
From: Bastien @ 2007-12-09 21:32 UTC (permalink / raw)
  To: Wanrong Lin; +Cc: emacs-orgmode

Wanrong Lin <wanrong.lin@gmail.com> writes:

> I have a line like this (copied from the org release notes)
>
> (setq org-refile-targets '((org-agenda-files . (:level . 2))))
>
> My intention was to have all headings in level 2 AND level 1 in the
> target list. But it seems only level 2 headings are in the list. Is
> there a way to do it? If not, can we consider adding that? Thanks a
> lot.

This makes sense.

Here is a dumb patch against Org 5.16b that should implement the
expected behavior.  

diff -u /home/guerry/elisp/testing/org-5.16b/ /home/guerry/elisp/testing/tmp/org.el
--- /home/guerry/elisp/testing/org-5.16b/org.el	2007-12-04 08:40:13.000000000 +0000
+++ /home/guerry/elisp/testing/tmp/org.el	2007-12-09 21:23:48.000000000 +0000
@@ -13486,7 +13486,7 @@
        ((eq (car desc) :regexp)
 	(setq descre (cdr desc)))
        ((eq (car desc) :level)
-	(setq descre (concat "^\\*\\{" (number-to-string
+	(setq descre (concat "^\\*\\{1," (number-to-string
 					(if org-odd-levels-only
 					    (1- (* 2 (cdr desc)))
 					  (cdr desc)))

Diff finished.  Sun Dec  9 21:23:55 2007

I'm not sure it's the right thing to do, though.  Maybe it's better to
let the user define the level as a string of the form "1,2" (for levels
one to two, or "2,5" (for levels 2 to 5) or "5," etc.

-- 
Bastien

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

* Re: Level specification in refiling target
  2007-12-05 15:50 Level specification in refiling target Wanrong Lin
  2007-12-09 21:32 ` Bastien
@ 2007-12-17 16:11 ` Carsten Dominik
  1 sibling, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2007-12-17 16:11 UTC (permalink / raw)
  To: Wanrong Lin; +Cc: emacs-orgmode

Hi Wanrong,

On Dec 5, 2007, at 4:50 PM, Wanrong Lin wrote:

> Hi,
>
> I have a line like this (copied from the org release notes)
>
> (setq org-refile-targets '((org-agenda-files . (:level . 2))))
>
> My intention was to have all headings in level 2 AND level 1 in the  
> target list. But it seems only level 2 headings are in the list. Is  
> there a way to do it? If not, can we consider adding that? Thanks a  
> lot.

In 5.17, you will be able to do

(setq org-refile-targets '((org-agenda-files . (:maxlevel . 2))))


- Carsten

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

end of thread, other threads:[~2007-12-17 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-05 15:50 Level specification in refiling target Wanrong Lin
2007-12-09 21:32 ` Bastien
2007-12-17 16:11 ` 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).