[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Bug and patch in org-toggle-fixed-width-section
From: |
Matthieu Lemerre |
Subject: |
[Orgmode] Bug and patch in org-toggle-fixed-width-section |
Date: |
Thu, 22 Oct 2009 15:07:02 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20090706) |
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)
- [Orgmode] Bug and patch in org-toggle-fixed-width-section,
Matthieu Lemerre <=