From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tyler Smith Subject: tangling inline source code Date: Wed, 10 Aug 2016 10:02:17 -0400 Message-ID: <1470837737.1415749.691367361.00DEE9B2@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXU5X-0000Ma-TL for emacs-orgmode@gnu.org; Wed, 10 Aug 2016 10:02:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXU5T-0000Rl-TX for emacs-orgmode@gnu.org; Wed, 10 Aug 2016 10:02:31 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:51233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXU5R-0000QY-IB for emacs-orgmode@gnu.org; Wed, 10 Aug 2016 10:02:27 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 67C9A2069B for ; Wed, 10 Aug 2016 10:02:17 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Emacs Org-Mode Help Hello, A question came up on Stack Exchange asking about less-verbose ways to indicate code blocks: http://emacs.stackexchange.com/questions/26163/one-liner-org-source-tangle I suggested using the inline format, e.g., 'src_perl{set $variable = 1;}'. However, this is ignored when tangling the org file into a source file. The manual indicates that blocks and inline code are treated the same: http://orgmode.org/manual/Structure-of-code-blocks.html Is this a bug in the documentation? From the documentation, I expect inline code to be tangled the same as a code block, at least when appropriate `tangle` options are set in the header. Here's a short example file illustrating the problem: +---- * Taking notes :PROPERTIES: :tangle: whatever.R :comments: org :END: R commands #+BEGIN_SRC R var1 <- 1 #+END_SRC And here's an inline command: src_R{var2 <- 2}. Perl unset command (just making it up... :P) #+BEGIN_SRC R rm(list = c("var1", "var2")) #+END_SRC And some more text. +---- Tangling this will insert the two code blocks into the tangled file, but the inline code gets treated as regular text, and is converted into a comment. Am I doing something wrong, or could the documentation be clarified on this point? Best, Tyler -- plantarum.ca