From unknown Thu Jul 31 07:48:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#44272 <44272@debbugs.gnu.org> To: bug#44272 <44272@debbugs.gnu.org> Subject: Status: guix edit doesn't work when $EDITOR is set to "kate" Reply-To: bug#44272 <44272@debbugs.gnu.org> Date: Thu, 31 Jul 2025 14:48:23 +0000 retitle 44272 guix edit doesn't work when $EDITOR is set to "kate" reassign 44272 guix submitter 44272 Nathan Dehnel severity 44272 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 02:13:42 2020 Received: (at submit) by debbugs.gnu.org; 28 Oct 2020 06:13:42 +0000 Received: from localhost ([127.0.0.1]:46835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXeiL-0006cg-Ui for submit@debbugs.gnu.org; Wed, 28 Oct 2020 02:13:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:44150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXeiK-0006cZ-DR for submit@debbugs.gnu.org; Wed, 28 Oct 2020 02:13:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXeiK-0000NE-8W for bug-guix@gnu.org; Wed, 28 Oct 2020 02:13:40 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:34035) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXeiF-0006hz-Hi for bug-guix@gnu.org; Wed, 28 Oct 2020 02:13:39 -0400 Received: by mail-wm1-x330.google.com with SMTP id k21so2529251wmi.1 for ; Tue, 27 Oct 2020 23:13:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=3k6o8tuZQRCU4AqEXT0lfWt8Lg1x2aGRniFCXbVrCmc=; b=FRZEzsjLUq0TM49XkpgYTOSwInJ7mbKGQSv0zcYiqcTqsyuoMPKFHugR+Gng1yOMXT bFjlzIfhkEAyafNiDeK755TLhbXd6cQvszPGS1qYc64iQBBYY2MDnKioZrVy+Vws2McD 3aCBMo0DJY+emW/nTQ9GsCvR1E0GAsG70jsllgf9OUsHXEY5/0A1b4YEtgUXhew8huli PXHGK3ZsWePcE6eoBxMenzV0dJP+L/b8qDuaeUGLI0MfRK3bPr0m9sNXRz/H0BEYU58d 2FqvgG4aepfmlssfq68dJnmz7qSE2hCQbNRfKDfqbYdmaoad0ueAcvsXDxRs2ueUHsxv +Juw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=3k6o8tuZQRCU4AqEXT0lfWt8Lg1x2aGRniFCXbVrCmc=; b=mpav2FK2pkeQvHy1m4+Eh7VOu4zd1ogbrQsQ9JZbkSX7EQOHM8xg0u+F+DV1jyflzx noY1LurPY2zviUum6+g3vrA55J1pA9zEqFU0vvDPSDKugrIdsmnQkWXdIPPywRnpfTD9 /VhRsSU0hNoGJms8znkgmL0fRBx7ep34JVz2iUwHIQ4Qb+iYPzYgyp5gffgIRVGMqSl3 PQrA6iezPfcv0CIhVqBdkZOTH02Cz6ITs/rI1uXSfoR4LEqleSxOCWEqoHG3VDDQvMgr VXoHI/R8rGOZSAByVXD5+q+CYtgwv0Z0sHWzT9//ScbNlw9ILCYl2jGzgd8tSVTxKGmM TEDA== X-Gm-Message-State: AOAM532Pp4v5/tWpD9W8DXkGfLBGFCw01BAASpH+3J0v03sxNRFCXbla j5GoN3Dl8kfc7MG+EOyLnqWmu3/9GXXWZBETv/NnXJ/rGxY= X-Google-Smtp-Source: ABdhPJxGwlcrm35y+O7FL2YvflGAbsZH0gEes7M+qqSnC1fPPvXzk7QOuTxb2XtvFkSvXNiu3pf7C9sMu5n/WVCwIIM= X-Received: by 2002:a7b:cc92:: with SMTP id p18mr6385044wma.116.1603865613165; Tue, 27 Oct 2020 23:13:33 -0700 (PDT) MIME-Version: 1.0 From: Nathan Dehnel Date: Wed, 28 Oct 2020 01:13:22 -0500 Message-ID: Subject: guix edit doesn't work when $EDITOR is set to "kate" To: Tobias Geerinckx-Rice via Bug reports for GNU Guix Content-Type: multipart/alternative; boundary="00000000000023e88d05b2b510dc" Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=ncdehnel@gmail.com; helo=mail-wm1-x330.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --00000000000023e88d05b2b510dc Content-Type: text/plain; charset="UTF-8" kate opens an empty file. --00000000000023e88d05b2b510dc Content-Type: text/html; charset="UTF-8"
kate opens an empty file.
--00000000000023e88d05b2b510dc-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 09:05:39 2020 Received: (at 44272) by debbugs.gnu.org; 28 Oct 2020 13:05:39 +0000 Received: from localhost ([127.0.0.1]:47663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXl91-0004rM-1w for submit@debbugs.gnu.org; Wed, 28 Oct 2020 09:05:39 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:13551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXl8u-0004r9-HK for 44272@debbugs.gnu.org; Wed, 28 Oct 2020 09:05:37 -0400 Received: from nijino.local (217-149-162-161.nat.highway.telekom.at [217.149.162.161]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4CLphm1ygfz1LX55; Wed, 28 Oct 2020 14:05:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4CLphm1ygfz1LX55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1603890328; bh=n3b+ue+dcpWeWcbF5zLB06wxq+MbMGY1yafOEK/7E0M=; h=Subject:From:To:Cc:Date:In-Reply-To:From; b=aPM7yPxR+MFCNAQT4O6M6xmAvyCALNixGBTTqhpUKhjTG5vnkMpFqcGgf1VBThikY 7WjXDRTyp6kV9X3GHo4ti2rM8D9/Dawbrvc7szaGypHWau2AlOSM0YsAu8ee+nRjKz XYQlX0CpyB1XqDzC1wAALCRXGy1JioXmIPhWHRqw= Message-ID: <1a275264117e14a20f28757d8f6511acfd9ea5c9.camel@student.tugraz.at> Subject: bug#44272: guix edit doesn't work when $EDITOR is set to "kate" From: Leo Prikler To: ncdehnel@gmail.com Date: Wed, 28 Oct 2020 14:05:27 +0100 In-Reply-To: CAEEhgEtmna9w9q4rKGNnVCb=qP5m-A2gBnHrWh5Lz4eiuP3PZQ@mail.gmail.com Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44272 Cc: 44272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Easy solution, set $EDITOR to "gedit" ;) 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 10:52:28 2020 Received: (at 44272) by debbugs.gnu.org; 28 Oct 2020 14:52:28 +0000 Received: from localhost ([127.0.0.1]:50054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXmoO-0001iv-Bf for submit@debbugs.gnu.org; Wed, 28 Oct 2020 10:52:28 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:37869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXmoN-0001ii-0d for 44272@debbugs.gnu.org; Wed, 28 Oct 2020 10:52:27 -0400 Received: by mail-wr1-f47.google.com with SMTP id w1so6024170wrm.4 for <44272@debbugs.gnu.org>; Wed, 28 Oct 2020 07:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=BAIUAW/Jq+VJ4fN+6hc7LBWsyVZ58GMxOXdENFgAr9Y=; b=urY3rx+0+crIlcY98ZLYBSEyy979D5uSl/wq1HcYBqga/pEMa+ro19mhIYCF2czX99 VfakE5nm0FwDChuu2a6yr5whzNqFzfXM7mJVesUs/upl+rjH/DYWu2ZYYnKEBEzGIGID LFcfHCY129eifMGocm7fDcmyM0qDPIjVL2d9VI6E2eMylaXQlEAJ8BCXuzY9IcoPgl8w 3lqCXeHLM58AoAozT1nYVqNTZJzlxnOiBdXIY4n7ClO1IAgPZoyjqNy32yAizR0NC/XS ceYimR1DmVzxq30sSbA4fAv/NTmaSnNInavKHxrvCSn7EhJfCOpIDitCGpesunNzezv6 t7KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=BAIUAW/Jq+VJ4fN+6hc7LBWsyVZ58GMxOXdENFgAr9Y=; b=omFfJA5JPbIsHhKTZs6Nc8vFnP8J2ZkcBF+rSfHcydZDR14LPfBDcDgZEOvGX9cF9X k1+nOXp3DHw/CsrDJfH2ZYoTfwYNAxQzMfksf/YwcrtSBByCUuoZZB7b6r1v3KTAKAGR Q9v0cCiP+kO3i+ir0/Lhtg40/1wvrrdyUYq3GzXpatG4L9FmcJwzASbeMjgO8v0F8euS 7vc62IhKTVWxKutuFdzywXVUZIltiPgozxdstyIJZwsbErJH1ZJtp1Gi0W9taZZ9rT71 4bM4B1bIKANX+NR6GrGduC3V3Lpjciw0uh2PXfczTO/9t2cIEGiLd6yWM0WvitSWfJo+ E93g== X-Gm-Message-State: AOAM5332dGYfwpra4By6grX8IJbAGcQ2FbQk+cHph7b0HTfPrkiqyDjC Qy9PnRfwwPw8kQ2QHTuG2DDtHrLPfI0= X-Google-Smtp-Source: ABdhPJzOnEpDf+pa5oATIbufHzmU1du8WApXUCoAd2cu/jKFKyMDoiPlPGZii2SKz+417Z4ipMI35w== X-Received: by 2002:a5d:6944:: with SMTP id r4mr9435167wrw.151.1603896740583; Wed, 28 Oct 2020 07:52:20 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id b7sm7469362wrp.16.2020.10.28.07.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 07:52:19 -0700 (PDT) From: zimoun To: Leo Prikler , ncdehnel@gmail.com Subject: Re: bug#44272: guix edit doesn't work when $EDITOR is set to "kate" In-Reply-To: <1a275264117e14a20f28757d8f6511acfd9ea5c9.camel@student.tugraz.at> References: <1a275264117e14a20f28757d8f6511acfd9ea5c9.camel@student.tugraz.at> Date: Wed, 28 Oct 2020 15:52:18 +0100 Message-ID: <868sbq2yjh.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44272 Cc: 44272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 18:28:57 2020 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: Subject: Re: bug#44272: guix edit doesn't work when $EDITOR is set to "kate" To: zimoun Content-Type: multipart/alternative; boundary="000000000000fe031b05b2c2affe" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44272 Cc: Leo Prikler , 44272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 18:55:45 2020 Received: (at 44272-done) by debbugs.gnu.org; 28 Oct 2020 22:55:46 +0000 Received: from localhost ([127.0.0.1]:51090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXuM5-0003lu-LL for submit@debbugs.gnu.org; Wed, 28 Oct 2020 18:55:45 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:55090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXuM4-0003lf-BW for 44272-done@debbugs.gnu.org; Wed, 28 Oct 2020 18:55:44 -0400 Received: by mail-wm1-f42.google.com with SMTP id w23so754449wmi.4 for <44272-done@debbugs.gnu.org>; Wed, 28 Oct 2020 15:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=aYh8kOKAn+MKpUUuPMkhoe7pMmMEcNEAQceH8oOqTpQ=; b=N5SLwhZMl9KtioPi2jhSi8h/Q8VS8JUnhrXSrsFeOml8yH6QWWQBOQFrXtB/OUW+gg xtki8iaZ3BG7FCUDaudOZQRBrR37HUOkW6Z9W4YLU0GNrirChaJc/TgLBls2DicB6LO1 DDFYgngLaAhT7C+GE3G+2v5hjMAtkzJUYboB8koiZXk0/GYzq7UO7Rq6hRa0EEcZOVsR q8wVxqm0gC0fDwLEEd+l2A7seYoCdRE39XWzD97pOJnQKubQ0YRXNV/YHvxrpOSsj2RN wMhgjOzIB0HcS6dIkthKaN5HZlBME2kw4akcofMbPpEjndQHR+Th8K8PWpnqFZdToLiZ kz9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=aYh8kOKAn+MKpUUuPMkhoe7pMmMEcNEAQceH8oOqTpQ=; b=hvl9/stECwfzNLaf4eBfRMGwmmJj6wtDl/jOFBMr43T00GO6/M4yynfxb+uW5ASYUv qiyS3yVvfvOUOdaaqJQqcXNMSwUVK3K6em7IptKbyudFQPginKsrQ+8HESBnyXzJeKPf Yfn8le39NOXDskrNydgW4KnTXHMrw7aCRHbgn3hArHj0vCoNe+BNIOSvlDFexomM5TSU 2G5Sjfwx5QR2zIUPuL0TruMM9+2xM8SCFdNKRnpDM36ZXvOtQwGuAjgzEkbGJTKTEANq aKXwrhmoow9UHhzevAerd+OhAr9ptSUG8v/b4PEDSzdTl3EFhDcBIWC3/92BCOwSb0bA YGYQ== X-Gm-Message-State: AOAM533ukdGY2GNh39iU99jli6ltQNnqT8fa3jL4dOtp/j7B176dlCL1 jD9PwPOHi+BhuSTKmcl9FtSkvyJarF0= X-Google-Smtp-Source: ABdhPJyVjbwrLt1s/Z1idD/BZf/tZYsz960WrZo/9fjXbOzJB4UWeVn7x8CZiM9TToj/zZVs3VZuiQ== X-Received: by 2002:a1c:7409:: with SMTP id p9mr1033683wmc.167.1603925738135; Wed, 28 Oct 2020 15:55:38 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id b190sm1228628wmd.35.2020.10.28.15.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 15:55:37 -0700 (PDT) From: zimoun To: Nathan Dehnel Subject: Re: bug#44272: guix edit doesn't work when $EDITOR is set to "kate" In-Reply-To: References: <1a275264117e14a20f28757d8f6511acfd9ea5c9.camel@student.tugraz.at> <868sbq2yjh.fsf@gmail.com> Date: Wed, 28 Oct 2020 23:55:31 +0100 Message-ID: <86361yyn8c.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44272-done Cc: Leo Prikler , 44272-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dear, On Wed, 28 Oct 2020 at 17:28, Nathan Dehnel wrote: >>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. =C2=AB Special cases aren't special enough to break the rules. =C2=BB Especially when all the other text editors use the same convention. Well, thank you for the report. If many =E2=80=9Ckate=E2=80=9D users reque= st, then maybe =C2=AB Although practicality beats purity. =C2=BB =E2=80=93 from The Zen of Python, by Tim Peters =E2=80=93 :-) > But, whatever. The wrapper works well enough. Thanks. So closing! Thanks, simon From unknown Thu Jul 31 07:48:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 26 Nov 2020 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 02 05:23:49 2023 Received: (at control) by debbugs.gnu.org; 2 Nov 2023 09:23:49 +0000 Received: from localhost ([127.0.0.1]:53880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyTvY-0005TS-W1 for submit@debbugs.gnu.org; Thu, 02 Nov 2023 05:23:49 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:38361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyTvU-0005T9-Rk for control@debbugs.gnu.org; Thu, 02 Nov 2023 05:23:47 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50799fe3422so121125e87.1 for ; Thu, 02 Nov 2023 02:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698916984; x=1699521784; darn=debbugs.gnu.org; h=subject:from:to:message-id:date:from:to:cc:subject:date:message-id :reply-to; bh=kY/pOQXbMI37MOdlWbsBRqw4PcoZfMlinIp1ZcCMe/c=; b=hs9ELUCZnLFp0vHL3vyUKbmzTjd9kxRPQ0w6OwOANpj4eUb3MFsmwfBzdCuII2/OFD QHrQ/D0Qf+oBjsQobVhRzypNp+HjziDzCYOODGDnHkOKk1/AMj9m2Lm/2w8fRPoopRrx fXtT2dRfjuVZ8eSrcugbdjJuqCCuBdoubQcFXrILzFHXiIGAGQrP6rPJHOXy/ISqiEP6 zVtHBTuGhW++R7ndsgj9W2jeNXu+GXrYJqbwwM8Z/9mjjxJQODop7muf8/qNxCUoKvEm yX+gBuGYa0HajoW5RG64D8bLxNJTtkw0AEe6fDZEXtq7rIKK/2TmvVOsImEfh+HlP6d1 uUfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698916984; x=1699521784; h=subject:from:to:message-id:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kY/pOQXbMI37MOdlWbsBRqw4PcoZfMlinIp1ZcCMe/c=; b=t+3DLADIV2C93rMl2H7uNSbzF8kHO0bHZSxFmd5Vvos6QBfkArx+kO7/fnZltDcLB5 swcxPa/wvkBHIlssT3wboclTanuyB/hkrrxQCd4Zy3Qw64Y0bRqqkutkARLlT7TEcVJw 7M5EhE89GIzkVlB+ZUA56mSKmmrF6JTcoGBeGU3MC5SoQkZTzk848frES6PH0tGYsc12 DyCn6jP/+i9Zj8tZikpVc6mywcHGzfzmuS3EA/WzJWccZ8kMhRKLqZBMCkwbwnx4zM/a 9v3lKBkFK3KJjZk6jEmlzFyE9elc9VjhDubZWEQL4nSDQT02fyTfx5YveG5o6WZypJ84 6ilA== X-Gm-Message-State: AOJu0Ywf+Wfs1bSXe1p0dZ7J7Sr1c00qJLrgDKHDuUvGBYUnisLXb4Xy n/iUy+qPTPQBFTYzMBbCZoiUA3f9HnM= X-Google-Smtp-Source: AGHT+IHzD/axlfwNETM69bQyAuZvo1OqyVRjYWeLvt8BbyonYv7QPZtew4g5hcm47PrHj1a2rEOXpQ== X-Received: by 2002:a05:6512:3196:b0:502:af44:21c2 with SMTP id i22-20020a056512319600b00502af4421c2mr13358897lfe.5.1698916983663; Thu, 02 Nov 2023 02:23:03 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id o9-20020adfeac9000000b0032f7cc56509sm1866223wrn.98.2023.11.02.02.23.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 02:23:03 -0700 (PDT) Date: Thu, 02 Nov 2023 10:23:00 +0100 Message-Id: <868r7gpkzv.fsf@gmail.com> To: control@debbugs.gnu.org From: Simon Tournier Subject: control message for bug #44272 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) unarchive 44272 quit From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 02 05:33:15 2023 Received: (at 44272) by debbugs.gnu.org; 2 Nov 2023 09:33:15 +0000 Received: from localhost ([127.0.0.1]:53919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyU4h-0008JY-1r for submit@debbugs.gnu.org; Thu, 02 Nov 2023 05:33:15 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:39950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyU4e-0008JI-6x for 44272@debbugs.gnu.org; Thu, 02 Nov 2023 05:33:12 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-408434ce195so1183335e9.0 for <44272@debbugs.gnu.org>; Thu, 02 Nov 2023 02:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698917551; x=1699522351; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=bWkRcmgTz6spXfzo0iP/zDygzpm4URAO1cN44/R37uQ=; b=k9oG3bNvNSE4L4qswW5C13Nl23grrl+AQGLXpOPX0uxKPFJx1k3te6TPV6+poZsdhx uCdniyWRWhQelEn6LxaU7NWugZlfl+CobtNnncCt/lzZkPWs5JhYy1NbzEEPGJDQ1FDP ncdwg8D1J8AV5pa2p8KNBye2TQbG0jVEbMrIJrFeZFKGa/zLBfFDdUal+6Tir/BzyAZT hCxiuNw2VaIoTPHc93SU7L1FMWnBkkLLJs8cdnuh8OQzZCroUNoodvrPc+lwjK5qf9qQ 5Jrjwu5VbXmsuCpm+vXq25v1t4jrApBdNGsTfbVZuN50mgqEycPjk7/cwKUHZ8TGvIPB iPUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698917551; x=1699522351; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=bWkRcmgTz6spXfzo0iP/zDygzpm4URAO1cN44/R37uQ=; b=eFMJLUHaWiqL8xuphLzM8zlcPE7tcuVc2Z6DoiCAzSsOv4J6hEBViuTw/viOlpejWk P1b19RyiTNTnp0crVjHcnw43h3wQrLF2GcukwPjiusM4sA2o8ZldddSmjHcQiqhkQMyI gjf7c5XmF/M9g2Sx1sXzMAbL8KOdgvprZOQstqwDZPSYfceSfE4M7Aq3M2ECaFavcLMs BTnrdmAIpFW0xyj1sw4uHdROkFpkikCVpXnEE6YqdnRn4ArvlT5lO9afMV9DCr+8Pyq8 IdZBL81LVh01+ImS44sDW5lwdG3vyYhIfwWyor8jzWht2tx13Z+GN2gG1jJqkWfXfMXI 2DLg== X-Gm-Message-State: AOJu0YzC12k7o+ck3ptR6z82ebLBOhsudSWtZNaDDm9fmuLTNsngFCV7 rc11Ky521xSjvH+f0lVBELnF/oRe1e0= X-Google-Smtp-Source: AGHT+IGFj1Wd32+kv/keZkOx2e4mei5rHOpN1DwORmLGEaDeV+jVgHCAOlBn2IdcMCmh6kBM4dIDJw== X-Received: by 2002:a05:600c:5128:b0:401:c07f:72bd with SMTP id o40-20020a05600c512800b00401c07f72bdmr14642284wms.4.1698917551347; Thu, 02 Nov 2023 02:32:31 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id ha7-20020a05600c860700b003fc16ee2864sm2135527wmb.48.2023.11.02.02.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 02:32:30 -0700 (PDT) From: Simon Tournier To: Leo Prikler Subject: Re: bug#44272: guix edit doesn't work when $EDITOR is set to VSCode References: <1a275264117e14a20f28757d8f6511acfd9ea5c9.camel@student.tugraz.at> <868sbq2yjh.fsf@gmail.com> Date: Thu, 02 Nov 2023 10:32:27 +0100 In-Reply-To: <868sbq2yjh.fsf@gmail.com> (zimoun's message of "Wed, 28 Oct 2020 15:52:18 +0100") Message-ID: <865y2kpkk4.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44272 Cc: ncdehnel@gmail.com, 44272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, PS: I write it here for later discovery. The bug remains closed. :-) I will open another thread for discussing it. On Wed, 28 Oct 2020 at 15:52, zimoun wrote: > 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: > > #!/bin/sh > > kate -l $(echo "$*" | tr "+" " ") > > then: > > export EDITOR=3D/path/to/kate-wrapper.sh > guix edit emacs VSCode does not respect the usual convention, too! For instance, $ code +9 path/to/file open files named =E2=80=9C+9=E2=80=9D and =E2=80=9Cpath/to/file=E2=80=9D. = Instead, VSCode expects: $ code --goto path/to/file:9 Therefore, it makes annoying to use VSCode with =E2=80=9Cguix edit=E2=80=9D= . Here a tiny wrapper to still be able to compose the both. Well, $ EDITOR=3Dvscode-wrapper guix edit hello opens at the correct location. Cheers, simon --8<---------------cut here---------------start------------->8--- #!/usr/bin/env -S guix repl -q -- ;; -*- mode: scheme -*- !# ;;; Copyright =C2=A9 2023 Simon Tournier ;;; ;;; VSCode does not respect the convention: ;;; ;;; $EDITOR +line file ;;; ;;; and instead relies on: ;;; ;;; code --goto file:line ;;; ;;; ;;; This wrapper is a workaround. It is Scheme but it could be whatever el= se ;;; as Bash, Python, etc. It uses "guix repl" although no Guix library is ;;; required. Because we assume the invokation, ;;; ;;; EDITOR=3Dvscode-wrapper guix edit foo bar ;;; ;;; relying on "guix repl" allows to easily get Guile. ;;; (use-modules (ice-9 match) ((ice-9 string-fun) #:select (string-replace-substring))) (define %vscode--goto "code --goto ") (define +line-files (match (command-line) ((wrapper rest ...) (if (eqv? 0 (modulo (length rest) 2)) rest (begin (write "Error with 'guix edit'") (exit 1)))))) (define files (let loop ((files:lines '()) (lst +line-files)) (if (null? lst) (reverse files:lines) (match lst ((n file rest ...) (loop (cons (string-append file ":" (string-replace-substring n "+" "")) files:lines) rest)))))) (catch 'system-error (lambda () (for-each (lambda (file) (system (string-append %vscode--goto file))) files)) (lambda _ (write "failed to launch!"))) --8<---------------cut here---------------end--------------->8--- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 06 12:42:11 2023 Received: (at 44272) by debbugs.gnu.org; 6 Nov 2023 17:42:11 +0000 Received: from localhost ([127.0.0.1]:40667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r03c3-00065q-Gb for submit@debbugs.gnu.org; Mon, 06 Nov 2023 12:42:11 -0500 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:40251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r03c1-00065V-D5 for 44272@debbugs.gnu.org; Mon, 06 Nov 2023 12:42:10 -0500 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-507cb194e30so1619480e87.1 for <44272@debbugs.gnu.org>; Mon, 06 Nov 2023 09:41:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699292486; x=1699897286; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=W2AQTpWSdhROV3TEPdRdIoBimEy/GcvEvoThcxYzOlc=; b=dO0CSmE4A0Zv/GDJcMiOjpZf4Gywwo31e885PU8CGxv3iUQLDCAt55Y4KQUSAnjxNS IBpJyhCpK7/DDeYCBjd23nxVKcCvrxc0R939vBkiUAZzGVwfR9jf3ukI5vRTOvtqF+Uv UVkmDWp0CkX5T1B57nVcFQGJyjlwKI2+lxmRFT8iE2RiNfvOctDkK9GtPsgXW0LUQdsB GMZKDYXI+wR/h0MDIwhUiI3vRP8+tVPNdwq/EYunR2ejBl6tMc9vutBCxIJInC+KB72z eccTOk7iI8Ze2j3fLB1+ylf+1/uTv1y58Vm/DBfDeLXfI4rMMzCfWPcQhJGwsz0jD6iW IetQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699292486; x=1699897286; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=W2AQTpWSdhROV3TEPdRdIoBimEy/GcvEvoThcxYzOlc=; b=Li5utea0b9Zt3l3T+4qcxFROBiZmbdBTRkWY+vTAVSnEFuB4ikdCGZKKppG3w593k5 aQPCNFv8M5FLSyL35b7F7m6ZmoAW/qaq0M0edPCZ8XtgBCwjMDzDWHwleHjit7kqlU7k gBXLp5jVSFxtnInAxKnYVg4IP6W0MjfveyQzJlFJ6lnGn3z1ucRrErLzSPPlGsYHRpOx ZQjsusEXyWiZI+m4MkOpPli7HWQQSIeFjZJtXEnSotdKfqXQZWiCHTzgtQG9jS42Ipmd uWyw6BwXep+QJ51IQn0s+QyvT3v0pvJMEF0f82hbyY3VQIYLRMuqnBdXlEMhXVQ3p1LC T6Zg== X-Gm-Message-State: AOJu0YzAyDg707YMkU337aiUh6Ac3jAK0MsvCcOh7yHUPFSKQqq900+Q AjxKnb6ACGpLSoXpXJ7bx/9pyNsCzcY= X-Google-Smtp-Source: AGHT+IGS9ZBadYzRy54oBpi3UjHLSQBxFNAyebt7HlMtsHLOY0yGjZJumfYdYe4eyg3+67WU+UkqQw== X-Received: by 2002:a05:6512:3ba4:b0:506:73f8:b75b with SMTP id g36-20020a0565123ba400b0050673f8b75bmr22691279lfv.5.1699292485446; Mon, 06 Nov 2023 09:41:25 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id t10-20020a05600c198a00b004064ac107cfsm12894680wmq.39.2023.11.06.09.41.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 09:41:24 -0800 (PST) From: Simon Tournier To: Leo Prikler Subject: Re: bug#44272: guix edit doesn't work when $EDITOR is set to VSCode In-Reply-To: <865y2kpkk4.fsf_-_@gmail.com> References: <1a275264117e14a20f28757d8f6511acfd9ea5c9.camel@student.tugraz.at> <868sbq2yjh.fsf@gmail.com> <865y2kpkk4.fsf_-_@gmail.com> Date: Mon, 06 Nov 2023 18:41:20 +0100 Message-ID: <87a5rqg4ov.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44272 Cc: ncdehnel@gmail.com, 44272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Thu, 02 Nov 2023 at 10:32, Simon Tournier wrote: > (define %vscode--goto "code --goto ") In case, here an improvement when using Remote-SSH. --8<---------------cut here---------------start------------->8--- (define %vscode--goto (let* ((vscode-server (string-append (getenv "HOME") "/.vscode-server")) (code (if (file-exists? vscode-server) ;; Maybe Remote-SSH (let* ((vscode-server/bin (string-append vscode-server "/bin")) (hash ;Guess the correct identifier (car (scandir vscode-server/bin (lambda (file) (not (member file (list "." "..")))) (lambda (x y) (> (stat:mtime (lstat (string-append vscode-server/bin "/" x))) (stat:mtime (lstat (string-append vscode-server/bin "/" y)))))))) (vscode (string-append vscode-server/bin "/" hash "/bin/remote-cli/code")) (run/user/uid (string-append "/run/user/" (number->string (getuid)))) (socket ;Guess the correct socket (car (scandir run/user/uid (lambda (file) (string-prefix? "vscode-ipc" file)) (lambda (x y) (> (stat:mtime (lstat (string-append run/user/uid "/" x))) (stat:mtime (lstat (string-append run/user/uid "/" y))))))))) (string-append "VSCODE_IPC_HOOK_CLI=" socket " " vscode)) ;; No Remote-SSH, try to find the local one in PATH (search-path (string-split (getenv "PATH") #\:) "code")))) (string-append code " --goto "))) --8<---------------cut here---------------end--------------->8--- Cheers, simon From unknown Thu Jul 31 07:48:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 05 Dec 2023 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator