emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Gauland <mikelygee@no8wireless.co.nz>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Wrap: override default
Date: Mon, 10 Dec 2012 21:34:18 +0000 (UTC)	[thread overview]
Message-ID: <loom.20121210T223309-244@post.gmane.org> (raw)


* lisp/ob.el (org-babel-insert-result): only wrap if the :wrap value is non-null.

It can be convenient to specify the :wrap property at a higher level (e.g., file
or tree), rather than for each block. This patch allows you to override the
propery by specifying :wrap with no argument.

TINYCHANGE
---
 lisp/ob.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/ob.el b/lisp/ob.el
index 0aba523..757bc06 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1998,7 +1998,8 @@ code ---- the results are extracted in the syntax of the
source
 		(setq end (point-marker))
 		;; possibly wrap result
 		(cond
-		 ((assoc :wrap (nth 2 info))
+		 ((and (assoc :wrap (nth 2 info))
+		       (cdr (assoc :wrap (nth 2 info))))
 		  (let ((name (or (cdr (assoc :wrap (nth 2 info))) "RESULTS")))
 		    (funcall wrap (concat "#+BEGIN_" name) (concat "#+END_" name))))
 		 ((member "html" result-params)
-- 
1.7.9

             reply	other threads:[~2012-12-10 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 21:34 Michael Gauland [this message]
2012-12-13 22:37 ` [PATCH] Wrap: override default Bastien
2012-12-24  8:43 ` Bastien
2012-12-24 20:15   ` Michael Gauland

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=loom.20121210T223309-244@post.gmane.org \
    --to=mikelygee@no8wireless.co.nz \
    --cc=emacs-orgmode@gnu.org \
    /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).