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--