From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Gauland Subject: [PATCH] Turning off wrapping Date: Thu, 24 Jan 2013 16:54:20 +1300 Message-ID: <5100B06C.2050501@no8wireless.co.nz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2LPAUDKKLVGUQAHXCVKAN" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyDtT-00079r-N9 for emacs-orgmode@gnu.org; Wed, 23 Jan 2013 22:54:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TyDtO-0001Zq-12 for emacs-orgmode@gnu.org; Wed, 23 Jan 2013 22:54:27 -0500 Received: from jersey.rurallink.co.nz ([114.134.15.197]:46389 helo=smtp.rurallink.co.nz) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyDtN-0001YA-KI for emacs-orgmode@gnu.org; Wed, 23 Jan 2013 22:54:21 -0500 Received: from 218-101-54-25.trimble.co.nz ([218.101.54.25] helo=[172.16.12.38]) by smtp.rurallink.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TyDtB-0004Aj-Eh for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 16:54:10 +1300 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 Org-Mode This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2LPAUDKKLVGUQAHXCVKAN Content-Type: multipart/mixed; boundary="------------030804000700010909070701" This is a multi-part message in MIME format. --------------030804000700010909070701 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have file with a large number of SRC blocks, the output of which I want to wrap as SRC (so I can use the listings package to format them distinctly). The easiest way to do this is to make :wrap a global property. Unfortunately, there are also a couple of places where I want to turn off the wrapping, especially where I include source in-line.=20 For example, this: #+PROPERTY: wrap SRC fundamental #+BEGIN_SRC emacs-lisp "This output comes from emacs." #+END_SRC This in-line src_emacs-lisp[:results value]{"block"} is wrapped. produces: ,---- | "This output comes from emacs." `---- This in-line #+BEGIN_SRC fundamental block#+END_SRC is wrapped. If I pass an empty :wrap in the in-line block, the result is still wrapped, but as RESULTS instead of source. The attached patch attempts to change this behaviour. Does anyone else find this desirable? Is this patch a good way to do it? Kind Regards, Mike --------------030804000700010909070701 Content-Type: text/x-diff; name="ob-core.el.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ob-core.el.diff" diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 9e4c8b1..4d73fcc 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -1999,7 +1999,8 @@ code ---- the results are extracted in the syntax o= f 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_" (car (org-split-string name)))))) --------------030804000700010909070701-- ------enig2LPAUDKKLVGUQAHXCVKAN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRALBwAAoJEKnkgIXLqylXk/oP/iGID9UOX9Osa9s6/y8nX5tp OHbngW3CrR2JhPvqo9YlLlUOSy1rgH+3R2rVCgetya4Dq9EKoif//gnCgqiAY5hq 7ExZ/rtotnk2c0CIVHC60DQpOm0JxI67MxuidoteDE1cUWf9+YsTKaFghLhVjOoW pHfUe5QaZ6wbmDP/OZkBFg7ks8MYNOWdgUxxl5kEX5uQh5rTUdh3CLnOBli/n4QX V9lUqWqwWKnEa+3GRU6YBNnI9nxT83wXyhYmK8XYc2j/rdj8vfrekVT0DHII3B8T vQZLteuIpUiY+XW2gZ10ayN34rVAzXAFnLunIpVOAAKNd+J1k6+lAluYCgzK5Apc pNY2uZ2ajNkI/dRx5AvAGVHqA7fFyW2l0eDdwBzA5iEYkJngbCC/NvZg8UGjPJ0r r8UWI1lYstuyG3PvEIoEgWTaXz6Cyeu70Xvc7NALsOeU3IxuGPqUOZnl2Bmk1O5Z ZZbpZUCrP8pJx2aJ8nKsGmBDZ43FkmwbbCme5D52Gdzi2oPG93Am088iHst8eMj9 8LjWuWt9fZsEjLJsMVGFoN0zwPlZngk7/oONJH70cCDu2A6xP20utM8d9fAh7N7b z29lEY+pWDv9BNPwHoGbQy9KTBTnx1qAx8+qM7GE1R711GE4ZsmCGtBayrbR+Nkg iVmXFZmq7oDI2uHFgn3z =zioi -----END PGP SIGNATURE----- ------enig2LPAUDKKLVGUQAHXCVKAN--