From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Bug and patch in org-toggle-fixed-width-section Date: Thu, 22 Oct 2009 10:09:48 -0400 Message-ID: <874opr7c5v.fsf@gollum.intra.norang.ca> References: <4AE06706.10106@cea.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0yMZ-0007j3-3S for emacs-orgmode@gnu.org; Thu, 22 Oct 2009 10:09:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0yMV-0007hS-Un for emacs-orgmode@gnu.org; Thu, 22 Oct 2009 10:09:58 -0400 Received: from [199.232.76.173] (port=43016 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0yMV-0007hM-6q for emacs-orgmode@gnu.org; Thu, 22 Oct 2009 10:09:55 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:62511) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N0yMU-00042X-Sh for emacs-orgmode@gnu.org; Thu, 22 Oct 2009 10:09:55 -0400 In-Reply-To: <4AE06706.10106@cea.fr> (Matthieu Lemerre's message of "Thu\, 22 Oct 2009 15\:07\:02 +0100") 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: Matthieu Lemerre Cc: emacs-orgmode@gnu.org Matthieu Lemerre writes: > Hi > > There is a bug in org-toggle-fixed-width-section in the org version > shipped with emacs23: this function only inserts ":", when this colon > should be followed by a space. > > I joined a patch for your convenience; it seems to work. Maybe this has > already been fixed in later versions. > > > Regards, > Matthieu Lemerre > > > > *** /tmp/ediff3735oPQ 2009-10-22 15:02:21.000000000 +0100 > --- /tmp/ediff37351ZW 2009-10-22 15:02:21.000000000 +0100 > *************** > *** 1,3 **** > --- 1,7 ---- > + ;; This buffer is for notes you don't want to save, and for Lisp > evaluation. > + ;; If you want to create a file, visit that file with C-x C-f, > + ;; then enter the text in that file's own buffer. > + > (defun org-toggle-fixed-width-section (arg) > "Toggle the fixed-width export. > If there is no active region, the QUOTE keyword at the current headline is > *************** > *** 13,19 **** > (end (if regionp (region-end))) > (nlines (or arg (if (and beg end) (count-lines beg end) 1))) > (case-fold-search nil) > ! (re "[ \t]*\\(:\\)") > off) > (if regionp > (save-excursion > --- 17,23 ---- > (end (if regionp (region-end))) > (nlines (or arg (if (and beg end) (count-lines beg end) 1))) > (case-fold-search nil) > ! (re "[ \t]*\\(: \\)") > off) > (if regionp > (save-excursion > *************** > *** 31,37 **** > (forward-line -1)) > ((and off (looking-at re)) > (replace-match "" t t nil 1)) > ! ((not off) (org-move-to-column cc t) (insert ":"))) > (forward-line 1))) > (save-excursion > (org-back-to-heading) > --- 35,41 ---- > (forward-line -1)) > ((and off (looking-at re)) > (replace-match "" t t nil 1)) > ! ((not off) (org-move-to-column cc t) (insert ": "))) > (forward-line 1))) > (save-excursion > (org-back-to-heading) > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode