From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Bug: C-c ' eats last newline of a figure [6.35trans (release_6.35g.72.g2e12)] Date: Wed, 21 Apr 2010 09:49:49 +0200 Message-ID: <10ADC42F-0E90-4232-B6F6-C70D3CBA9C96@gmail.com> References: <87fx2sryjf.fsf@gollum.intra.norang.ca> <87zl10x857.fsf@stats.ox.ac.uk> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4Uh3-0007mm-0Z for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 03:49:57 -0400 Received: from [140.186.70.92] (port=40937 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4Ugz-0007lk-Pp for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 03:49:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4Ugy-0001CR-BN for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 03:49:53 -0400 Received: from mail-ew0-f214.google.com ([209.85.219.214]:64733) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Ugy-0001CH-5i for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 03:49:52 -0400 Received: by ewy6 with SMTP id 6so2327215ewy.32 for ; Wed, 21 Apr 2010 00:49:51 -0700 (PDT) In-Reply-To: <87zl10x857.fsf@stats.ox.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison Cc: Bernt Hansen , emacs-orgmode@gnu.org Applied, thank. - Carsten On Apr 19, 2010, at 8:34 AM, Dan Davison wrote: > diff --git a/lisp/org-src.el b/lisp/org-src.el > index 54ec4af..3319a9e 100644 > --- a/lisp/org-src.el > +++ b/lisp/org-src.el > @@ -459,15 +459,6 @@ the language, a switch telling if the content > should be in a single line." > (pos (point)) > re1 re2 single beg end lang lfmt match-re1 ind entry) > (catch 'exit > - (when (org-at-table.el-p) > - (re-search-backward "^[\t]*[^ \t|\\+]" nil t) > - (setq beg (1+ (point-at-eol))) > - (goto-char beg) > - (or (re-search-forward "^[\t]*[^ \t|\\+]" nil t) > - (progn (goto-char (point-max)) (newline))) > - (setq end (point-at-bol)) > - (setq ind (org-edit-src-get-indentation beg)) > - (throw 'exit (list beg end 'table.el nil nil ind))) > (while (setq entry (pop re-list)) > (setq re1 (car entry) re2 (nth 1 entry) lang (nth 2 entry) > single (nth 3 entry)) > @@ -498,7 +489,16 @@ the language, a switch telling if the content > should be in a single line." > (throw 'exit > (list (match-end 0) end > (org-edit-src-get-lang lang) > - single lfmt ind)))))))))))) > + single lfmt ind))))))))) > + (when (org-at-table.el-p) > + (re-search-backward "^[\t]*[^ \t|\\+]" nil t) > + (setq beg (1+ (point-at-eol))) > + (goto-char beg) > + (or (re-search-forward "^[\t]*[^ \t|\\+]" nil t) > + (progn (goto-char (point-max)) (newline))) > + (setq end (point-at-bol)) > + (setq ind (org-edit-src-get-indentation beg)) > + (throw 'exit (list beg end 'table.el nil nil ind)))))) > > (defun org-edit-src-get-lang (lang) > "Extract the src language." > - Carsten