emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Schaumburg <eagleeye777@hotmail.de>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: C-c C-c in Org Footnotes
Date: Wed, 19 Feb 2014 17:45:26 +0100	[thread overview]
Message-ID: <BLU0-SMTP10595C3D9CB77D3F88227FE8B9B0@phx.gbl> (raw)
In-Reply-To: <87r46z3k0g.fsf@ericabrahamsen.net>

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

  reply	other threads:[~2014-02-19 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-02-19 20:53 ` Samuel Wales

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLU0-SMTP10595C3D9CB77D3F88227FE8B9B0@phx.gbl \
    --to=eagleeye777@hotmail.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).