From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id OGStGp0lSWXfpgAAauVa8A:P1 (envelope-from ) for ; Mon, 06 Nov 2023 18:42:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OGStGp0lSWXfpgAAauVa8A (envelope-from ) for ; Mon, 06 Nov 2023 18:42:53 +0100 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 1B0395D429 for ; Mon, 6 Nov 2023 18:42:53 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=dO0CSmE4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699292573; a=rsa-sha256; cv=none; b=ujI6vg8EQ6T1nXK5wP+4jNwPPsCJWPzUgrLqc5alT+kSKWWu11J//Gj8dBHM9xk0SNqVLt NVZTuswZIxdOjxNClZ7R9cpRThd0b2s+gSz/2XiUT0EOqBeH7b05AE6u13uBmwjB/70jPs SY0f66EsctbBMh2PMuplWOtXcgBC3PkijuK4FTox2G0Jqzzut4ynpmAovyJxM9mfUXl6C2 tlQcshu7BR/rCxamHvmz9T+LRuYmmIDxLKcdBVG5zdWSEr8Cv62CTnB3PwvUu8FYSd93wP lYnHNMWnGtvVbpU2Fa6vLi0vnxI4wSQ+qGueR0gVnay4/dbCDaWYDSxGmR5+Cw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=dO0CSmE4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699292573; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=W2AQTpWSdhROV3TEPdRdIoBimEy/GcvEvoThcxYzOlc=; b=DW4HTgzRR6pfd386PDVwPD9x4KAXuceCFhnp8RqCWQN1ubDNaVD8RcpijmZJ9GBOMn8KMs 5keKQQ7FRmmUhzlR5y0Rwo83QcbLHS5j0KXWSGuIE5TEjnGanpd1vJyCnbU0hnxBIwwAAM DX9LSKsYA2MdyPKR6DVZDmIFKtkwG9lSi8w4/VULxy23ImGYkxwKVg7D9S74WzIJg4HGK6 prwOQOYVFieI31fxy/c7QCgWZWijQsyigZV28HfcgbSoUkak4j7ofCk3D/KEIMBvlFoFPr o/vbGFlfrDPJukSm94/rAGjTdKChaz5+T5f2WMV4kI5pEQOswL2vgQSaSweSuA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r03cX-00064P-Op; Mon, 06 Nov 2023 12:42:42 -0500 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 1r03cS-00063Z-KS for bug-guix@gnu.org; Mon, 06 Nov 2023 12:42:37 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r03cG-0006K8-RL for bug-guix@gnu.org; Mon, 06 Nov 2023 12:42:28 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r03cs-00067e-8A for bug-guix@gnu.org; Mon, 06 Nov 2023 12:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#44272: guix edit doesn't work when $EDITOR is set to VSCode Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 06 Nov 2023 17:43:02 +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: Leo Prikler Cc: ncdehnel@gmail.com, 44272@debbugs.gnu.org Received: via spool by 44272-submit@debbugs.gnu.org id=B44272.169929253123430 (code B ref 44272); Mon, 06 Nov 2023 17:43:02 +0000 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 1B0395D429 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -4.01 X-Spam-Score: -4.01 X-TUID: FRCM0jZl46S7 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