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