From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: calibre.el Date: Thu, 20 Apr 2023 15:37:01 +0200 Message-ID: References: <87v8ht3etv.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005ba6d505f9c4a3c8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20668"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , emacs-devel To: =?UTF-8?Q?Kjartan_=C3=93li_=C3=81gustsson?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 20 15:37:56 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ppUU0-0005FJ-BE for ged-emacs-devel@m.gmane-mx.org; Thu, 20 Apr 2023 15:37:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppUTQ-0002Ak-Dw; Thu, 20 Apr 2023 09:37:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppUTN-00028H-LA for emacs-devel@gnu.org; Thu, 20 Apr 2023 09:37:17 -0400 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppUTL-0004Z7-KR for emacs-devel@gnu.org; Thu, 20 Apr 2023 09:37:17 -0400 Original-Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-2febac9cacdso387341f8f.1 for ; Thu, 20 Apr 2023 06:37:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681997833; x=1684589833; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=msknfq9gdrKRYkA+nkm/CTGpxuHrVRFh4FgX89PsLl4=; b=ciKOtu06/2n91K1T6h8bjbXFgJUoUFl0Kl0DhmWebJfPlCSLcJbfqNGz08G64M2ulH XH739wteTKfr8X4Lnk6xWmk2yuVMLRqi1wZqmlfqHpTIpp3x1VZYs+hANGBzIkVfke0N rjMIzmtrx332wGRdknADapC9pWv0OGuJqUdifjjmKgTZGNYudd7w0WuCSRDtRYTnrNFD OU1D52H76dYmTK+XlRNnMsskm/FihUs7P00iIq64YYRLNrbgLy+3zLdfDdiCO/h1HATD jb0PNXXGlAdZ8YSdZN8LQBCEd6B7yNs6+E0KCmH/0T28PAss8GgXgopR70XJmP+Qi80f 4k3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681997833; x=1684589833; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=msknfq9gdrKRYkA+nkm/CTGpxuHrVRFh4FgX89PsLl4=; b=IBX+frUIX8So1NGI2JHwLBx03wx0mlvqTLdJq7DSv24zuWOXEEu3J3R8HzqvCS4IpQ AGu57T5OpBSowgL81Mmt/pyHXVZPfhcvL2Puspw5fPLSa7KncWD4D/kTLumr+Pv/vjWo qrtKStItSBtwdlBkRhwiAGa86WUu+9adFs2dVbwu9AxFyb2yhF2CeDLdjAEbXKKvsttO 8c1EqzUhXwDWelsixYZYrkc3NUDeDji6egzTHIBuQ+LhjEcaLqGzKGOmjw1sz1RAgoXZ pwTVwLa705DHE2y9q/rL0Z3UL0zyRuujFZaXls2e0tEQoIG48MrXVrlrLkfhQ87ovv3Z A9NQ== X-Gm-Message-State: AAQBX9fw3HrQBZUZmQ6yfsajRjZ/PBJjInyBfBT/pt2dVw/7T6tdtcF3 tzd5XVkR5feL5hNG+xxemIJwgcgKZJALgVHX7Rk= X-Google-Smtp-Source: AKy350Yw70bTMANhP5JOo0MwDHIjRti3BoCFhQ8dCAn4N4EHaVmKiNt6i5dOKfRPxuj1zZaQpC1kZ6YcIgHRqAoc95Q= X-Received: by 2002:adf:eccf:0:b0:300:bec3:b50b with SMTP id s15-20020adfeccf000000b00300bec3b50bmr272190wro.4.1681997833150; Thu, 20 Apr 2023 06:37:13 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=dalanicolai@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305506 Archived-At: --0000000000005ba6d505f9c4a3c8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey Kjartan, nice to see you writing packages and contributing to Emacs now= . This sounds interesting indeed, but it would be nice if you could add some (more) explanation about the package in the repo its README and/or in the initial comment of the calibre.el file. Also, I am using the very mature calibredb.el package for a few years already. Are you already aware of its existence? If so, besides that that package is only available from Melpa, could you explain why you wrote this similar alternative package? Anyway, thanks for sharing your package! And nice job! On Tue, 18 Apr 2023 at 10:36, Kjartan =C3=93li =C3=81gustsson wrote: > Thank you for taking the time to look at it. > > >> Would there be any > >> interest in adding it to GNU ELPA? And if so, is my copyright assignme= nt > >> for Emacs sufficient, or does ELPA require a separate assignment? > > > > No separate assignment is necessary, as GNU ELPA packages are regarded > > to be part of Emacs. > > Good to know. > > >> This is my first attempt at writing an Emacs package, so I expect to > >> have gotten many things wrong. As such I would welcome reviews from > >> people who know more about Elisp packaging. > > > > The first thing to note is that you don't need a -pkg.el file. ELPA > > will generate one for you using the metadata in the main file and > > overwrite whatever you have written. > > Another good to know. I remember reading that somewhere, but then I > looked at some other packages that seemed to maintain a -pkg.el file. > > > This means you should copy the metadata to calibre.el. Especially the > > dependency list. (Also, why do you depend on "29.1.0", a version which > > is unreleased and has an additional ".0" at the end? I guess you need > > Emacs 29 because of SQLite? Have you taken a look at emacsql?) > > I'll definitely fix the .0 thing. You are correct that the dependency > on Emacs 29 is for SQLite. Emacsql would not work, since I am > interacting with an existing database maintained by Calibre. If you > want to wait until Emacs 29 is released to add it I would definitely > agree to that. > > > From a brief skim of the code, it looks more or less fine. There are > > minor things I am not sure about (such as the usage of eieio or why you > > declare some functions instead of requiring the file). > > The functions that are declared instead of required currently cause a > recursive require because of how the package is structured. I am hoping > to refactor this soon. > > As for the usage of eieio, is there a reason not to use it? > > -- > Kjartan Oli Agustsson > GPG Key fingerprint: 4801 0D71 49C0 1DD6 E5FD 6AC9 D757 2FE3 605E E6B0 > > --0000000000005ba6d505f9c4a3c8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey Kjartan, nice to see you writing packages and con= tributing to Emacs now.

This sounds interesting in= deed, but it would be nice if you could add some (more) explanation about t= he
=C2=A0package in the repo its README and/or in the initial com= ment of the calibre.el file.

Also, I am using the = very mature calibre= db.el package for a few years already. Are you already aware
= of its existence? If so, besides that that package is only available from M= elpa, could you explain why you
wrote this similar alternative pa= ckage?

Anyway, thanks for sharing your package! An= d nice job!

On Tue, 18 Apr 2023 at 10:36, Kjartan =C3=93li =C3=81g= ustsson <kjartanoli@outlook.co= m> wrote:
Thank you for taking the time to look at it.

>>=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=A0Would there be any
>> interest in adding it to GNU ELPA? And if so, is my copyright assi= gnment
>> for Emacs sufficient, or does ELPA require a separate assignment?<= br> >
> No separate assignment is necessary, as GNU ELPA packages are regarded=
> to be part of Emacs.

Good to know.

>> This is my first attempt at writing an Emacs package, so I expect = to
>> have gotten many things wrong.=C2=A0 As such I would welcome revie= ws from
>> people who know more about Elisp packaging.
>
> The first thing to note is that you don't need a -pkg.el file.=C2= =A0 ELPA
> will generate one for you using the metadata in the main file and
> overwrite whatever you have written.

Another good to know.=C2=A0 I remember reading that somewhere, but then I looked at some other packages that seemed to maintain a -pkg.el file.

> This means you should copy the metadata to calibre.el.=C2=A0 Especiall= y the
> dependency list.=C2=A0 (Also, why do you depend on "29.1.0",= a version which
> is unreleased and has an additional ".0" at the end?=C2=A0 I= guess you need
> Emacs 29 because of SQLite?=C2=A0 Have you taken a look at emacsql?)
I'll definitely fix the .0 thing.=C2=A0 You are correct that the depend= ency
on Emacs 29 is for SQLite.=C2=A0 Emacsql would not work, since I am
interacting with an existing database maintained by Calibre.=C2=A0 If you want to wait until Emacs 29 is released to add it I would definitely
agree to that.

> From a brief skim of the code, it looks more or less fine.=C2=A0 There= are
> minor things I am not sure about (such as the usage of eieio or why yo= u
> declare some functions instead of requiring the file).

The functions that are declared instead of required currently cause a
recursive require because of how the package is structured.=C2=A0 I am hopi= ng
to refactor this soon.

As for the usage of eieio, is there a reason not to use it?

--
Kjartan Oli Agustsson
GPG Key fingerprint: 4801 0D71 49C0 1DD6 E5FD=C2=A0 6AC9 D757 2FE3 605E E6B= 0

--0000000000005ba6d505f9c4a3c8--