GNU bug report logs - #63578
29.0.91; Org Cannot tangle with tramp using sudo

Previous Next

Package: emacs;

Reported by: "k.ninev <at> cdots.bg" <k.ninev <at> cdots.bg>

Date: Fri, 19 May 2023 04:00:03 UTC

Severity: normal

Found in version 29.0.91

Fixed in version 29.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kostadin Ninev <k.ninev <at> cdots.bg>
To: Ihor Radchenko <yantar92 <at> posteo.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: Bastien <bzg <at> gnu.org>, 63578 <at> debbugs.gnu.org
Subject: bug#63578: 29.0.91; Org Cannot tangle with tramp using sudo
Date: Fri, 19 May 2023 06:55:25 +0000

>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 <at> server:/etc/test.conf" 6 10 
(tramp-default t) 11 17 (tramp-default t)))
  tramp-sh-file-name-handler(file-exists-p 
#("/sudo:root <at> 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 <at> server:/etc/test.conf" 6 10 (tramp-default t) 11 17 
(tramp-default t)))
  tramp-file-name-handler(file-exists-p 
#("/sudo:root <at> 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) #<bytecode 
0x3457b099ed4fa83>)(("/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 <at> server|sudo::/etc/test.conf
> >> test
> >> #+end_src
> >> 
> >> It hangs with Opening connection nil for root <at> 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.




This bug report was last modified 1 year and 362 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.