* Bug and possible fix / work-around using org-mobile with group tags [not found] <608350460.2102657.1455198750254.JavaMail.yahoo.ref@mail.yahoo.com> @ 2016-02-11 13:52 ` John Hutchinson 2016-02-21 15:35 ` Nicolas Goaziou 0 siblings, 1 reply; 4+ messages in thread From: John Hutchinson @ 2016-02-11 13:52 UTC (permalink / raw) To: emacs-orgmode@gnu.org [-- Attachment #1: Type: text/plain, Size: 2516 bytes --] - Running org-mobile-push with group tags defined in init.el file using :startgrouptag etc. results in an error, and (in my case) DropBox not being updated. Here's the log from the *Messages* buffer: Creating agendas... Agenda written to Org file /cygdrive/c/Users/IBM_ADMIN/Dropbox/Apps/MobileOrg/agendas.org Creating agendas...done Saving all Org-mode buffers... (No files need saving) Saving all Org-mode buffers... done Copying files... Writing index file... org-mobile-create-index-file: Wrong type argument: sequencep, :startgrouptag Quit [2 times] - Commenting out the group tags attributes in init.el results in Org Mobile successfully generating and pushing to DropBox. - Turning group tags off with org-toggle-tags-groups and running org-mobile-push causes the error. - Using Org from org-plus-contrib-20160208, the problem seems to be the :startgroup and :endgroup on lines 460 and 461 of org-mobile.el; patching them to :startgrouptag and :endgrouptag respectively appears to correct the issue (though I've not done in-depth testing for any other unintended side effects this patch may have). - Also, changing the group attributes in my init.el from :startgrouptag :endgrouptag to :startgroup and :endgroup respectively corrects the issue, although the Org manual indicates that the longer form is correct. - As an aside, I note there are several instances of plain :startgroup intermingled with :startgrouptag in the org sources: org-plus-contrib-20160208 $ grep -n startgroup *.el org.el:3492: (const :startgroup) org.el:3495: (const :startgrouptag) org.el:3523: (const :tag "Start radio group" (:startgroup)) org.el:5063: (append '((:startgroup)) org.el:5233: (:startgroup "{") org.el:5235: (:startgrouptag "[") org.el:5252: (push '(:startgroup) org-tag-alist) org.el:5258: (push '(:startgrouptag) org-tag-alist) org.el:5322: (if (or (memq (car e) '(:newline :grouptags :endgroup :startgroup)) org.el:13093: ((equal e '(:startgroup)) org.el:15232: ((eq (car e) :startgroup) org.el:15241: ((eq (car e) :startgrouptag) org-interactive-query.el:92: ((equal e '(:startgroup)) org-interactive-query.el:268: ;; if this is not a keyword (:startgroup, etc), ignore it org-mobile.el:460: ((eq (car x) :startgroup) "{") org-pcomplete.el:245: ((eq :startgroup (car x)) "{") ox-beamer.el:1128: (append '((:startgroup)) Regards,=John P.S. First time writing to this list; apologies in advance for breaches of etiquette. [-- Attachment #2: Type: text/html, Size: 3900 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug and possible fix / work-around using org-mobile with group tags 2016-02-11 13:52 ` Bug and possible fix / work-around using org-mobile with group tags John Hutchinson @ 2016-02-21 15:35 ` Nicolas Goaziou [not found] ` <196579851.2531195.1456433654870.JavaMail.yahoo@mail.yahoo.com> 0 siblings, 1 reply; 4+ messages in thread From: Nicolas Goaziou @ 2016-02-21 15:35 UTC (permalink / raw) To: John Hutchinson; +Cc: emacs-orgmode@gnu.org [-- Attachment #1: Type: text/plain, Size: 2820 bytes --] Hello, John Hutchinson <johnrhutchinson@att.net> writes: > - Running org-mobile-push with group tags defined in init.el file using :startgrouptag etc. results in an error, and (in my case) DropBox not being updated. Here's the log from the *Messages* buffer: Creating agendas... > Agenda written to Org file /cygdrive/c/Users/IBM_ADMIN/Dropbox/Apps/MobileOrg/agendas.org > Creating agendas...done > Saving all Org-mode buffers... > (No files need saving) > Saving all Org-mode buffers... done > Copying files... > Writing index file... > org-mobile-create-index-file: Wrong type argument: sequencep, :startgrouptag > Quit > [2 times] > > - Commenting out the group tags attributes in init.el results in Org Mobile successfully generating and pushing to DropBox. > - Turning group tags off with org-toggle-tags-groups and running org-mobile-push causes the error. > - Using Org from org-plus-contrib-20160208, the problem seems to be the :startgroup and :endgroup on lines 460 and 461 of org-mobile.el; patching them to :startgrouptag and :endgrouptag respectively appears to correct the issue (though I've not done in-depth testing for any other unintended side effects this patch may have). > - Also, changing the group attributes in my init.el from :startgrouptag :endgrouptag to :startgroup and :endgroup respectively corrects the issue, although the Org manual indicates that the longer form is correct. > > - As an aside, I note there are several instances of plain :startgroup intermingled with :startgrouptag in the org sources: org-plus-contrib-20160208 $ grep -n startgroup *.el > org.el:3492: (const :startgroup) > org.el:3495: (const :startgrouptag) > org.el:3523: (const :tag "Start radio group" (:startgroup)) > org.el:5063: (append '((:startgroup)) > org.el:5233: (:startgroup "{") > org.el:5235: (:startgrouptag "[") > org.el:5252: (push '(:startgroup) org-tag-alist) > org.el:5258: (push '(:startgrouptag) org-tag-alist) > org.el:5322: (if (or (memq (car e) '(:newline :grouptags :endgroup :startgroup)) > org.el:13093: ((equal e '(:startgroup)) > org.el:15232: ((eq (car e) :startgroup) > org.el:15241: ((eq (car e) :startgrouptag) > org-interactive-query.el:92: ((equal e '(:startgroup)) > org-interactive-query.el:268: ;; if this is not a keyword (:startgroup, etc), ignore it > org-mobile.el:460: ((eq (car x) :startgroup) "{") > org-pcomplete.el:245: ((eq :startgroup (car x)) "{") > ox-beamer.el:1128: (append '((:startgroup)) > > Regards,=John > P.S. First time writing to this list; apologies in advance for > breaches of etiquette. Thank you for the report. This is probably related to the recent introduction of Tag hierarchy. Would the following patch solve the problem? Regards, -- Nicolas Goaziou [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-org-mobile-Fix-Wrong-type-argument-sequencep-startgr.patch --] [-- Type: text/x-patch, Size: 1419 bytes --] From 519d69a057b49b2f3996209145aef5b41fcfe091 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou <mail@nicolasgoaziou.fr> Date: Sun, 21 Feb 2016 16:28:15 +0100 Subject: [PATCH] org-mobile: Fix Wrong type argument: sequencep, :startgrouptag * lisp/org-mobile.el (org-mobile-create-index-file): Handle group tags. Reported-by: John Hutchinson <johnrhutchinson@att.net> <http://permalink.gmane.org/gmane.emacs.orgmode/105033> --- lisp/org-mobile.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index e6709e4..84e90fd 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -455,13 +455,16 @@ agenda view showing the flagged items." (mapconcat 'identity done-kwds " ") "\n")) (setq def-tags (mapcar (lambda (x) - (cond ((null x) nil) - ((stringp x) x) - ((eq (car x) :startgroup) "{") - ((eq (car x) :endgroup) "}") - ((eq (car x) :grouptags) nil) - ((eq (car x) :newline) nil) - ((listp x) (car x)))) + (lambda (tag) + (cl-case (car tag) + ((nil) nil) + (:startgroup "{") + (:endgroup "}") + (:startgrouptag "[") + (:endgrouptag "]") + (:grouptags ":") + (:newline nil) + (t (car tag))))) def-tags)) (setq def-tags (delq nil def-tags)) (setq tags (org-delete-all def-tags tags)) -- 2.7.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <196579851.2531195.1456433654870.JavaMail.yahoo@mail.yahoo.com>]
* Re: Bug and possible fix / work-around using org-mobile with group tags [not found] ` <196579851.2531195.1456433654870.JavaMail.yahoo@mail.yahoo.com> @ 2016-02-26 0:35 ` John Hutchinson 2016-02-26 21:59 ` Nicolas Goaziou 0 siblings, 1 reply; 4+ messages in thread From: John Hutchinson @ 2016-02-26 0:35 UTC (permalink / raw) To: emacs-orgmode@gnu.org [-- Attachment #1: Type: text/plain, Size: 6367 bytes --] Hi Nicolas: I think the diff patch you sent had an "off-by-one-line" error. If I remove the nested lambdas, so your lambda simply replaces the one in the distributed source, the patch seems to work. I'm not sure how to generate a "patch" to your "patch". Here's a diff-listing that seems to work to remove the nested lambdas. This has not been fully tested, but the failing use-cases from the original bug report now work. Thanks =JohnHoldingPen $ cat patch *** org-mobile.el.GOOD 2016-02-25 17:19:52.489685000 -0500 --- /home/hutchinson/.emacs.d/elpa/org-plus-contrib-20160222/org-mobile.el 2016-02-25 19:18:38.746283600 -0500 *************** *** 454,467 **** (insert "#+TODO: " (mapconcat 'identity todo-kwds " ") " | " (mapconcat 'identity done-kwds " ") "\n")) (setq def-tags (mapcar ! (lambda (x) ! (cond ((null x) nil) ! ((stringp x) x) ! ((eq (car x) :startgroup) "{") ! ((eq (car x) :endgroup) "}") ! ((eq (car x) :grouptags) nil) ! ((eq (car x) :newline) nil) ! ((listp x) (car x)))) def-tags)) (setq def-tags (delq nil def-tags)) (setq tags (org-delete-all def-tags tags)) --- 454,469 ---- (insert "#+TODO: " (mapconcat 'identity todo-kwds " ") " | " (mapconcat 'identity done-kwds " ") "\n")) (setq def-tags (mapcar ! (lambda (tag) ! (cl-case (car tag) ! ((nil) nil) ! (:startgroup "{") ! (:endgroup "}") ! (:startgrouptag "{") ! (:endgrouptag "}") ! (:grouptags ":") ! (:newline nil) ! (t (car tag)))) def-tags)) (setq def-tags (delq nil def-tags)) (setq tags (org-delete-all def-tags tags)) HoldingPen $ On Thursday, February 25, 2016 3:54 PM, John Hutchinson <johnrhutchinson@att.net> wrote: Hi: When I apply the patch and run it (using either "startgroup / endgroup" or "startgrouptag / endgrouptag" delimiters) I get an error "Wrong type argument: characterp lambda". This is using Monday's ELPA distribution of Org. I'll try and investigate further this weekend when I have some time. Thanks and regards,=John On Sunday, February 21, 2016 10:34 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: Hello, John Hutchinson <johnrhutchinson@att.net> writes: > - Running org-mobile-push with group tags defined in init.el file using :startgrouptag etc. results in an error, and (in my case) DropBox not being updated. Here's the log from the *Messages* buffer: Creating agendas... > Agenda written to Org file /cygdrive/c/Users/IBM_ADMIN/Dropbox/Apps/MobileOrg/agendas.org > Creating agendas...done > Saving all Org-mode buffers... > (No files need saving) > Saving all Org-mode buffers... done > Copying files... > Writing index file... > org-mobile-create-index-file: Wrong type argument: sequencep, :startgrouptag > Quit > [2 times] > > - Commenting out the group tags attributes in init.el results in Org Mobile successfully generating and pushing to DropBox. > - Turning group tags off with org-toggle-tags-groups and running org-mobile-push causes the error. > - Using Org from org-plus-contrib-20160208, the problem seems to be the :startgroup and :endgroup on lines 460 and 461 of org-mobile.el; patching them to :startgrouptag and :endgrouptag respectively appears to correct the issue (though I've not done in-depth testing for any other unintended side effects this patch may have). > - Also, changing the group attributes in my init.el from :startgrouptag :endgrouptag to :startgroup and :endgroup respectively corrects the issue, although the Org manual indicates that the longer form is correct. > > - As an aside, I note there are several instances of plain :startgroup intermingled with :startgrouptag in the org sources: org-plus-contrib-20160208 $ grep -n startgroup *.el > org.el:3492: (const :startgroup) > org.el:3495: (const :startgrouptag) > org.el:3523: (const :tag "Start radio group" (:startgroup)) > org.el:5063: (append '((:startgroup)) > org.el:5233: (:startgroup "{") > org.el:5235: (:startgrouptag "[") > org.el:5252: (push '(:startgroup) org-tag-alist) > org.el:5258: (push '(:startgrouptag) org-tag-alist) > org.el:5322: (if (or (memq (car e) '(:newline :grouptags :endgroup :startgroup)) > org.el:13093: ((equal e '(:startgroup)) > org.el:15232: ((eq (car e) :startgroup) > org.el:15241: ((eq (car e) :startgrouptag) > org-interactive-query.el:92: ((equal e '(:startgroup)) > org-interactive-query.el:268: ;; if this is not a keyword (:startgroup, etc), ignore it > org-mobile.el:460: ((eq (car x) :startgroup) "{") > org-pcomplete.el:245: ((eq :startgroup (car x)) "{") > ox-beamer.el:1128: (append '((:startgroup)) > > Regards,=John > P.S. First time writing to this list; apologies in advance for > breaches of etiquette. Thank you for the report. This is probably related to the recent introduction of Tag hierarchy. Would the following patch solve the problem? Regards, -- Nicolas Goaziou [-- Attachment #2: Type: text/html, Size: 14047 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug and possible fix / work-around using org-mobile with group tags 2016-02-26 0:35 ` John Hutchinson @ 2016-02-26 21:59 ` Nicolas Goaziou 0 siblings, 0 replies; 4+ messages in thread From: Nicolas Goaziou @ 2016-02-26 21:59 UTC (permalink / raw) To: John Hutchinson; +Cc: emacs-orgmode@gnu.org Hello, John Hutchinson <johnrhutchinson@att.net> writes: > Hi Nicolas: > I think the diff patch you sent had an "off-by-one-line" error. If > I remove the nested lambdas, so your lambda simply replaces the one in > the distributed source, the patch seems to work. True. I fixed my fix and pushed it. Thank you for the feedback. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-26 21:57 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <608350460.2102657.1455198750254.JavaMail.yahoo.ref@mail.yahoo.com> 2016-02-11 13:52 ` Bug and possible fix / work-around using org-mobile with group tags John Hutchinson 2016-02-21 15:35 ` Nicolas Goaziou [not found] ` <196579851.2531195.1456433654870.JavaMail.yahoo@mail.yahoo.com> 2016-02-26 0:35 ` John Hutchinson 2016-02-26 21:59 ` 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).