From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Question about updating a package for the org-get-tags change Date: Mon, 23 Apr 2018 16:02:34 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001fd60d056a862bde" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAdvY-00071x-1L for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 12:02:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAdvS-00078V-Tg for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 12:02:52 -0400 Received: from mail-yw0-x233.google.com ([2607:f8b0:4002:c05::233]:45147) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fAdvS-00077u-Nx for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 12:02:46 -0400 Received: by mail-yw0-x233.google.com with SMTP id g9-v6so5032440ywb.12 for ; Mon, 23 Apr 2018 09:02:46 -0700 (PDT) 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" To: emacs-org list --0000000000001fd60d056a862bde Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, I am trying to update the ox-hugo package to work with zero warnings for both Org 9.1 and 9.2. I tried adding this function: (defsubst org-hugo--get-tags () "Wrapper function to pick the correct fn for getting inherited Org tags." ;; Starting Org 9.2, `org-get-tags' returns all the inherited tags ;; instead of returning only the local tags i.e. only the current ;; headline tags. ;; https://code.orgmode.org/bzg/org-mode/commit/fbe56f89f75a8979e0ba48001a8225= 18df2c66fe ;; For Org <=3D 9.1, `org-get-tags' returned a list of tags *only* at ;; the current heading, while `org-get-tags-at' returned inherited ;; tags too. (if (fboundp #'org--get-local-tags) ;If using Org 9.2+ (org-get-tags) (org-get-tags-at))) But ox-hugo still compiles with this warning with Org 9.2: In org-hugo--get-tags: ox-hugo.el:1371:6:Warning: =E2=80=98org-get-tags-at=E2=80=99 is an obsolete= function (as of Org 9.2); use =E2=80=98org-get-tags=E2=80=99 instead. What's the canonical way to deal with such cases? Thanks. Kaushal --=20 Kaushal Modi --0000000000001fd60d056a862bde Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

I am try= ing to update the ox-hugo package to work with zero warnings for both Org 9= .1 and 9.2.

I tried adding this function:

(defsubst org= -hugo--get-tags ()
=C2=A0 "Wrapper function to pick the correct fn = for getting inherited Org tags."
=C2=A0 ;; Starting Org 9.2, `org-g= et-tags' returns all the inherited tags
=C2=A0 ;; instead of returni= ng only the local tags i.e. only the current
=C2=A0 ;; headline tags.=C2=A0 ;; https://code.orgmode.org/bzg/org-mode/com= mit/fbe56f89f75a8979e0ba48001a822518df2c66fe
=C2=A0 ;; For Org <= =3D 9.1, `org-get-tags' returned a list of tags *only* at
=C2=A0 ;; = the current heading, while `org-get-tags-at' returned inherited
=C2= =A0 ;; tags too.
=C2=A0 (if (fboundp #'org--get-local-tags)=C2=A0=C2= =A0 ;If using Org 9.2+
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (org-get-tags)
= =C2=A0=C2=A0=C2=A0 (org-get-tags-at)))

But ox-hugo still compi= les with this warning with Org 9.2:

In org-hugo--get-tags:
ox-hug= o.el:1371:6:Warning: =E2=80=98org-get-tags-at=E2=80=99 is an obsolete funct= ion (as of
=C2=A0=C2=A0=C2=A0 Org 9.2); use =E2=80=98org-get-tags=E2=80= =99 instead.

What's the canonical way to deal with such ca= ses?

Thanks.

Kaushal

<= /div>
--

Kaushal Modi

--0000000000001fd60d056a862bde-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Question about updating a package for the org-get-tags change Date: Mon, 23 Apr 2018 17:08:28 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d828c1056a87160e" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAexG-0002aa-D4 for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 13:08:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAexF-00010O-48 for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 13:08:42 -0400 Received: from mail-yb0-x229.google.com ([2607:f8b0:4002:c09::229]:42228) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fAexE-00010C-Vz for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 13:08:41 -0400 Received: by mail-yb0-x229.google.com with SMTP id j69-v6so1771216ybg.9 for ; Mon, 23 Apr 2018 10:08:40 -0700 (PDT) In-Reply-To: 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" To: emacs-org list --000000000000d828c1056a87160e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 23, 2018 at 12:02 PM Kaushal Modi wrote: > But ox-hugo still compiles with this warning with Org 9.2: > > In org-hugo--get-tags: > ox-hugo.el:1371:6:Warning: =E2=80=98org-get-tags-at=E2=80=99 is an obsole= te function (as of > Org 9.2); use =E2=80=98org-get-tags=E2=80=99 instead. > > What's the canonical way to deal with such cases? > Replying to self.. not sure if this is the best way.. but it works. I'd like to know if there's a way without defining and calling a macro like this (may be there's a way to use one of the eval-* macros, but I cannot figure out how): ;; Using the correct function for getting inherited Org tags. (defmacro org-hugo--get-tags-alias () "Generate alias to point to the correct fn for getting inherited Org tags." ;; Starting Org 9.2, `org-get-tags' returns all the inherited tags ;; instead of returning only the local tags i.e. only the current ;; headline tags. ;; https://code.orgmode.org/bzg/org-mode/commit/fbe56f89f75a8979e0ba48001a8225= 18df2c66fe ;; For Org <=3D 9.1, `org-get-tags' returned a list of tags *only* at ;; the current heading, while `org-get-tags-at' returned inherited ;; tags too. (if (fboundp #'org--get-local-tags) ;If using Org 9.2+ `(defalias 'org-hugo--get-tags 'org-get-tags) `(defalias 'org-hugo--get-tags 'org-get-tags-at))) (org-hugo--get-tags-alias) --=20 Kaushal Modi --000000000000d828c1056a87160e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Apr 23= , 2018 at 12:02 PM Kaushal Modi <kaushal.modi@gmail.com> wrote:
But ox-hugo still compiles= with this warning with Org 9.2:

In org-hugo--get-tags:
ox-hugo.e= l:1371:6:Warning: =E2=80=98org-get-tags-at=E2=80=99 is an obsolete function= (as of
=C2=A0=C2=A0=C2=A0 Org 9.2); use =E2=80=98org-get-tags=E2=80=99 = instead.

What's the canonical way to deal with such cases?=

Replying to self.. not s= ure if this is the best way.. but it works. I'd like to know if there&#= 39;s a way without defining and calling a macro like this (may be there'= ;s a way to use one of the eval-* macros, but I cannot figure out how):
=
;; Using the correct function for getting inherited Org tags.
(defma= cro org-hugo--get-tags-alias ()
=C2=A0 "Generate alias to point to = the correct fn for getting inherited Org tags."
=C2=A0 ;; Starting = Org 9.2, `org-get-tags' returns all the inherited tags
=C2=A0 ;; ins= tead of returning only the local tags i.e. only the current
=C2=A0 ;; he= adline tags.
=C2=A0 ;; https://code.orgmode.org/b= zg/org-mode/commit/fbe56f89f75a8979e0ba48001a822518df2c66fe
=C2=A0 ;= ; For Org <=3D 9.1, `org-get-tags' returned a list of tags *only* at=
=C2=A0 ;; the current heading, while `org-get-tags-at' returned inh= erited
=C2=A0 ;; tags too.
=C2=A0 (if (fboundp #'org--get-local-t= ags)=C2=A0=C2=A0 ;If using Org 9.2+
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(def= alias 'org-hugo--get-tags 'org-get-tags)
=C2=A0=C2=A0=C2=A0 `(de= falias 'org-hugo--get-tags 'org-get-tags-at)))
(org-hugo--get-ta= gs-alias)
--

Kaushal Modi

--000000000000d828c1056a87160e-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Question about updating a package for the org-get-tags change Date: Mon, 23 Apr 2018 20:11:30 +0200 Message-ID: <87d0yppzcd.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAfwA-0001P8-Oe for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 14:11:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAfw7-0004LT-HG for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 14:11:38 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:33861) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fAfw7-0004LE-A8 for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 14:11:35 -0400 In-Reply-To: (Kaushal Modi's message of "Mon, 23 Apr 2018 16:02:34 +0000") 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" To: Kaushal Modi Cc: emacs-org list Hello, Kaushal Modi writes: > I am trying to update the ox-hugo package to work with zero warnings for > both Org 9.1 and 9.2. A warning is not an error. I wouldn't bother. Anyway, you might want to look at `with-no-warnings'. Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Question about updating a package for the org-get-tags change Date: Mon, 23 Apr 2018 19:09:25 +0000 Message-ID: References: <87d0yppzcd.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000618dcc056a88c7d5" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAgqI-0005Vo-QR for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 15:09:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAgqH-0005Qy-OG for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 15:09:38 -0400 Received: from mail-yw0-x22b.google.com ([2607:f8b0:4002:c05::22b]:46456) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fAgqH-0005Qp-JJ for emacs-orgmode@gnu.org; Mon, 23 Apr 2018 15:09:37 -0400 Received: by mail-yw0-x22b.google.com with SMTP id i17-v6so5223400ywg.13 for ; Mon, 23 Apr 2018 12:09:37 -0700 (PDT) In-Reply-To: <87d0yppzcd.fsf@nicolasgoaziou.fr> 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" To: Nicolas Goaziou Cc: emacs-org list --000000000000618dcc056a88c7d5 Content-Type: text/plain; charset="UTF-8" On Mon, Apr 23, 2018 at 2:11 PM Nicolas Goaziou wrote: > > A warning is not an error. I wouldn't bother. > Well, it was bothering me as I have a hook at auto-compiles the .el file each time I save it. Also bothers my OCD :) > Anyway, you might want to look at `with-no-warnings'. > That's good to know. For now, I am using the macro-method to make ox-hugo use the correct function for fetching inherited tags. Thanks. -- Kaushal Modi --000000000000618dcc056a88c7d5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Apr 23= , 2018 at 2:11 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

A warning is not an error. I wouldn't bother.

=
Well, it was bothering me as I have a hook at auto-compiles the = .el file each time I save it. Also bothers my OCD :)
=C2=A0
Anyway, you might want to look at `with-no-warnings'.
<= div>
That's good to know. For now, I am using the macro-m= ethod to make ox-hugo use the correct function for fetching inherited tags.=

Thanks.
--

K= aushal Modi

--000000000000618dcc056a88c7d5--