emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* wish: global C-u org-agenda-refile
@ 2017-11-13 14:19 Gregor Zattler
  2017-11-13 14:50 ` Kyle Meyer
  0 siblings, 1 reply; 3+ messages in thread
From: Gregor Zattler @ 2017-11-13 14:19 UTC (permalink / raw)
  To: emacs-orgmode

Dear org-mode users and developers, I frequently use C-u C-c C-w
in order to jump to a heading in one of my org agenda files
(using helm as a selection framework).

Alas this only works when invoked from org-mode buffers or from
the agenda if point is on an org agenda item (as opposed e.g. to
a line containing the date, or empty time grid lines).

I wish for C-u org-refile functionality (call it org-jump or
whatever) which would not depend on context, in order for me
being able to bind it to a key in the global key map.

Is this already doable?  Otherwise I wish for this
functionality. 

(org-jump works only within an org-mode buffer;
helm-org-agenda-files-headings is an external package and it's
slower than C-u org-refile from cache).


Ciao; Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-

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

* Re: wish: global C-u org-agenda-refile
  2017-11-13 14:19 wish: global C-u org-agenda-refile Gregor Zattler
@ 2017-11-13 14:50 ` Kyle Meyer
       [not found]   ` <87d14lg4sp.fsf@len.workgroup>
  0 siblings, 1 reply; 3+ messages in thread
From: Kyle Meyer @ 2017-11-13 14:50 UTC (permalink / raw)
  To: Gregor Zattler, emacs-orgmode

Gregor Zattler <telegraph@gmx.net> writes:

> Dear org-mode users and developers, I frequently use C-u C-c C-w
> in order to jump to a heading in one of my org agenda files
> (using helm as a selection framework).
>
> Alas this only works when invoked from org-mode buffers or from
> the agenda if point is on an org agenda item (as opposed e.g. to
> a line containing the date, or empty time grid lines).
>
> I wish for C-u org-refile functionality (call it org-jump or
> whatever) which would not depend on context, in order for me
> being able to bind it to a key in the global key map.
>
> Is this already doable?  Otherwise I wish for this
> functionality. 

You could define a simple command in your init like

    (defun my/org-goto-agenda-heading ()
      (interactive)
      (org-refile '(4)))

and bind that to whatever you'd like.

-- 
Kyle

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

* Re: wish: global C-u org-agenda-refile
       [not found]   ` <87d14lg4sp.fsf@len.workgroup>
@ 2017-11-14  2:33     ` Kyle Meyer
  0 siblings, 0 replies; 3+ messages in thread
From: Kyle Meyer @ 2017-11-14  2:33 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: emacs-orgmode

Gregor Zattler <telegraph@gmx.net> writes:

> Thanks, that was easy.  But why does this work with point on an
> agenda date line, whilst C-u C-c C-w does not?

org-agenda-refile raises a user-error before calling org-refile if it
cannot determine a marker for the current line:

    (or (org-get-at-bol 'org-hd-marker)
        (org-agenda-error))

-- 
Kyle

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

end of thread, other threads:[~2017-11-14  2:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 14:19 wish: global C-u org-agenda-refile Gregor Zattler
2017-11-13 14:50 ` Kyle Meyer
     [not found]   ` <87d14lg4sp.fsf@len.workgroup>
2017-11-14  2:33     ` Kyle Meyer

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