From: Matthieu Lemerre <matthieu.lemerre@cea.fr>
To: emacs-orgmode@gnu.org
Subject: Bug and patch in org-toggle-fixed-width-section
Date: Thu, 22 Oct 2009 15:07:02 +0100 [thread overview]
Message-ID: <4AE06706.10106@cea.fr> (raw)
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)
next reply other threads:[~2009-10-22 13:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 14:07 Matthieu Lemerre [this message]
2009-10-22 14:09 ` Bug and patch in org-toggle-fixed-width-section Bernt Hansen
2009-10-22 14:13 ` Bernt Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AE06706.10106@cea.fr \
--to=matthieu.lemerre@cea.fr \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.