[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] Fix spaces with `org-remove-timestamp-with-keyword'
From: |
Leo Vivier |
Subject: |
[O] [PATCH] Fix spaces with `org-remove-timestamp-with-keyword' |
Date: |
Thu, 21 Feb 2019 16:43:56 +0100 |
* lisp/org.el (org-remove-timestamp-with-keyword): Fix space deletion
between timestamps
When an entry had a CLOSED, a DEADLINE and a SCHEDULED timestamps,
removing the middle one caused the space between the 1st and 3rd to be
removed as well. Checking whether we’re at the end of the line before
deleting the space fixes it.
---
Here’s a little unrelated patch for an issue I’ve stumbled upon whilst
testing the previous patch.
lisp/org.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/org.el b/lisp/org.el
index ae9494672..4c3c3cd78 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12944,6 +12944,7 @@ nil."
(while (re-search-backward re beg t)
(replace-match "")
(if (and (string-match "\\S-" (buffer-substring (point-at-bol) (point)))
+ (eolp)
(equal (char-before) ?\ ))
(backward-delete-char 1)
(when (string-match "^[ \t]*$" (buffer-substring
--
2.20.1
- Re: [O] [PATCH 1/2] Fix narrowing for 1-line subtrees, (continued)
- Re: [O] [PATCH 1/2] Fix narrowing for 1-line subtrees, Leo Vivier, 2019/02/19
- [O] [PATCH] Fix narrowing for 1-line subtrees (squashed), Leo Vivier, 2019/02/19
- Re: [O] [PATCH 1/2] Fix narrowing for 1-line subtrees, Nicolas Goaziou, 2019/02/19
- Re: [O] [PATCH 1/2] Fix narrowing for 1-line subtrees, Leo Vivier, 2019/02/19
- Re: [O] [PATCH 1/2] Fix narrowing for 1-line subtrees, Leo Vivier, 2019/02/19
- Re: [O] [PATCH 1/2] Fix narrowing for 1-line subtrees, Leo Vivier, 2019/02/19
- Re: [O] [PATCH 1/2] Fix narrowing for 1-line subtrees, Nicolas Goaziou, 2019/02/20
- Re: [O] [PATCH 1/2] Fix narrowing for 1-line subtrees, Leo Vivier, 2019/02/20
- [O] [PATCH] Fix narrowed 1-line subtrees, Leo Vivier, 2019/02/21
- Re: [O] [PATCH] Fix narrowed 1-line subtrees, Leo Vivier, 2019/02/21
- [O] [PATCH] Fix spaces with `org-remove-timestamp-with-keyword',
Leo Vivier <=
- Re: [O] [PATCH] Fix narrowed 1-line subtrees, Leo Vivier, 2019/02/22
- Re: [O] [PATCH] Fix narrowed 1-line subtrees, Leo Vivier, 2019/02/22
- Re: [O] [PATCH] Fix narrowed 1-line subtrees, Samuel Wales, 2019/02/22
- Re: [O] [PATCH] Fix narrowed 1-line subtrees, Leo Vivier, 2019/02/22
- Re: [O] [PATCH] Fix narrowed 1-line subtrees, Samuel Wales, 2019/02/22
- Re: [O] [PATCH] Fix narrowed 1-line subtrees, Leo Vivier, 2019/02/23