From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YLrAC7nwmV+HewAA0tVLHw (envelope-from ) for ; Wed, 28 Oct 2020 22:29:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2OB7B7nwmV/jKgAAbx9fmQ (envelope-from ) for ; Wed, 28 Oct 2020 22:29:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9A0C09401CD for ; Wed, 28 Oct 2020 22:29:12 +0000 (UTC) Received: from localhost ([::1]:59932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXtwM-0007zP-8j for larch@yhetil.org; Wed, 28 Oct 2020 18:29:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXtwE-0007zE-Jx for bug-guix@gnu.org; Wed, 28 Oct 2020 18:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39518) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXtwD-0000wM-Pc for bug-guix@gnu.org; Wed, 28 Oct 2020 18:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kXtwD-00038Q-Kr for bug-guix@gnu.org; Wed, 28 Oct 2020 18:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44272: guix edit doesn't work when $EDITOR is set to "kate" Resent-From: Nathan Dehnel Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 28 Oct 2020 22:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44272 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun Received: via spool by 44272-submit@debbugs.gnu.org id=B44272.160392413712040 (code B ref 44272); Wed, 28 Oct 2020 22:29:01 +0000 Received: (at 44272) by debbugs.gnu.org; 28 Oct 2020 22:28:57 +0000 Received: from localhost ([127.0.0.1]:51064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXtw9-000388-FL for submit@debbugs.gnu.org; Wed, 28 Oct 2020 18:28:57 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:39990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXtw7-00037u-DB for 44272@debbugs.gnu.org; Wed, 28 Oct 2020 18:28:55 -0400 Received: by mail-wr1-f52.google.com with SMTP id m13so723133wrj.7 for <44272@debbugs.gnu.org>; Wed, 28 Oct 2020 15:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NLqXkJwGtcJPt6SWyamqMbY2cR3Ll0TvJsaMUACV8pE=; b=maNfASADBWHtF5Npwpxh/gNEZVjm6g8Z+RSrDV0VIWV3VIzu3VbR8deEohJWTACtFI MBe8/k1LWLKS/HqqTrmPlhdLRVG+0hO6zbRLpja+eVtFXd8G7LgrJI9yZzfRGo62+l6f ZZB64pYtARAHrqgiKZe5bqNnVkMZrBW1YrcmwU/uNndCUwVpD3uBhEOiPH4ttyIlDXf1 6BdpXLhq8WJU4PnT7Rpt7y/BUphBTufVfv3dY5lgFCextjcVVW+Iox5qOuCZQJ3k73W1 F2eQP5fZe02Fx6k2yPQ06yljJUTr5KeydztRsHy3gkvKJDoYuMGJ2lNK84Dl5Hcr/Bll dEnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NLqXkJwGtcJPt6SWyamqMbY2cR3Ll0TvJsaMUACV8pE=; b=Cln3X5HFynzj9dlMXATd8zbuxZxE2U34K01dO65XvbqL9EjoSnE+Mpe8fzaUHYpF5f UQ7yCWVAWlhe0KWQM9JYpuOlxRsTx4W0SibE0Dn3U36T5hoD5gfBAU9D34AJp8Qm3R6w 90E3KcnESEbzcMnxVG+n4Z4vomPDUS6Sh18lGavqcruEokVm2PMzh8QQL5jtkkVkoIet m9ArHpX/5idvX1D8uh924h72YDHIjO/CiOXYBFGrf/3xnCaszd2HV5pyFi2/7vgvpcGA CvT+tpz3RIdRQM3nA/gLIJFEv+/cB+2W5uEdqMRrhymOGsr4awPW7nuKt2+g9Mys17uL c5uw== X-Gm-Message-State: AOAM533yWKoZ7Hl0jNnJ+Vg/XRqQU+i1+P5D7ioEz6I5/zd/FIUAy7Iy Zdmk70V3JYNgFgLA7Tg4wjafxr/T/7kfMnsdNgg= X-Google-Smtp-Source: ABdhPJx2kmUKfi6NJoisPyxKQ3JWfTcjC4V7A8sslgF/Gniz7Z82HvCazVhx2EoP0icMFM2P/G1PoGuImetF44p6iTA= X-Received: by 2002:adf:fe48:: with SMTP id m8mr1687078wrs.127.1603924129611; Wed, 28 Oct 2020 15:28:49 -0700 (PDT) MIME-Version: 1.0 References: <1a275264117e14a20f28757d8f6511acfd9ea5c9.camel@student.tugraz.at> <868sbq2yjh.fsf@gmail.com> In-Reply-To: <868sbq2yjh.fsf@gmail.com> From: Nathan Dehnel Date: Wed, 28 Oct 2020 17:28:38 -0500 Message-ID: Content-Type: multipart/alternative; boundary="000000000000fe031b05b2c2affe" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leo Prikler , 44272@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=maNfASAD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 1.09 X-TUID: lQYH7eC807O7 --000000000000fe031b05b2c2affe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable >As Leo said, it does not seem a bug on the Guix side. Well, what could be done on the Guix side? What do you suggest? Well, guix could pass different flags if EDITOR is set to "kate". Somehow I doubt kate would change their command line flags just because an extremely obscure distro-specific tool treats it the same as other text editors. But, whatever. The wrapper works well enough. Thanks. On Wed, Oct 28, 2020 at 9:52 AM zimoun wrote: > Dear Nathan, > > > Easy solution, set $EDITOR to "gedit" ;) > > Or Emacs. ;-) > > > > The reason why kate "doesn't work" when opening files as specified by > > `guix edit`, is that kate apparently can't handle the "$EDITOR +$N > > $FILE" syntax, where $N is the number of lines to skip. It instead > > opens two files, one of which will likely always be empty. This should > > probably be reported as bug to kate unless that works upstream and > > somehow guix messes up this feature. > > Instead =E2=80=99kate=E2=80=99 use =E2=80=99--line/-l=E2=80=99 and not = =E2=80=99+N=E2=80=99. You could wrap, something > along these lines: > > --8<---------------cut here---------------start------------->8--- > #!/bin/sh > > kate -l $(echo "$*" | tr "+" " ") > --8<---------------cut here---------------end--------------->8--- > > then: > > export EDITOR=3D/path/to/kate-wrapper.sh > guix edit emacs > > works (with =E2=80=99/path/to/kate-wrapper.sh=E2=80=99 executable). Well= , the wrapper > could be better, obviously. :-) > > As Leo said, it does not seem a bug on the Guix side. Well, what could > be done on the Guix side? What do you suggest? > > > All the best, > simon > --000000000000fe031b05b2c2affe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>As Leo said, it does not seem a bug o= n the Guix side.=C2=A0 Well, what could
be done on the Guix side?=C2=A0 What do you suggest?

Well, guix could pass different flags if EDITOR is set to "kate&quo= t;. Somehow I doubt kate would change their command line flags just because= an extremely obscure distro-specific tool treats it the same as other text= editors.

But, whatever. The wrapper works well en= ough. Thanks.

= On Wed, Oct 28, 2020 at 9:52 AM zimoun <zimon.toutoune@gmail.com> wrote:
Dear Nathan,

> Easy solution, set $EDITOR to "gedit" ;)

Or Emacs. ;-)


> The reason why kate "doesn't work" when opening files as= specified by
> `guix edit`, is that kate apparently can't handle the "$EDITO= R +$N
> $FILE" syntax, where $N is the number of lines to skip.=C2=A0 It = instead
> opens two files, one of which will likely always be empty.=C2=A0 This = should
> probably be reported as bug to kate unless that works upstream and
> somehow guix messes up this feature.

Instead =E2=80=99kate=E2=80=99 use =E2=80=99--line/-l=E2=80=99 and not =E2= =80=99+N=E2=80=99.=C2=A0 You could wrap, something
along these lines:

--8<---------------cut here---------------start------------->8---
#!/bin/sh

kate -l $(echo "$*" | tr "+" " ")
--8<---------------cut here---------------end--------------->8---

then:

=C2=A0 export EDITOR=3D/path/to/kate-wrapper.sh
=C2=A0 guix edit emacs

works (with =E2=80=99/path/to/kate-wrapper.sh=E2=80=99 executable).=C2=A0 W= ell, the wrapper
could be better, obviously. :-)

As Leo said, it does not seem a bug on the Guix side.=C2=A0 Well, what coul= d
be done on the Guix side?=C2=A0 What do you suggest?


All the best,
simon
--000000000000fe031b05b2c2affe--