From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Working with in-line src and fill-mode/running into new line Date: Sat, 26 Dec 2015 15:59:07 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCwrl-0004kN-NN for emacs-orgmode@gnu.org; Sat, 26 Dec 2015 16:59:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCwrk-0002Wo-QE for emacs-orgmode@gnu.org; Sat, 26 Dec 2015 16:59:09 -0500 Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:34316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCwrk-0002Wk-KW for emacs-orgmode@gnu.org; Sat, 26 Dec 2015 16:59:08 -0500 Received: by mail-oi0-x229.google.com with SMTP id o124so159175365oia.1 for ; Sat, 26 Dec 2015 13:59:08 -0800 (PST) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Greetings, I don't use in-line code too often, but did recently and often found myself undoing line wrapping since the code would spill into a new line, failing to be recognized by C-c C-c. Here's an example (I have fill-mode set to 90 characters): #+begin_example * in-line src #+begin_src R :session r :exports none :results silent ave <- mean(5, 7.5, 8, 9) x <- 200000 * 2 y <- 400000 * 2 vol <- x + y #+end_src Based on data from John Doe (Sourcing), average yearly consumption is src_R[:session r]{round(1e-6 * vol * (ave - 2), 2) } {{{results(=3.6=)}}} MM lbs. #+end_example I was writing up a summary of some material usage at work and it was a handy opportunity to use inline code in case my source data changed. As is, the inline code block won't update the results since it's split into two lines ("C-c C-c can do nothing useful at this location"). I'd have to go to the end of the first paragraph's line, insert a space, delete until the second line joined, and then do C-c C-c. I'm guessing folks are already aware of this, so this post is two-fold: - what are ways to work around this? I only created the full block since having the values and mean() function added even more code to the line. Are others doing the same, applying some fill-mode setting, just dealing with it? - could the behavior be modified? I would think this could be similar to \( \) LaTeX formatting. When I used to run into issues with $formula$ over new lines, I adopted using \( \), which works great no matter how long the contents are. Could Org know to interpret everything that follows =src_lang{= as code, perhaps inserting spaces for any newlines encountered? Thanks, John