From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Columnview: Fix the case of #+ content present Date: Sun, 22 Sep 2013 08:08:53 +0200 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/signed; boundary="Apple-Mail=_93A420B1-AD39-4328-B930-5569787F1A3B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNcqr-0001lS-Uy for emacs-orgmode@gnu.org; Sun, 22 Sep 2013 02:09:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VNcqj-00038e-HM for emacs-orgmode@gnu.org; Sun, 22 Sep 2013 02:09:01 -0400 Received: from mail-ee0-x232.google.com ([2a00:1450:4013:c00::232]:53579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNcqj-00038Z-A8 for emacs-orgmode@gnu.org; Sun, 22 Sep 2013 02:08:53 -0400 Received: by mail-ee0-f50.google.com with SMTP id d51so1053228eek.37 for ; Sat, 21 Sep 2013 23:08:52 -0700 (PDT) In-Reply-To: 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: Benjamin Beckwith Cc: emacs-orgmode@gnu.org --Apple-Mail=_93A420B1-AD39-4328-B930-5569787F1A3B Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=iso-8859-1 Applied, thank you Benjamin. - Carsten On 17.9.2013, at 21:13, Benjamin Beckwith wrote: > * lisp/org-colview.el (org-dblock-write:columnview): Change the > capture of pos to after inserting the original content > > The problem is with a block that has content preceding the table. > Upon recreating the content, the `pos' gets set to the beginning of > this content instead of the table. Later calls to > `org-table-recalculate' or `org-table-align' will fail because the > point is not at a table. > > This patch moves the capture of `pos' to right before the insertion of > the table. > > TINYCHANGE > --- > lisp/org-colview.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lisp/org-colview.el b/lisp/org-colview.el > index f3b8e42..8790ad4 100644 > --- a/lisp/org-colview.el > +++ b/lisp/org-colview.el > @@ -1306,10 +1306,10 @@ PARAMS is a property list of parameters: > (if (eq 'hline x) x (cons "" x))) > tbl)) > (setq tbl (append tbl (list (cons "/" (make-list nfields "<>")))))) > - (setq pos (point)) > (when content-lines > (while (string-match "^#" (car content-lines)) > (insert (pop content-lines) "\n"))) > + (setq pos (point)) > (insert (org-listtable-to-string tbl)) > (when (plist-get params :width) > (insert "\n|" (mapconcat (lambda (x) (format "<%d>" (max 3 x))) > -- > 1.8.1.2 > --Apple-Mail=_93A420B1-AD39-4328-B930-5569787F1A3B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJSPol1AAoJEO+gg/nAZuwMG1oH/jkFaOzl/2UFlFIklV8CjIn6 Ns+0SPZL6KnurrcNjzK40Ozbd05zkglY14Zm3xuzax155ASU4sI2dXh3Qao5GWhE 5EdSZ4+i4BGfV9Ssy8RrxhBEJIONnj5SSRiNsL2anYs4QV6Y4wbd6xdkYvzuBLo1 ECFXpaZNPc9ImTr252haVBw50fbHcAek0eySDohGi8hZXISGIQwJKOWosEbxpRZx IzY6vrMiaFhad9QN3YONtdsSnC2OYtIl7rwrI4eIdkSqh/FSx7zOX+VJV/fYsZsA Fcu1DSikl/qgb/ffXc/SowmYvn7xnOYw09gI3LptjGAgs/9+pRzeIWE+lh2RVwQ= =3udu -----END PGP SIGNATURE----- --Apple-Mail=_93A420B1-AD39-4328-B930-5569787F1A3B--