* [PATCH] Avoid extra space when removing state
@ 2019-03-09 2:19 Carlos Pita
2019-03-09 10:01 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Carlos Pita @ 2019-03-09 2:19 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
Hi all,
here is a patch removing an extra space that is left when one selects
an empty state from the completing read interface. I simply replaced a
check for non-null with a check for org-string-nw-p in org-todo.
Best regards
--
Carlos
[-- Attachment #2: 0001-Avoid-extra-space-when-removing-state.patch --]
[-- Type: text/x-patch, Size: 953 bytes --]
From 9f137a50e1f18e067b4b9ca8836993b212d93093 Mon Sep 17 00:00:00 2001
From: memeplex <carlosjosepita@gmail.com>
Date: Fri, 8 Mar 2019 23:12:16 -0300
Subject: [PATCH] Avoid extra space when removing state
* lisp/org.el (org-todo): check if org-string-nw-p instead of non nil.
---
lisp/org.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 668482932..655c5733b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12082,7 +12082,7 @@ When called through ELisp, arg is also interpreted in the following way:
(run-hook-with-args-until-success
'org-todo-get-default-hook org-state org-last-state)
org-state))
- (next (if org-state (concat " " org-state " ") " "))
+ (next (if (org-string-nw-p org-state) (concat " " org-state " ") " "))
(change-plist (list :type 'todo-state-change :from this :to org-state
:position startpos))
dolog now-done-p)
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Avoid extra space when removing state
2019-03-09 2:19 [PATCH] Avoid extra space when removing state Carlos Pita
@ 2019-03-09 10:01 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2019-03-09 10:01 UTC (permalink / raw)
To: Carlos Pita; +Cc: emacs-orgmode
Hello,
Carlos Pita <carlosjosepita@gmail.com> writes:
> here is a patch removing an extra space that is left when one selects
> an empty state from the completing read interface. I simply replaced a
> check for non-null with a check for org-string-nw-p in org-todo.
Applied. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-09 10:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-09 2:19 [PATCH] Avoid extra space when removing state Carlos Pita
2019-03-09 10:01 ` Nicolas Goaziou
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).