unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31068: 27.0.50; Renaming archives fails due to tramp-archive
@ 2018-04-05  7:31 Allen Li
  2018-04-05 12:33 ` Michael Albinus
  2018-05-14 11:56 ` Michael Albinus
  0 siblings, 2 replies; 9+ messages in thread
From: Allen Li @ 2018-04-05  7:31 UTC (permalink / raw)
  To: 31068

1. touch /tmp/foo.7z
2. emacs -Q
3. C-x C-f /tmp RET
4. Use R to rename foo.7z to bar.7z

An error is signaled.  The debug output:

Debugger entered--Lisp error: (user-error "Package `tramp-archive' not
supported")
  signal(user-error ("Package `tramp-archive' not supported"))
  tramp-error(nil user-error "Package `tramp-archive' not supported")
  apply(tramp-error nil user-error "Package `tramp-archive' not supported" nil)
  tramp-user-error(nil "Package `tramp-archive' not supported")
  tramp-archive-file-name-handler(expand-file-name "/tmp/bar.7z/" nil)
  expand-file-name("/tmp/bar.7z/" nil)
  apply(expand-file-name ("/tmp/bar.7z/" nil))
  tramp-autoload-file-name-handler(expand-file-name "/tmp/bar.7z/" nil)
  expand-file-name("/tmp/bar.7z/")
  dired-fun-in-all-buffers("/tmp/bar.7z/" nil dired-rename-subdir-1
"/tmp/bar.7z/" "/tmp/foo.7z/")
  dired-rename-subdir("/tmp/bar.7z" "/tmp/foo.7z")
  dired-rename-file("/tmp/bar.7z" "/tmp/foo.7z" nil)
  dired-create-files(dired-rename-file "Move" ("/tmp/bar.7z")
#f(compiled-function (from) #<bytecode 0x1aa60cd>) t)
  dired-do-create-files(move dired-rename-file "Move" nil t "Rename")
  dired-do-rename(nil)
  funcall-interactively(dired-do-rename nil)
  call-interactively(dired-do-rename nil nil)
  command-execute(dired-do-rename)

This error reliably happens the first time after Emacs is started; it
often goes away after the first time.  The file is renamed despite the
error.

In GNU Emacs 27.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version 3.22.29)
 of 2018-04-05 built on cielnosurge
Repository revision: 0b690a83f674a160ccbaa9f374226b1fcfb2d535
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Arch Linux

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Debug on Error enabled globally
("^Exit the snippet first!$" beginning-of-line beginning-of-buffer
end-of-line end-of-buffer end-of-file buffer-read-only
file-supersession mark-inactive)
Entering debugger...
Mark set

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS
LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
THREADS LIBSYSTEMD JSON LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dired by name





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#31068: 27.0.50; Renaming archives fails due to tramp-archive
  2018-04-05  7:31 bug#31068: 27.0.50; Renaming archives fails due to tramp-archive Allen Li
@ 2018-04-05 12:33 ` Michael Albinus
  2018-04-05 12:57   ` Andreas Schwab
  2018-05-14 11:56 ` Michael Albinus
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2018-04-05 12:33 UTC (permalink / raw)
  To: Allen Li; +Cc: 31068

Allen Li <darkfeline@felesatra.moe> writes:

> 1. touch /tmp/foo.7z
> 2. emacs -Q
> 3. C-x C-f /tmp RET
> 4. Use R to rename foo.7z to bar.7z
>
> An error is signaled.  The debug output:

The relevant parts are

>   dired-fun-in-all-buffers("/tmp/bar.7z/" nil dired-rename-subdir-1 "/tmp/bar.7z/" "/tmp/foo.7z/")
>   dired-rename-subdir("/tmp/bar.7z" "/tmp/foo.7z")
>   dired-rename-file("/tmp/bar.7z" "/tmp/foo.7z" nil)

Why does `dired-rename-file' calls `dired-rename-subdir'? "/tmp/bar.7z"
is just a file.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#31068: 27.0.50; Renaming archives fails due to tramp-archive
  2018-04-05 12:33 ` Michael Albinus
@ 2018-04-05 12:57   ` Andreas Schwab
  2018-04-05 13:39     ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2018-04-05 12:57 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 31068, Allen Li

On Apr 05 2018, Michael Albinus <michael.albinus@gmx.de> wrote:

> Why does `dired-rename-file' calls `dired-rename-subdir'? "/tmp/bar.7z"
> is just a file.

A file can be a directory, too.

  ;; See if it's an inserted subdir, and rename that, too.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#31068: 27.0.50; Renaming archives fails due to tramp-archive
  2018-04-05 12:57   ` Andreas Schwab
@ 2018-04-05 13:39     ` Michael Albinus
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2018-04-05 13:39 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 31068, Allen Li

Andreas Schwab <schwab@suse.de> writes:

>> Why does `dired-rename-file' calls `dired-rename-subdir'? "/tmp/bar.7z"
>> is just a file.
>
> A file can be a directory, too.
>
>   ;; See if it's an inserted subdir, and rename that, too.

Yes. But "/tmp/bar.7z" isn't a directory, one should call
`file-directory-p' first.

> Andreas.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#31068: 27.0.50; Renaming archives fails due to tramp-archive
  2018-04-05  7:31 bug#31068: 27.0.50; Renaming archives fails due to tramp-archive Allen Li
  2018-04-05 12:33 ` Michael Albinus
@ 2018-05-14 11:56 ` Michael Albinus
  2018-05-15  6:55   ` Allen Li
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2018-05-14 11:56 UTC (permalink / raw)
  To: Allen Li; +Cc: 31068

Allen Li <darkfeline@felesatra.moe> writes:

Hi Allen,

> 1. touch /tmp/foo.7z
> 2. emacs -Q
> 3. C-x C-f /tmp RET
> 4. Use R to rename foo.7z to bar.7z
>
> An error is signaled.  The debug output:

I've followed exactly the recipe, the error didn't happen. Could you pls
recheck with this recipe?

And could you pls show the value of `file-name-handler-alist' after step
2 and after step 4?

Thanks, and best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#31068: 27.0.50; Renaming archives fails due to tramp-archive
  2018-05-14 11:56 ` Michael Albinus
@ 2018-05-15  6:55   ` Allen Li
  2018-05-15  9:14     ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Allen Li @ 2018-05-15  6:55 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 31068

On Mon, May 14, 2018 at 4:57 AM Michael Albinus <michael.albinus@gmx.de>
wrote:

> Allen Li <darkfeline@felesatra.moe> writes:

> Hi Allen,

> > 1. touch /tmp/foo.7z
> > 2. emacs -Q
> > 3. C-x C-f /tmp RET
> > 4. Use R to rename foo.7z to bar.7z
> >
> > An error is signaled.  The debug output:

> I've followed exactly the recipe, the error didn't happen. Could you pls
> recheck with this recipe?

With master as I am writing this, I can reproduce with this recipe,
although the symptom has changed slightly.

An error no longer escapes to the command loop.  A message is printed:

tramp-error: Package `tramp-archive' not supported

The file foo.7z disappears from the Dired buffer.  Refreshing the buffer
(g) shows that the file has been renamed to bar.7z

Afterward in the same session, the bug no longer occurs.


> And could you pls show the value of `file-name-handler-alist' after step
> 2 and after step 4?

Before

(("\\`\\(.+\\.\\(?:7z\\|CAB\\|LZH\\|MSU\\|ZIP\\|a\\(?:pk\\|r\\)\\|
c\\(?:ab\\|pio\\)\\|de\\(?:b\\|pot\\)\\|exe\\|iso\\|jar\\|lzh\\|m\\(?:su\\|
tree\\)\\|od[bfgpst]\\|pax\\|r\\(?:ar\\|pm\\)\\|shar\\|t\\(?:ar\\|
[bglx]z\\)\\|warc\\|x\\(?:ar\\|p[is]\\)\\|zip\\)\\(?:\\.\\(?:Z\\|bz2\\|gz\\|
l\\(?:rz\\|z\\(?:ma\\|[4o]\\)?\\)\\|uu\\|xz\\)\\)*\\)\\(/.*\\)\\'"
. tramp-autoload-file-name-handler)
   ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" . epa-file-handler)

("\\(?:\\.tzst\\|\\.zst\\|\\.dz\\|\\.txz\\|\\.xz\\|\\.lzma\\|\\.lz\\|
\\.g?z\\|\\.\\(?:tgz\\|svgz\\|sifz\\)\\|\\.tbz2?\\|\\.bz2\\|\\.Z\\)\\(?:~\\|
\\.~[-[:alnum:]:#@^._]+\\(?:~[[:digit:]]+\\)?~\\)?\\'"
. jka-compr-handler)
   ("\\`/[^/|:]+:" . tramp-autoload-file-name-handler)
   ("\\`/:" . file-name-non-special))

After

(("\\(?:\\.tzst\\|\\.zst\\|\\.dz\\|\\.txz\\|\\.xz\\|\\.lzma\\|\\.lz\\|
\\.g?z\\|\\.\\(?:tgz\\|svgz\\|sifz\\)\\|\\.tbz2?\\|\\.bz2\\|\\.Z\\)\\(?:~\\|
\\.~[-[:alnum:]:#@^._]+\\(?:~[[:digit:]]+\\)?~\\)?\\'"
. jka-compr-handler)
   ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" . epa-file-handler)

("\\`\\(.+\\.\\(?:7z\\|CAB\\|LZH\\|MSU\\|ZIP\\|a\\(?:pk\\|r\\)\\|c\\(?:ab\\|
pio\\)\\|de\\(?:b\\|pot\\)\\|exe\\|iso\\|jar\\|lzh\\|m\\(?:su\\|tree\\)\\|
od[bfgpst]\\|pax\\|r\\(?:ar\\|pm\\)\\|shar\\|t\\(?:ar\\|[bglx]z\\)\\|warc\\|
x\\(?:ar\\|p[is]\\)\\|zip\\)\\(?:\\.\\(?:Z\\|bz2\\|gz\\|l\\(?:rz\\|
z\\(?:ma\\|[4o]\\)?\\)\\|uu\\|xz\\)\\)*\\)\\(/.*\\)\\'"
. tramp-archive-file-name-handler)
   ("\\`/\\(\\([^/|:]+:[^/|:]*|\\)*[^/|:]+\\(:[^/|:]*\\)?\\)?\\'" .
tramp-completion-file-name-handler)
   ("^/\\(\\(?:\\([a-zA-Z0-9-]+\\):\\(?:\\([^/|:
]+\\)@\\)?\\(\\(?:[a-zA-Z0-9_.%-]+\\|
\\[\\(?:\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+\\)?]\\)\\(?:#[0-9]+\\)?\\)?|
\\)+\\)?\\([a-zA-Z0-9-]+\\):\\(?:\\([^/|:
]+\\)@\\)?\\(\\(?:[a-zA-Z0-9_.%-]+\\|
\\[\\(?:\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+\\)?]\\)\\(?:#[0-9]+\\)?\\)?:\\([^\n\r]*\\'\\)"
. tramp-file-name-handler)
   ("\\`/:" . file-name-non-special))


> Thanks, and best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#31068: 27.0.50; Renaming archives fails due to tramp-archive
  2018-05-15  6:55   ` Allen Li
@ 2018-05-15  9:14     ` Michael Albinus
  2018-05-17  4:59       ` Allen Li
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2018-05-15  9:14 UTC (permalink / raw)
  To: Allen Li; +Cc: 31068

Allen Li <darkfeline@felesatra.moe> writes:

Hi Allen,

> After
>
> ("\\`\\(.+\\.\\(?:7z\\|CAB\\|LZH\\|MSU\\|ZIP\\|a\\(?:pk\\|r\\)\\|c\\(?:ab\\|
> pio\\)\\|de\\(?:b\\|pot\\)\\|exe\\|iso\\|jar\\|lzh\\|m\\(?:su\\|tree\\)\\|
> od[bfgpst]\\|pax\\|r\\(?:ar\\|pm\\)\\|shar\\|t\\(?:ar\\|[bglx]z\\)\\|warc\\|
> x\\(?:ar\\|p[is]\\)\\|zip\\)\\(?:\\.\\(?:Z\\|bz2\\|gz\\|l\\(?:rz\\|
> z\\(?:ma\\|[4o]\\)?\\)\\|uu\\|xz\\)\\)*\\)\\(/.*\\)\\'"
> . tramp-archive-file-name-handler)

Thanks. This makes it clear; the handler shall be removed in case
tramp-archive is not able to work properly.

I've committed a patch to the master branch; could you pls check?

Best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#31068: 27.0.50; Renaming archives fails due to tramp-archive
  2018-05-15  9:14     ` Michael Albinus
@ 2018-05-17  4:59       ` Allen Li
  2018-05-17  6:55         ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Allen Li @ 2018-05-17  4:59 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 31068

Confirmed fixed, thank you.
On Tue, May 15, 2018 at 2:14 AM Michael Albinus <michael.albinus@gmx.de>
wrote:

> Allen Li <darkfeline@felesatra.moe> writes:

> Hi Allen,

> > After
> >
> >
("\\`\\(.+\\.\\(?:7z\\|CAB\\|LZH\\|MSU\\|ZIP\\|a\\(?:pk\\|r\\)\\|c\\(?:ab\\|
> >
pio\\)\\|de\\(?:b\\|pot\\)\\|exe\\|iso\\|jar\\|lzh\\|m\\(?:su\\|tree\\)\\|
> >
od[bfgpst]\\|pax\\|r\\(?:ar\\|pm\\)\\|shar\\|t\\(?:ar\\|[bglx]z\\)\\|warc\\|
> > x\\(?:ar\\|p[is]\\)\\|zip\\)\\(?:\\.\\(?:Z\\|bz2\\|gz\\|l\\(?:rz\\|
> > z\\(?:ma\\|[4o]\\)?\\)\\|uu\\|xz\\)\\)*\\)\\(/.*\\)\\'"
> > . tramp-archive-file-name-handler)

> Thanks. This makes it clear; the handler shall be removed in case
> tramp-archive is not able to work properly.

> I've committed a patch to the master branch; could you pls check?

> Best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#31068: 27.0.50; Renaming archives fails due to tramp-archive
  2018-05-17  4:59       ` Allen Li
@ 2018-05-17  6:55         ` Michael Albinus
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2018-05-17  6:55 UTC (permalink / raw)
  To: Allen Li; +Cc: 31068-done

Version: 27.1

Allen Li <darkfeline@felesatra.moe> writes:

Hi Allen,

> Confirmed fixed, thank you.

Thanks for the feedback, I'm closing the bug.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-05-17  6:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-05  7:31 bug#31068: 27.0.50; Renaming archives fails due to tramp-archive Allen Li
2018-04-05 12:33 ` Michael Albinus
2018-04-05 12:57   ` Andreas Schwab
2018-04-05 13:39     ` Michael Albinus
2018-05-14 11:56 ` Michael Albinus
2018-05-15  6:55   ` Allen Li
2018-05-15  9:14     ` Michael Albinus
2018-05-17  4:59       ` Allen Li
2018-05-17  6:55         ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).