emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Wishlist: let org-refile find buffers that have been renamed
@ 2010-12-23  0:53 Hsiu-Khuern Tang
  2010-12-23  0:58 ` Samuel Wales
  0 siblings, 1 reply; 5+ messages in thread
From: Hsiu-Khuern Tang @ 2010-12-23  0:53 UTC (permalink / raw)
  To: orgmode

Hi,

I have a perhaps unusual way of organizing my agenda files like this:

project1/notes.org
project2/notes.org
...

and I use rename-buffer in each notes.org to make sure I can tell them
apart, e.g.,

- In project1/notes.org, I have (rename-buffer "project1.org")

- In project2/notes.org, I have (rename-buffer "project2.org")

This works fine with commands like C-c b (org-iswitchb), which
displays the renamed buffers ( "project1.org" and "project2.org") in
the minibuffer prompt.  However, C-c w (org-refile) does not find
these targets --- it would be nice if it did!  I think the "problem"
is in the function org-get-refile-targets in org.el, but I'm not good
at hacking elisp.

I am using ido completion (org-completion-use-ido is non-nil).

Thanks!

Hsiu-Khuern.

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

* Re: Wishlist: let org-refile find buffers that have been renamed
  2010-12-23  0:53 Wishlist: let org-refile find buffers that have been renamed Hsiu-Khuern Tang
@ 2010-12-23  0:58 ` Samuel Wales
  2010-12-23  2:08   ` Hsiu-Khuern Tang
  0 siblings, 1 reply; 5+ messages in thread
From: Samuel Wales @ 2010-12-23  0:58 UTC (permalink / raw)
  To: Hsiu-Khuern Tang; +Cc: orgmode

Did you try uniquify?

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

* Re: Wishlist: let org-refile find buffers that have been renamed
  2010-12-23  0:58 ` Samuel Wales
@ 2010-12-23  2:08   ` Hsiu-Khuern Tang
  2010-12-23  2:53     ` Suvayu Ali
  0 siblings, 1 reply; 5+ messages in thread
From: Hsiu-Khuern Tang @ 2010-12-23  2:08 UTC (permalink / raw)
  To: Samuel Wales; +Cc: orgmode

Hi Samuel,

Thanks for the suggestion.  I just tried it, and it does a nice job
choosing easy-to-identify buffer names.  But those buffer names again
do not come up for selection by C-c C-w (org-refile).

-- 
Best,
Hsiu-Khuern.

On Wed, Dec 22, 2010 at 4:58 PM, Samuel Wales <samologist@gmail.com> wrote:
> Did you try uniquify?
>

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

* Re: Wishlist: let org-refile find buffers that have been renamed
  2010-12-23  2:08   ` Hsiu-Khuern Tang
@ 2010-12-23  2:53     ` Suvayu Ali
  2010-12-23  6:05       ` Nathan Neff
  0 siblings, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2010-12-23  2:53 UTC (permalink / raw)
  To: emacs-orgmode

On Wednesday 22 December 2010 06:08 PM, Hsiu-Khuern Tang wrote:
> Hi Samuel,
>
> Thanks for the suggestion.  I just tried it, and it does a nice job
> choosing easy-to-identify buffer names.  But those buffer names again
> do not come up for selection by C-c C-w (org-refile).

I think org-refile ignores duplicate entries and refiles to the first 
match. I have observed this same behaviour even for sub-trees with same 
names.

e.g.

* top headline
** sub-heading
    Text for sub-heading 1
** sub-heading
    Text for sub-heading 2


-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Wishlist: let org-refile find buffers that have been renamed
  2010-12-23  2:53     ` Suvayu Ali
@ 2010-12-23  6:05       ` Nathan Neff
  0 siblings, 0 replies; 5+ messages in thread
From: Nathan Neff @ 2010-12-23  6:05 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: emacs-orgmode

On Wed, Dec 22, 2010 at 8:53 PM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
> On Wednesday 22 December 2010 06:08 PM, Hsiu-Khuern Tang wrote:
>>
>> Hi Samuel,
>>
>> Thanks for the suggestion.  I just tried it, and it does a nice job
>> choosing easy-to-identify buffer names.  But those buffer names again
>> do not come up for selection by C-c C-w (org-refile).

I'm going to try this tomorrow, but in case it doesn't work with C-c C-w,
I would like to vote +1 for this feature.

I have a wiki (in org-mode) and my personal notes (in org-mode) and
they're stored in different directories.  I also have common filenames
like this:

wiki/grails.org
wiki/groovy.org
wiki/vim.org

and

personal/grails.org
personal/groovy.org
personal/vim.org

I resolve this problem currently by refiling my personal items first,
then refiling
my wiki last.  I have two custom methods that set my refile target to
my wiki or my personal directory.  I run njn/set-refile-personal when
I want to refile to my personal directory, and I run
njn/set-refile-notesmine when I want to refile to my wiki.

 (defun njn/set-refile-personal()
    (interactive)
    (setq org-refile-targets
          (quote ((njn/personal-org-files :maxlevel . 5))))
  )

  (defun njn/set-refile-notesmine()
    (interactive)
    (setq org-refile-targets
          (quote
            (njn/notesmine-org-files :maxlevel . 5)))
  )

Anyway, I would love it if I didn't have to do it this way, and I'll
check out uniquify tomorrow.

Maybe a solution would be to use a file-property to give a buffer an
alias when refiling?  Like this:

-------- wiki/grails.org
#+refile-alias: WGrails

-------- personal/grails.org would just use "grails.org"

--Nate




>
> I think org-refile ignores duplicate entries and refiles to the first match.
> I have observed this same behaviour even for sub-trees with same names.
>
> e.g.
>
> * top headline
> ** sub-heading
>   Text for sub-heading 1
> ** sub-heading
>   Text for sub-heading 2
>
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please 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] 5+ messages in thread

end of thread, other threads:[~2010-12-23  6:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-23  0:53 Wishlist: let org-refile find buffers that have been renamed Hsiu-Khuern Tang
2010-12-23  0:58 ` Samuel Wales
2010-12-23  2:08   ` Hsiu-Khuern Tang
2010-12-23  2:53     ` Suvayu Ali
2010-12-23  6:05       ` Nathan Neff

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