From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: Refile to a different Org file? Date: Wed, 24 Nov 2010 22:44:53 +0100 Message-ID: <80k4k2jt0q.fsf@missioncriticalit.com> References: <201011241714.oAOHE4bs026263@hormel5.ieee.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Raymond, "Raymond Zeitler" wrote: > I'm trying to change the value of org-refile-targets to enable me to refi= le > to the other files that make up my agenda view. Its value started out as > just nil, which worked exactly right for one file because I was able to > refile to all the *categories* in ~/todo.org, using tab completion, and it > didn't get confused by tags or heading names. > > So far I've used customization to put this into the appropriate section of > my .emacs: > > '(org-refile-targets (quote ((org-agenda-files :maxlevel . 1) (nil > :maxlevel . 1)))) > > This doesn't work the way I expect. I figured out that I can refile if I > specify the heading "Tasks" and the filename. But I cannot refile to any > categories other than the ones in ~/todo.org. And sometimes I get choices > that I don't want where the heading starts with the same text as the > category name. BTW, I use unique category names across all files. This is what I'm using: #+begin_src emacs-lisp ;; any headline with level <=3D 2 is a target (setq org-refile-targets '((nil :maxlevel . 2) ; all top-level headlines in the ; current buffer are used (first) as a ; refile target (org-agenda-files :maxlevel . 2))) ;; provide refile targets as paths, including the file name ;; (without directory) as level 1 of the path (setq org-refile-use-outline-path 'file) ;; allow to create new nodes (must be confirmed by the user) as ;; refile targets (setq org-refile-allow-creating-parent-nodes 'confirm) ;; refile only within the current buffer (defun my/org-refile-within-current-buffer () "Move the entry at point to another heading in the current buffer." (interactive) (let ((org-refile-targets '((nil :maxlevel . 5)))) (org-refile))) #+end_src In particular, the file notation allows me to easily refile to any Org file (from the agenda ones): Work.org/Appointments or Perso.org/Appointments Does this answer your concern, or did I miss your point? Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode