emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Valentin Wüstholz" <wuestholz@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [PATCH] org.el: Inhibit insertion of superfluous space character in org-add-planning-info.
Date: Mon, 8 Aug 2011 15:48:44 +0200	[thread overview]
Message-ID: <CAPVO5rxii4z=rETQB1Y75_2EA4Pc=C7k_r20QaYXQj7sMNT=cw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

Hi,

I've noticed that org-add-planning-info adds a superfluous space
character when a repeated task is marked as DONE and gets rescheduled.

Example:

* TODO foo
  SCHEDULED: <2011-08-08 Mon +1d>

This becomes (after pressing Shift-Right a few times):

* TODO foo
   SCHEDULED: <2011-08-09 Tue +1d>
  :LOGBOOK:
  - State "DONE"       from "WAITING"    [2011-08-08 Mon 15:33]
  :END:
  :PROPERTIES:
  :LAST_REPEAT: [2011-08-08 Mon 15:33]
  :END:

Note the additional space character before "SCHEDULED".

I've attached a patch that seems to fix this issue.

Best regards,

Valentin

[-- Attachment #2: org.el.diff.txt --]
[-- Type: text/plain, Size: 500 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index 11eaf78..d2fb343 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11914,7 +11914,7 @@ be removed."
 			     (re-search-forward org-closed-time-regexp nil t)))
 		(replace-match "")
 		(if (looking-at "--+<[^>]+>") (replace-match ""))))
-	    (and (looking-at "^[ \t]+") (replace-match ""))
+	    (and (looking-at "[ \t]+") (replace-match ""))
 	    (and org-adapt-indentation (bolp) (org-indent-to-column col))
 	    (when what
 	      (insert

             reply	other threads:[~2011-08-08 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 13:48 Valentin Wüstholz [this message]
2011-08-16 17:05 ` [PATCH] org.el: Inhibit insertion of superfluous space character in org-add-planning-info Bastien
2011-08-16 21:25   ` Valentin Wüstholz

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='CAPVO5rxii4z=rETQB1Y75_2EA4Pc=C7k_r20QaYXQj7sMNT=cw@mail.gmail.com' \
    --to=wuestholz@gmail.com \
    --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 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).