emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-mobile: Tiny fix in creating index.org file lisp/org-mobile.el (org-mobile-create-index-file): - eliminate cloning of "#+READONLY" property in the index.org file; - org-todo-keywords don't need to contain the "|".
@ 2015-06-24 22:08 Sergey Gordienko
  2015-06-25 21:53 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Sergey Gordienko @ 2015-06-24 22:08 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Sergey Gordienko

---
 lisp/org-mobile.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 2c13802..293de79 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -439,14 +439,14 @@ agenda view showing the flagged items."
 	(if org-mobile-use-encryption
 	    org-mobile-encryption-tempfile
 	  target-file)
+      (insert "#+READONLY\n")
       (while (setq entry (pop def-todo))
-	(insert "#+READONLY\n")
 	(setq kwds (mapcar (lambda (x) (if (string-match "(" x)
 					   (substring x 0 (match-beginning 0))
 					 x))
 			   (cdr entry)))
 	(insert "#+TODO: " (mapconcat 'identity kwds " ") "\n")
-	(setq dwds (member "|" kwds)
+	(setq dwds (or (member "|" kwds) (last kwds))
 	      twds (org-delete-all dwds kwds)
 	      todo-kwds (org-delete-all twds todo-kwds)
 	      done-kwds (org-delete-all dwds done-kwds)))
-- 
1.9.5 (Apple Git-50.3)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] org-mobile: Tiny fix in creating index.org file lisp/org-mobile.el (org-mobile-create-index-file): - eliminate cloning of "#+READONLY" property in the index.org file; - org-todo-keywords don't need to contain the "|".
  2015-06-24 22:08 [PATCH] org-mobile: Tiny fix in creating index.org file lisp/org-mobile.el (org-mobile-create-index-file): - eliminate cloning of "#+READONLY" property in the index.org file; - org-todo-keywords don't need to contain the "|" Sergey Gordienko
@ 2015-06-25 21:53 ` Nicolas Goaziou
  2015-06-26 14:44   ` [PATCH] org-mobile: Tiny fix in creating index.org file Sergey Gordienko
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2015-06-25 21:53 UTC (permalink / raw)
  To: Sergey Gordienko; +Cc: emacs-orgmode

Hello,

Sergey Gordienko <gordienkos@gmail.com> writes:

> ---
>  lisp/org-mobile.el | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thank you for the patch. 

Did you sign FSF papers? If you didn't, could you add TINYCHANGE at the
end of the commit message?


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] org-mobile: Tiny fix in creating index.org file
  2015-06-25 21:53 ` Nicolas Goaziou
@ 2015-06-26 14:44   ` Sergey Gordienko
  2015-06-28  7:08     ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Sergey Gordienko @ 2015-06-26 14:44 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Sergey Gordienko

* lisp/org-mobile.el (org-mobile-create-index-file):
Eliminate cloning of `#+READONLY' property in the `index.org' file.
A sublists of `org-todo-keywords' don't need to contain the `|'.

TINYCHANGE
---
 lisp/org-mobile.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 2c13802..293de79 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -439,14 +439,14 @@ agenda view showing the flagged items."
 	(if org-mobile-use-encryption
 	    org-mobile-encryption-tempfile
 	  target-file)
+      (insert "#+READONLY\n")
       (while (setq entry (pop def-todo))
-	(insert "#+READONLY\n")
 	(setq kwds (mapcar (lambda (x) (if (string-match "(" x)
 					   (substring x 0 (match-beginning 0))
 					 x))
 			   (cdr entry)))
 	(insert "#+TODO: " (mapconcat 'identity kwds " ") "\n")
-	(setq dwds (member "|" kwds)
+	(setq dwds (or (member "|" kwds) (last kwds))
 	      twds (org-delete-all dwds kwds)
 	      todo-kwds (org-delete-all twds todo-kwds)
 	      done-kwds (org-delete-all dwds done-kwds)))
-- 
1.9.5 (Apple Git-50.3)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] org-mobile: Tiny fix in creating index.org file
  2015-06-26 14:44   ` [PATCH] org-mobile: Tiny fix in creating index.org file Sergey Gordienko
@ 2015-06-28  7:08     ` Nicolas Goaziou
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2015-06-28  7:08 UTC (permalink / raw)
  To: Sergey Gordienko; +Cc: emacs-orgmode

Sergey Gordienko <gordienkos@gmail.com> writes:

> * lisp/org-mobile.el (org-mobile-create-index-file):
> Eliminate cloning of `#+READONLY' property in the `index.org' file.
> A sublists of `org-todo-keywords' don't need to contain the `|'.

Applied. Thank you.

Regards,

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-28  7:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 22:08 [PATCH] org-mobile: Tiny fix in creating index.org file lisp/org-mobile.el (org-mobile-create-index-file): - eliminate cloning of "#+READONLY" property in the index.org file; - org-todo-keywords don't need to contain the "|" Sergey Gordienko
2015-06-25 21:53 ` Nicolas Goaziou
2015-06-26 14:44   ` [PATCH] org-mobile: Tiny fix in creating index.org file Sergey Gordienko
2015-06-28  7:08     ` 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).