emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* C-c C-c in Org Footnotes
@ 2014-02-18 16:11 Samuel Schaumburg
  2014-02-18 21:38 ` Rasmus
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Samuel Schaumburg @ 2014-02-18 16:11 UTC (permalink / raw)
  To: emacs-orgmode

Hi there,

I frequently use org to write outlines for my thesis-papers. This often
requires lenghty footnotes. The manual says, that I can use C-c C-c to
jump back into the main text, where the footnote was originally set.
 back to the footnotemark. I can use C-a if it is just a one line, but
 often it is not, and I find myself moving around in the buffer some
 way, to get back to the footnote mark and then C-c C-c.

What I would like to know is, wether there is an easy way, to just make
C-c C-c work whenever I am in a footnote paragraph, no mater where the
cursor currently is positioned.

If you have any idea on how to do that, I would appreciate that.

Thanks
Samuel

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

* Re: C-c C-c in Org Footnotes
  2014-02-18 16:11 C-c C-c in Org Footnotes Samuel Schaumburg
@ 2014-02-18 21:38 ` Rasmus
  2014-02-19  2:37 ` Eric Abrahamsen
  2014-02-19 20:53 ` Samuel Wales
  2 siblings, 0 replies; 5+ messages in thread
From: Rasmus @ 2014-02-18 21:38 UTC (permalink / raw)
  To: emacs-orgmode

Samuel Schaumburg <eagleeye777@hotmail.de> writes:

> Hi there,
>
> I frequently use org to write outlines for my thesis-papers. This often
> requires lenghty footnotes. The manual says, that I can use C-c C-c to
> jump back into the main text, where the footnote was originally set.
>  back to the footnotemark. I can use C-a if it is just a one line, but
>  often it is not, and I find myself moving around in the buffer some
>  way, to get back to the footnote mark and then C-c C-c.
>
> What I would like to know is, wether there is an easy way, to just make
> C-c C-c work whenever I am in a footnote paragraph, no mater where the
> cursor currently is positioned.
>
> If you have any idea on how to do that, I would appreciate that.

In the following example, where | is the cursor, I can go back by
issuing C-c &.

    r[fn:1]

    * Footnotes

    [fn:1] horse

    cow |

Hope it helps,
Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!

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

* Re: C-c C-c in Org Footnotes
  2014-02-18 16:11 C-c C-c in Org Footnotes Samuel Schaumburg
  2014-02-18 21:38 ` Rasmus
@ 2014-02-19  2:37 ` Eric Abrahamsen
  2014-02-19 16:45   ` Samuel Schaumburg
  2014-02-19 20:53 ` Samuel Wales
  2 siblings, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2014-02-19  2:37 UTC (permalink / raw)
  To: emacs-orgmode

Samuel Schaumburg <eagleeye777@hotmail.de> writes:

> Hi there,
>
> I frequently use org to write outlines for my thesis-papers. This often
> requires lenghty footnotes. The manual says, that I can use C-c C-c to
> jump back into the main text, where the footnote was originally set.
>  back to the footnotemark. I can use C-a if it is just a one line, but
>  often it is not, and I find myself moving around in the buffer some
>  way, to get back to the footnote mark and then C-c C-c.
>
> What I would like to know is, wether there is an easy way, to just make
> C-c C-c work whenever I am in a footnote paragraph, no mater where the
> cursor currently is positioned.
>
> If you have any idea on how to do that, I would appreciate that.
>
> Thanks
> Samuel

I'm not sure if this counts as an "easy" way, but you could add a
function to org-ctrl-c-ctrl-c-final-hook, that checks if you're in a
multi-line footnote definition and then calls org-footnote-action as if
you were. I say put it in the final hook just so it doesn't clobber
anything else that C-c C-c might want to do at point. It could look
like (very lightly tested):

(defun my-return-from-fn ()
  (let* ((context (org-element-context))
	 (parent (org-element-property :parent context)))
    (when (eq (org-element-type parent) 'footnote-definition)
      (goto-char (org-element-property :post-affiliated context))
      (call-interactively 'org-footnote-action))))

(add-hook 'org-ctrl-c-ctrl-c-final-hook 'my-return-from-fn)

It still tells you "C-c C-c can do nothing useful at this location", but
at least it returns you to the right place!

E

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

* Re: C-c C-c in Org Footnotes
  2014-02-19  2:37 ` Eric Abrahamsen
@ 2014-02-19 16:45   ` Samuel Schaumburg
  0 siblings, 0 replies; 5+ messages in thread
From: Samuel Schaumburg @ 2014-02-19 16:45 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

Thanks Eric,

I think that will do.

Cheers
Samuel

eric@ericabrahamsen.net writes:

> Samuel Schaumburg <eagleeye777@hotmail.de> writes:
>
>> Hi there,
>>
>> I frequently use org to write outlines for my thesis-papers. This often
>> requires lenghty footnotes. The manual says, that I can use C-c C-c to
>> jump back into the main text, where the footnote was originally set.
>>  back to the footnotemark. I can use C-a if it is just a one line, but
>>  often it is not, and I find myself moving around in the buffer some
>>  way, to get back to the footnote mark and then C-c C-c.
>>
>> What I would like to know is, wether there is an easy way, to just make
>> C-c C-c work whenever I am in a footnote paragraph, no mater where the
>> cursor currently is positioned.
>>
>> If you have any idea on how to do that, I would appreciate that.
>>
>> Thanks
>> Samuel
>
> I'm not sure if this counts as an "easy" way, but you could add a
> function to org-ctrl-c-ctrl-c-final-hook, that checks if you're in a
> multi-line footnote definition and then calls org-footnote-action as if
> you were. I say put it in the final hook just so it doesn't clobber
> anything else that C-c C-c might want to do at point. It could look
> like (very lightly tested):
>
> (defun my-return-from-fn ()
>   (let* ((context (org-element-context))
> 	 (parent (org-element-property :parent context)))
>     (when (eq (org-element-type parent) 'footnote-definition)
>       (goto-char (org-element-property :post-affiliated context))
>       (call-interactively 'org-footnote-action))))
>
> (add-hook 'org-ctrl-c-ctrl-c-final-hook 'my-return-from-fn)
>
> It still tells you "C-c C-c can do nothing useful at this location", but
> at least it returns you to the right place!
>
> E

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

* Re: C-c C-c in Org Footnotes
  2014-02-18 16:11 C-c C-c in Org Footnotes Samuel Schaumburg
  2014-02-18 21:38 ` Rasmus
  2014-02-19  2:37 ` Eric Abrahamsen
@ 2014-02-19 20:53 ` Samuel Wales
  2 siblings, 0 replies; 5+ messages in thread
From: Samuel Wales @ 2014-02-19 20:53 UTC (permalink / raw)
  To: Samuel Schaumburg; +Cc: emacs-orgmode

this doesn't answer your question, but i find that inline footnotes
keep everything together.

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.

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

end of thread, other threads:[~2014-02-19 20:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-18 16:11 C-c C-c in Org Footnotes Samuel Schaumburg
2014-02-18 21:38 ` Rasmus
2014-02-19  2:37 ` Eric Abrahamsen
2014-02-19 16:45   ` Samuel Schaumburg
2014-02-19 20:53 ` Samuel Wales

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