From: Bernt Hansen <bernt@norang.ca>
To: Matthieu Lemerre <matthieu.lemerre@cea.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug and patch in org-toggle-fixed-width-section
Date: Thu, 22 Oct 2009 10:09:48 -0400 [thread overview]
Message-ID: <874opr7c5v.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <4AE06706.10106@cea.fr> (Matthieu Lemerre's message of "Thu\, 22 Oct 2009 15\:07\:02 +0100")
Matthieu Lemerre <matthieu.lemerre@cea.fr> 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
next prev parent reply other threads:[~2009-10-22 14:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 14:07 Bug and patch in org-toggle-fixed-width-section Matthieu Lemerre
2009-10-22 14:09 ` Bernt Hansen [this message]
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874opr7c5v.fsf@gollum.intra.norang.ca \
--to=bernt@norang.ca \
--cc=emacs-orgmode@gnu.org \
--cc=matthieu.lemerre@cea.fr \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).