From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hutchinson Subject: Re: Bug and possible fix / work-around using org-mobile with group tags Date: Fri, 26 Feb 2016 00:35:01 +0000 (UTC) Message-ID: <1114990233.2630279.1456446901468.JavaMail.yahoo@mail.yahoo.com> References: <8760xi2i0p.fsf@nicolasgoaziou.fr> <196579851.2531195.1456433654870.JavaMail.yahoo@mail.yahoo.com> Reply-To: John Hutchinson Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2630278_411786393.1456446901460" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZ6NA-0005i4-AA for emacs-orgmode@gnu.org; Thu, 25 Feb 2016 19:35:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZ6N7-000242-18 for emacs-orgmode@gnu.org; Thu, 25 Feb 2016 19:35:08 -0500 Received: from nm18.bullet.mail.ne1.yahoo.com ([98.138.90.81]:36264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZ6N6-00022J-Mf for emacs-orgmode@gnu.org; Thu, 25 Feb 2016 19:35:04 -0500 In-Reply-To: <196579851.2531195.1456433654870.JavaMail.yahoo@mail.yahoo.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" ------=_Part_2630278_411786393.1456446901460 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 distribu= ted source, the patch seems to work. I'm not sure how to generate a "patch" to your "patch". Here's a diff-listi= ng 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=20 =3DJohnHoldingPen $ cat patch *** org-mobile.el.GOOD=C2=A0 2016-02-25 17:19:52.489685000 -0500 --- /home/hutchinson/.emacs.d/elpa/org-plus-contrib-20160222/org-mobile.el= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2016-02-25 19:18:38.746283600 -0500 *************** *** 454,467 **** =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (insert "#+TODO: " (mapconcat 'i= dentity todo-kwds " ") " | " =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 (mapconcat 'identity done-kwds " ") "\n")) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (setq def-tags (mapcar !=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lambda (x) !=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (cond ((null x= ) nil) !=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 ((stringp x) x) !=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C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C2=A0=C2=A0=C2=A0 (setq tags (org-delete-all def-t= ags tags)) --- 454,469 ---- =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (insert "#+TODO: " (mapconcat 'i= dentity todo-kwds " ") " | " =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 (mapconcat 'identity done-kwds " ") "\n")) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (setq def-tags (mapcar !=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lambda (tag) !=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (c= l-case (car tag) !=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 ((nil) nil) !=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 (:startgroup "{") !=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=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A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 def-tags)) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (setq def-tags (delq nil def-tag= s)) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (setq tags (org-delete-all def-t= ags tags)) HoldingPen $ On Thursday, February 25, 2016 3:54 PM, John Hutchinson wrote: =20 Hi: When I apply the patch and run it (using either "startgroup / endgroup" or = "startgrouptag / endgrouptag" delimiters) I get an error "Wrong type argume= nt: 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,=3DJohn =20 On Sunday, February 21, 2016 10:34 AM, Nicolas Goaziou wrote: =20 Hello, John Hutchinson writes: >=C2=A0 =C2=A0 - Running org-mobile-push with group tags defined in init.el= file using :startgrouptag etc. results in an error, and (in my case) DropB= ox not being updated. Here's the log from the *Messages* buffer:=C2=A0 Crea= ting agendas... > Agenda written to Org file /cygdrive/c/Users/IBM_ADMIN/Dropbox/Apps/Mobil= eOrg/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, :startgroup= tag > Quit >=C2=A0 [2 times] > >=C2=A0 =C2=A0 - Commenting out the group tags attributes in init.el result= s in Org Mobile successfully generating and pushing to DropBox. >=C2=A0 =C2=A0 - Turning group tags off with org-toggle-tags-groups and run= ning org-mobile-push causes the error. >=C2=A0 =C2=A0 - Using Org from org-plus-contrib-20160208, the problem seem= s 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 unin= tended side effects this patch may have). >=C2=A0 =C2=A0 - Also, changing the group attributes in my init.el from :st= artgrouptag :endgrouptag to :startgroup and :endgroup respectively corrects= the issue, although the Org manual indicates that the longer form is corre= ct.=C2=A0 =C2=A0=20 > >=C2=A0 =C2=A0 - As an aside, I note there are several instances of plain := startgroup intermingled with :startgrouptag in the org sources:=C2=A0 org-p= lus-contrib-20160208 $ grep -n startgroup *.el > org.el:3492:=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (const :startgroup) > org.el:3495:=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (const :startgrouptag) > org.el:3523:=C2=A0=C2=A0=C2=A0 =C2=A0 (const :tag "Start radio group" (:s= tartgroup)) > org.el:5063:=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0 =C2=A0 (append '((:startgroup)) > org.el:5233:=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 (:= startgroup "{") > org.el:5235:=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 (:= startgrouptag "[") > org.el:5252:=C2=A0=C2=A0=C2=A0 =C2=A0 (push '(:startgroup) org-tag-alist) > org.el:5258:=C2=A0=C2=A0=C2=A0 =C2=A0 (push '(:startgrouptag) org-tag-ali= st) > org.el:5322:=C2=A0 =C2=A0 =C2=A0 (if (or (memq (car e) '(:newline :groupt= ags :endgroup :startgroup)) > org.el:13093:=C2=A0=C2=A0=C2=A0 =C2=A0 ((equal e '(:startgroup)) > org.el:15232:=C2=A0=C2=A0=C2=A0 ((eq (car e) :startgroup) > org.el:15241:=C2=A0=C2=A0=C2=A0 ((eq (car e) :startgrouptag) > org-interactive-query.el:92:=C2=A0=C2=A0=C2=A0 ((equal e '(:startgroup)) > org-interactive-query.el:268:=C2=A0 =C2=A0 ;; if this is not a keyword (:= startgroup, etc), ignore it > org-mobile.el:460:=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2= =A0 =C2=A0 =C2=A0 =C2=A0 ((eq (car x) :startgroup) "{") > org-pcomplete.el:245:=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 ((eq :s= tartgroup (car x)) "{") > ox-beamer.el:1128:=C2=A0=C2=A0=C2=A0 =C2=A0 (append '((:startgroup)) > > Regards,=3DJohn > 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, --=20 Nicolas Goaziou =20 ------=_Part_2630278_411786393.1456446901460 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 gene= rate 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.

T= hanks
=3DJohn
HoldingPen $ cat patc= h
*** org-mobile.el.GOOD  2016-02-25 17:19:52.489685000 -0500
--= - /home/hutchinson/.emacs.d/elpa/org-plus-contrib-20160222/org-mobile.el&nb= sp;     2016-02-25 19:18:38.746283600 -0500
********= *******
*** 454,467 ****
        (= insert "#+TODO: " (mapconcat 'identity todo-kwds " ") " | "
  =             &nb= sp; (mapconcat 'identity done-kwds " ") "\n"))
    &= nbsp;   (setq def-tags (mapcar
!     =             &nb= sp;   (lambda (x)
!       &= nbsp;           &nbs= p;   (cond ((null x) nil)
!      = ;            &n= bsp;          ((stringp x) x)<= br>!            = ;            &n= bsp;    ((eq (car x) :startgroup) "{")
!   = ;            &n= bsp;            = ; ((eq (car x) :endgroup) "}")
!      &nbs= p;            &= nbsp;         ((eq (car x) :groupta= gs) nil)
!          &n= bsp;            = ;      ((eq (car x) :newline) nil)
!  = ;            &n= bsp;            = ;  ((listp x) (car x))))
       =             &nb= sp;  def-tags))
        (setq de= f-tags (delq nil def-tags))
        (= setq tags (org-delete-all def-tags tags))
--- 454,469 ----
 &nbs= p;      (insert "#+TODO: " (mapconcat 'identity to= do-kwds " ") " | "
         = ;       (mapconcat 'identity done-kwds " ") "= \n"))
        (setq def-tags (mapcar<= br>!            = ;           (lambda (tag)=
!           &nbs= p;             = (cl-case (car tag)
!        &nbs= p;            &= nbsp;     ((nil) nil)
!     = ;            &n= bsp;         (:startgroup "{")
!=             &nb= sp;            =   (:endgroup "}")
!        =             &nb= sp;      (:startgrouptag "{")
!  &nbs= p;            &= nbsp;           (:endgrou= ptag "}")
!          &= nbsp;           &nbs= p;    (:grouptags ":")
!     &nb= sp;            =          (:newline nil)
! &= nbsp;           &nbs= p;             = (t (car tag))))
         &n= bsp;            def-= tags))
        (setq def-tags (delq n= il def-tags))
        (setq tags (org= -delete-all def-tags tags))
HoldingPen $



On Thursday, February 25, 2016 3:54 PM, John Hutchinson <johnrh= utchinson@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 arg= ument: 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,
=
=3DJoh= n


<= div id=3D"yui_3_16_0_1_1456446512633_7057" class=3D"yiv7958958138yahoo_quot= ed" style=3D"display:block;">
On Sunday, February 21, 2016 10:34 AM, Nicolas Goaz= iou <mail@nicolasgoaziou.fr> wrote:
=

Hello,
John Hutchinson <johnrhutchinson@att.net> writes:

>    - Running org-mobile-push with gr= oup tags defined in init.el file using :startgrouptag etc. results in an er= ror, and (in my case) DropBox not being updated. Here's the log from the *M= essages* buffer:  Creating agendas...
> Agenda w= ritten to Org file /cygdrive/c/Users/IBM_ADMIN/Dropbox/Apps/MobileOrg/agend= as.org
> Creating agendas...done
>= ; Saving all Org-mode buffers...
> (No files need savi= ng)
> Saving all Org-mode buffers... done
> Copying files...
> Writing index file...> org-mobile-create-index-file: Wrong type argument: seq= uencep, :startgrouptag
> Quit
>&n= bsp; [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 o= rg-mobile-push causes the error.
>    - Usin= g Org from org-plus-contrib-20160208, the problem seems to be the :startgro= up and :endgroup on lines 460 and 461 of org-mobile.el; patching them to :s= tartgrouptag and :endgrouptag respectively appears to correct the issue (th= ough I've not done in-depth testing for any other unintended side effects t= his patch may have).
>    - Also, changing t= he group attributes in my init.el from :startgrouptag :endgrouptag to :star= tgroup and :endgroup respectively corrects the issue, although the Org manu= al 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 *.e= l
> org.el:3492:        = (const :startgroup)
> org.el:3495:    =     (const :startgrouptag)
> org.el:35= 23:      (const :tag "Start radio group" (:startgroup)= )
> org.el:5063:        =           (append '((:startgroup))
> org.el:5233:         =     (:startgroup "{")
> org.el:5235: &= nbsp;            (:startgrouptag "[")> org.el:5252:      (push '(:startgr= oup) org-tag-alist)
> org.el:5258:    &= nbsp; (push '(:startgrouptag) org-tag-alist)
> org.el:= 5322:      (if (or (memq (car e) '(:newline :grouptags :endg= roup :startgroup))
> org.el:13093:    &= nbsp; ((equal e '(:startgroup))
> org.el:15232: =    ((eq (car e) :startgroup)
> org.el:15241= :    ((eq (car e) :startgrouptag)
> or= g-interactive-query.el:92:    ((equal e '(:startgroup))
> org-interactive-query.el:268:    ;; if this = is not a keyword (:startgroup, etc), ignore it
> org-m= obile.el:460:             = ;     ((eq (car x) :startgroup) "{")
> org-p= complete.el:245:          ((eq :startgro= up (car x)) "{")
> ox-beamer.el:1128:   = ;   (append '((:startgroup))
>
= > Regards,=3DJohn
> P.S. First time writing to this= list; apologies in advance for
> breaches of etiquett= e.

Thank you for the report.

This is probably related to the recent introdu= ction of Tag hierarchy.
Would the following patch solve t= he problem?



Regards,<= /div>

--
Nicolas Go= aziou



<= /div>


=
------=_Part_2630278_411786393.1456446901460--