From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kostadin Ninev Newsgroups: gmane.emacs.bugs Subject: bug#63578: 29.0.91; Org Cannot tangle with tramp using sudo Date: Fri, 19 May 2023 06:55:25 +0000 Message-ID: <1684478884235.2095630179.550284088@cdots.bg> References: <87v8goltku.fsf@localhost> 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="27086"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Vivaldi Mail/1.5.2979.22 Cc: Bastien , 63578@debbugs.gnu.org To: Ihor Radchenko , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 19 08:56:21 2023 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 1pzu2G-0006qb-Pf for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 May 2023 08:56:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzu23-000618-VE; Fri, 19 May 2023 02:56:07 -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 1pzu1y-0005xK-N7 for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 02:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pzu1y-0004KJ-A1 for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 02:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pzu1y-0001G1-5y for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 02:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kostadin Ninev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 May 2023 06:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63578 X-GNU-PR-Package: emacs Original-Received: via spool by 63578-submit@debbugs.gnu.org id=B63578.16844793534815 (code B ref 63578); Fri, 19 May 2023 06:56:02 +0000 Original-Received: (at 63578) by debbugs.gnu.org; 19 May 2023 06:55:53 +0000 Original-Received: from localhost ([127.0.0.1]:55256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzu1a-0001FH-LY for submit@debbugs.gnu.org; Fri, 19 May 2023 02:55:53 -0400 Original-Received: from mail.cdots.bg ([91.92.199.54]:34318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzu1V-0001EU-KA for 63578@debbugs.gnu.org; Fri, 19 May 2023 02:55:37 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cdots.bg (Postfix) with ESMTP id 7E430A0B83E3; Fri, 19 May 2023 09:55:27 +0300 (EEST) Original-Received: from mail.cdots.bg ([127.0.0.1]) by localhost (mail.cdots.bg [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id L1hrOnZPQodP; Fri, 19 May 2023 09:55:26 +0300 (EEST) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cdots.bg (Postfix) with ESMTP id 3E55EA0B83E4; Fri, 19 May 2023 09:55:26 +0300 (EEST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cdots.bg 3E55EA0B83E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cdots.bg; s=38EB8BB6-1E4E-11E5-AEB1-E0FC2BDD2164; t=1684479326; bh=D6owaW6zjp4v7uRAVPKS7f0v3Li4uVcLxyPtSn32Y8Y=; h=Message-Id:From:To:Date:MIME-Version; b=A/8wp1SUwkRQrxI89RNz1msFZiYwdRWhupY28MSaofm9uJmXC+rK0LvPxXtNw3Q1l JfAMa0Udf7gTbtYbPVlrt8hhoMXoh84ebe6aXWuzMxLQWudjWiFtI0Rn8GzX/VA9g/ RCg9faCg2Xs32OUADjPi9wVZmOIj95p70+h5n65o= X-Virus-Scanned: amavisd-new at mail.cdots.bg Original-Received: from mail.cdots.bg ([127.0.0.1]) by localhost (mail.cdots.bg [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6iqyM0VejwJz; Fri, 19 May 2023 09:55:26 +0300 (EEST) Original-Received: from noip.localdomain (unknown [85.196.152.25]) by mail.cdots.bg (Postfix) with ESMTPSA id 050BAA0B83E3; Fri, 19 May 2023 09:55:25 +0300 (EEST) In-Reply-To: <87v8goltku.fsf@localhost> X-Mailer: Vivaldi Mail 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:261979 Archived-At: >On Friday, May 19, 2023 9:32 AM (+03:00), Ihor Radchenko wrote: > It would help to do M-x toggle-debug-on-quit ... try to tangle ... C-g, > and share the backtrace. This the backtrace: Debugger entered--Lisp error: (quit "") signal(quit ("")) tramp-error(nil quit "") tramp-signal-hook- (quit ("")) signal(quit ("")) tramp-maybe-open-connection((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("server" 0 6 (tramp-default t)) nil "/etc/test.conf" nil)) tramp-send-command((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("server" 0 6 (tramp-default t)) nil "/etc/test.conf" nil) "test 0 2>/dev/null; echo tramp_exit_status $?") tramp-send-command-and-check((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("server" 0 6 (tramp-default t)) nil "/etc/test.conf" nil) "test 0") tramp-get-test-command((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("server" 0 6 (tramp-default t)) nil "/etc/test.conf" nil)) tramp-find-file-exists-command((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("server" 0 6 (tramp-default t)) nil "/etc/test.conf" nil)) tramp-get-file-exists-command((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("server" 0 6 (tramp-default t)) nil "/etc/test.conf" nil)) tramp-sh-handle-file-exists-p(#("/sudo:root@server:/etc/test.conf" 6 10 (tramp-default t) 11 17 (tramp-default t))) tramp-sh-file-name-handler(file-exists-p #("/sudo:root@server:/etc/test.conf" 6 10 (tramp-default t) 11 17 (tramp-default t))) apply(tramp-sh-file-name-handler file-exists-p #("/sudo:root@server:/etc/test.conf" 6 10 (tramp-default t) 11 17 (tramp-default t))) tramp-file-name-handler(file-exists-p #("/sudo:root@server:/etc/test.conf" 6 10 (tramp-default t) 11 17 (tramp-default t))) file-exists-p("/ssh:server|sudo::/etc/test.conf") #f(compiled-function (by-fn) #)(("/ssh:server|sudo::/etc/test.conf" ("conf" 5 "1.org" "file:/home/user/1.org::*test" "test:1" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "code") (:tangle . "/ssh:server|sudo::/etc/test.conf") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session . "none")) "test" nil))) org-babel-tangle(nil) funcall-interactively(org-babel-tangle nil) command-execute(org-babel-tangle) > Eli Zaretskii writes: > > >> Triyng to tangle this org block on emacs 29.0.91 with emacs -Q > >> > >> #+begin_src conf :tangle /ssh:user@server|sudo::/etc/test.conf > >> test > >> #+end_src > >> > >> It hangs with Opening connection nil for root@server using sudo.... If I > >> install emacs 28 everything works fine. > > ... > > Adding Org developers to CC, in case Org has something to do with > > this. > > It would help to do M-x toggle-debug-on-quit ... try to tangle ... C-g, > and share the backtrace. > > The suspicious, recently changed part of the tangle code is below. > I do not see anything fishy there, even when file is remote. > > (unless > (and (file-exists-p file-name) > (let ((tangle-buf (current-buffer))) > (with-temp-buffer > (insert-file-contents file-name) > (and > (equal (buffer-size) > (buffer-size tangle-buf)) > (= 0 > (let (case-fold-search) > (compare-buffer-substrings > nil nil nil > tangle-buf nil nil))))))) > ;; erase previous file > (when (file-exists-p file-name) > (delete-file file-name)) > (write-region nil nil file-name) > (mapc (lambda (mode) (set-file-modes file-name mode)) modes)) > -- Kostadin Ninev.