tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tramp (2.7.0-pre master/27944247d161f0ed65bbb34959c4493f7984987a); Error


From: Richard Copley
Subject: tramp (2.7.0-pre master/27944247d161f0ed65bbb34959c4493f7984987a); Error in remote grep-find from Windows host
Date: Thu, 27 Jul 2023 07:07:03 +0100

Recipe starting from 'emacs -Q', on Windows assuming a PuTTy session
called "session" is configured:

C-x C-f /plink:session:/tmp RET
M-x grep-find RET
x RET

Backtrace:
Lisp error: (wrong-type-argument "stringp nil")
  signal(wrong-type-argument ("stringp nil"))
  tramp-error((tramp-file-name "plink" nil nil "session" nil "/tmp/"
nil) wrong-type-argument "stringp nil")
  tramp-signal-hook-function(wrong-type-argument (stringp nil))
  regexp-quote(nil)
  tramp-sh-handle-expand-file-name("/plink:session:/tmp/" nil)
  apply(tramp-sh-handle-expand-file-name ("/plink:session:/tmp/" nil))
  tramp-sh-file-name-handler(expand-file-name "/plink:session:/tmp/" nil)
  apply(tramp-sh-file-name-handler expand-file-name
("/plink:session:/tmp/" nil))
  tramp-file-name-handler(expand-file-name "/plink:session:/tmp/" nil)
  expand-file-name("/plink:session:/tmp/")
  cd("/plink:session:/tmp/")
  compilation-start("find . -type f -exec grep --color=always -nH
--nul..." grep-mode)
  grep("find . -type f -exec grep --color=always -nH --nul...")
  grep-find("find . -type f -exec grep --color=always -nH --nul...")
  funcall-interactively(grep-find "find . -type f -exec grep
--color=always -nH --nul...")
  call-interactively(grep-find record nil)
  command-execute(grep-find record)
  execute-extended-command(nil "grep-find" nil)
  funcall-interactively(execute-extended-command nil "grep-find" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

This occurs because 'null-device' is let-bound to nil in 'grep-find',
and this is not handled by the regex constructor in
tramp-sh-handle-expand-file-name (only used on Windows). Evaluating
the following form gives the same error:

(let ((null-device nil))
  (rx bol (| (: alpha ":") (: (literal null-device) eol))))

Bisected to this Emacs commit:

be2e6228f8c9c57d2809bdd953d065ebfc63d4c4 is the first bad commit
commit be2e6228f8c9c57d2809bdd953d065ebfc63d4c4
Author: Michael Albinus <michael.albinus@gmx.de>
Date:   Fri Aug 26 16:19:47 2022 +0200

    Use `rx' in Tramp where possible



reply via email to

[Prev in Thread] Current Thread [Next in Thread]