From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRmZw-0008WV-2U for guix-patches@gnu.org; Wed, 20 Dec 2017 17:11:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRmZq-0006f9-VU for guix-patches@gnu.org; Wed, 20 Dec 2017 17:11:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:36221) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRmZq-0006ew-Qz for guix-patches@gnu.org; Wed, 20 Dec 2017 17:11:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eRmZq-0004MH-HE for guix-patches@gnu.org; Wed, 20 Dec 2017 17:11:02 -0500 Subject: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat. Resent-Message-ID: From: Alex Kost References: <87lgke3vlz.fsf@gmail.com> <20171014102915.11778-1-go.wigust@gmail.com> <87y3o6uheo.fsf@gnu.org> <87d13yiw6w.fsf@gnu.org> <87609cluzf.fsf@gmail.com> <87zi6os3u3.fsf@gnu.org> <87fu8famhm.fsf@gmail.com> <877etofi3n.fsf@gmail.com> <87vah8hyxs.fsf@gnu.org> <87lghzyoyn.fsf@gmail.com> <878tdy1lmq.fsf@gmail.com> <87o9muxeo1.fsf@gmail.com> Date: Thu, 21 Dec 2017 01:10:30 +0300 In-Reply-To: <87o9muxeo1.fsf@gmail.com> (Oleg Pykhalov's message of "Wed, 20 Dec 2017 06:26:54 +0300") Message-ID: <87y3lxuk2x.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Oleg Pykhalov Cc: 28832@debbugs.gnu.org Oleg Pykhalov (2017-12-20 06:26 +0300) wrote: > Alex Kost writes: > >> and I would make it more robust: there is a >> problem with this code: (string-drop "geiser" 6) does not return what >> you mean > > Yes, because "geiser" differs from most of Emacs packages: > > ls > /gnu/store/7rl2k8ismmyq9ic6ha6vzv38a3hrrni2-emacs-dash-2.13.0/share/emacs= /site-lisp/guix.d/dash-2.13.0/ > dash-autoloads.el dash.el dash.elc dash-functional.el dash-functi= onal.elc > > ls /gnu/store/7lh77fmapmjjv3kj2q69dy58kjniw9am-geiser-0.9/share/emacs= /site-lisp/ > geiser-autodoc.el geiser-chibi.elc =E2=80=A6 > > Maybe we just need to fix "geiser"? Sorry, I don't understand what you mean. What is wrong with geiser and why/how should it be fixed? Also do other non-"emacs-" packages (magit, emms) have the same problem? >> , and (string-drop "dash" 6) errors! > > Do you really mean emacs-dash or dash? For me both succeeded. I meant just "dash" name. > As I see emacs-dash is OK, except "emacs-minimal" in EMACSLOADPATH. > Here is a log-file with DEBUG-INPUTS: No-no, I didn't mean that the build process of 'emacs-dash' would fail, I meant that your code uses 'string-drop' and it may fail: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (string-drop "dash" 6) ERROR: In procedure string-drop: Value out of range 0 to 4: 6 Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]>=20 --8<---------------cut here---------------end--------------->8--- All I wanted to say is that emacs inputs do not necessarily have "emacs-" prefix. For example, 'emacs-direnv' and 'emacs-ag' packages have "dash" input, but not "emacs-dash". But now I see that it's not a problem: I mistakenly thought that the names are taken from the input names, but now I see they are extracted from the store file names, so my above concern is not relevant :-) >> I think we shouldn't rely on the assumption that all emacs inputs have >> "emacs-" prefix > > Then, how to determine that a package is Emacs package? I don't know :-) 'emacs-inputs' is probably the best way. >> , so I think >> this procedure should check whether the input name begins with "emacs-" >> before trying to remove this substring. >>> + "-" version)) >>> + name+version) >>> + input))))) >>> + (fold alist-delete (emacs-inputs inputs) '("emacs" "source= "))) >> >> Since you already take only emacs inputs, is it really needed to remove >> "emacs" and "source"? I mean emacs inputs do not contain "emacs" and >> "source" anyway, right? > > emacs inputs contain "emacs-minimal" and "source". > So we actually need to remove "emacs-minimal" instead "emacs". or maybe both? since some packages uses 'emacs' instead of 'emacs-minimal' (emacs-auctex, emacs-exwm, etc.). --=20 Alex