From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: Dan Davison <davison@stats.ox.ac.uk>,
emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: org-babel-where-is-src-block-head
Date: Tue, 07 Sep 2010 22:40:28 +0200 [thread overview]
Message-ID: <87y6bdjnib.wl%n.goaziou@gmail.com> (raw)
In-Reply-To: <81k4mxuzam.fsf_-_@gmail.com>
Hello,
>>>>> Jambunathan K writes:
>> [1] E.g. `org-babel-where-is-src-block-head' may not be the
>> "proper" way to detect if we're in a src block.
>>
> I wonder what the proper way is ...
> At different points in the past, I had looked for org-at-babel-p or
> something similar. I invariably wound up using
> org-babel-where-is-src-block-head ...
I don't know it either but there is `org-in-regexps-block-p' for
general use, and in org-list, I used something in the lines of this:
(defun in-src-block-p ()
(save-excursion
(let ((case-fold-search t))
(end-of-line)
(and (re-search-backward "^[ \t]*#\\+\\(begin\\|end\\)_src" nil t)
(= (length (match-string 1)) 5)))))
Regards,
-- Nicolas
next prev parent reply other threads:[~2010-09-07 20:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 18:34 Context sensitive M-q Thomas S. Dye
2010-09-07 19:11 ` Dan Davison
2010-09-07 19:30 ` org-babel-where-is-src-block-head Jambunathan K
2010-09-07 20:40 ` Nicolas Goaziou [this message]
2010-09-07 20:46 ` org-babel-where-is-src-block-head Dan Davison
2010-09-07 20:28 ` Context sensitive M-q Thomas S. Dye
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=87y6bdjnib.wl%n.goaziou@gmail.com \
--to=n.goaziou@gmail.com \
--cc=davison@stats.ox.ac.uk \
--cc=emacs-orgmode@gnu.org \
--cc=kjambunathan@gmail.com \
/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).