emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Bug and patch in org-toggle-fixed-width-section


From: Bernt Hansen
Subject: [Orgmode] Re: Bug and patch in org-toggle-fixed-width-section
Date: Thu, 22 Oct 2009 10:09:48 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Matthieu Lemerre <address@hidden> 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.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode




reply via email to

[Prev in Thread] Current Thread [Next in Thread]