From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71200: TRAMP: Trying to do a project-find-file or (find-directory) using the podman method causes a (wrong-type-argument stringp nil) error Date: Mon, 27 May 2024 15:44:48 +0300 Message-ID: <224dc8af-735a-496f-a7cc-6f81001a9474@gutov.dev> References: <_cjSz3e_d7dB-G6yi32s-DPrp4mzoDHxqSRzmME4I-ihzlXVEzxQ7vsUrIh5dEk0Ofp56PgvenniYybY9hX4zOgzD-Cuky_G05tWXjOG4YA=@pm.me> <-AiVyio30HLuInFNcNm3OTLCRNrFpNlkGopLCsL3HBp82dT1Tv1vgf6tbSuSIMvf6L74waKmKB_wcz9S2l0xVjudOu2o36bqEBFTEvvG4fQ=@pm.me> <8373e5c4-03d4-48fe-9e4d-b0c2d36590cc@gutov.dev> <5iagnGUjF-cYYddc4_1kHHViSr60gM5Lt2t0bTESI41QSUxZ3GPGbAhCpmjTawoMcMaB07DPi5_jHc4-m4ow4AKhS3z5evCwxq75_-emwQw=@pm.me> <892be2b8-f3c6-4958-8d49-7db73f6d0b85@gutov.dev> <1Lz1FIPZ1KHsruvlYqA1e5561TOSEoJ1M1r-72pI7BuICHbq72ohFmG9Kz1ltdW-AQeedGM_3PV9ef7r9CQ3iyQzkztUeaux0PhdZdFNmcw=@pm.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10222"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: "71200@debbugs.gnu.org" <71200@debbugs.gnu.org>, "michael.albinus@gmx.de" To: alexis purslane Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 27 14:46:15 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sBZjz-0002NE-0d for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 May 2024 14:46:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBZjg-0002pa-FR; Mon, 27 May 2024 08:45:56 -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 1sBZjd-0002nR-TH for bug-gnu-emacs@gnu.org; Mon, 27 May 2024 08:45:54 -0400 Original-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 1sBZjd-00078D-Bj for bug-gnu-emacs@gnu.org; Mon, 27 May 2024 08:45:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sBZjl-0005jE-Ok for bug-gnu-emacs@gnu.org; Mon, 27 May 2024 08:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 May 2024 12:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71200 X-GNU-PR-Package: emacs Original-Received: via spool by 71200-submit@debbugs.gnu.org id=B71200.171681391021946 (code B ref 71200); Mon, 27 May 2024 12:46:01 +0000 Original-Received: (at 71200) by debbugs.gnu.org; 27 May 2024 12:45:10 +0000 Original-Received: from localhost ([127.0.0.1]:43320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBZiw-0005ht-0Z for submit@debbugs.gnu.org; Mon, 27 May 2024 08:45:10 -0400 Original-Received: from fhigh8-smtp.messagingengine.com ([103.168.172.159]:54317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBZit-0005gw-LB for 71200@debbugs.gnu.org; Mon, 27 May 2024 08:45:09 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 7B78111400FD; Mon, 27 May 2024 08:44:52 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 27 May 2024 08:44:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1716813892; x=1716900292; bh=Lh9iRwqUPpHBSTS0r8NxZ6NOf/u62yNZsD2G3uv1FvI=; b= UE1S11BH7pIPBg6O2mTKQbJLzn44d+u+iaXBtsPHrZdXD9+AtzbwvUBEH0VrFWkd hv2sM4aEsUuxUnrm8oC/sLY/tUoZmRYD1NkEOKaOD6IeLT33F6bNVqsuKBr3ap3J Ikc/TIFg6Xyipabxqr8vtLNGttOAK2vsDUype26Fk/RdWpFzEsfZMtq4nb5ydQI8 trLbeikByUeKKI+rsV1mDfQxKSujcSH0jahpiXtwN01/5ZqMJgPMSI0wpcTeljem hBX0EdNshd8EDhaQkNuiCsA6cXtds+lm8MWljJvRPeEa3Thqj98lxfZEBvPUN7Sd EVaK6TKhxyG/rPVhmZyxaA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1716813892; x= 1716900292; bh=Lh9iRwqUPpHBSTS0r8NxZ6NOf/u62yNZsD2G3uv1FvI=; b=C WLyWqgjSV8Tx8UVPA/5FEquD6GKAqEelsmrf2s4DNg2mMW5C1GAB4Xy1Dxpmn4Mc MRzGw24lXcf2CeJijsO33EjKdz6eCxSZpZXZ5mM6M1O3TyTqVwMsbAylBc8XWbFO tc41HgL5/0Cfy8mCOeQKi8zgxQoIYg0dSs96wJMRiAzuUSQGYwbrYbDEro0ArcsH cnwpuNNgk8zjExSJG3nG5/kftGdlAjGik8kNfTA53dPqUotae6IlDAKCLAacGqi4 dbTG4JpgPs0r8rMuq69EQ6FH+3zzv3MvcdOvbQN93BPB7r/9IjSJHQpaci3Jzqhv 2OpEJSEKQ6gkWzyUuXrYA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejgedgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 May 2024 08:44:51 -0400 (EDT) Content-Language: en-US In-Reply-To: <1Lz1FIPZ1KHsruvlYqA1e5561TOSEoJ1M1r-72pI7BuICHbq72ohFmG9Kz1ltdW-AQeedGM_3PV9ef7r9CQ3iyQzkztUeaux0PhdZdFNmcw=@pm.me> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286032 Archived-At: On 27/05/2024 05:06, alexis purslane wrote: > Another piece of code that may be helpful: > > ``` > (advice-add 'project-remember-project > ;; If we're about to save a project > :before (lambda (pr &optional something) > ;; If we're using git, and git detects it as "dubious" (git ls-files = 128), > (when (and (eq 'Git (cadr pr)) > (let ((default-directory (caddr pr))) > (= (shell-command "git ls-files") 128))) > ;; Prompt the user if they want to automatically treat it as safe! > (when (y-or-n-p "Dubious ownership of repository detected. Treat as safe? ") > (shell-command > (concat "git config --global --add safe.directory " > (eshell-escape-arg (directory-file-name (file-local-name (caddr pr)))))))))) > ``` > > It basically emulates VSCode's reaction to untrusted repositories. Sounds useful. But if you wanted Emacs to include such functionality automatically, I'm not quite sure what would be the best place for it. OT1H if VS Code has this, it's probably not the worst idea, but OT2H it seems quite specific to use with containers (because in other cases you either wouldn't have this problem, or would solve it differently). BTW project 0.11.0 is out, if you wanted to try it.