GNU bug report logs - #4410
23.1.50; copy-file get wrong number of args with url-handler-mode

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Fri, 11 Sep 2009 22:05:04 UTC

Severity: normal

Tags: fixed, patch

Found in version 24.4

Fixed in version 26.2

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4410 in the body.
You can then email your comments to 4410 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4410; Package emacs. (Fri, 11 Sep 2009 22:05:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 11 Sep 2009 22:05:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; copy-file get wrong number of args with url-handler-mode
Date: Fri, 11 Sep 2009 23:58:12 +0200
Turn on url-handler-mode and evaluate

  (copy-file
   "http://www.w3.org/QA/Tools/css-validator/css-validator.jar"
   "temp.tmp")

This gives the error

Debugger entered--Lisp error: (wrong-number-of-arguments #[(url newname
&optional ok-if-already-exists keep-time) "binary data removed..."
[newname ok-if-already-exists url handle buffer file-exists-p error
"Opening output file: File already exists, %s"
url-retrieve-synchronously nil "Opening input file: No such file or
directory, %s" mm-dissect-buffer t mm-save-part-to-file kill-buffer
mm-destroy-parts] 4
("c:/emacs/u/090911/emacs/lisp/url/url-handlers.elc" . 6235)] 5)
  url-copy-file("http://www.w3.org/QA/Tools/css-validator/css-validator.jar"
"c:/emacs/p/090804/EmacsW32/nxhtml/util/temp.tmp" nil nil nil)
  apply(url-copy-file
("http://www.w3.org/QA/Tools/css-validator/css-validator.jar"
"c:/emacs/p/090804/EmacsW32/nxhtml/util/temp.tmp" nil nil nil))
  url-file-handler(copy-file
"http://www.w3.org/QA/Tools/css-validator/css-validator.jar"
"c:/emacs/p/090804/EmacsW32/nxhtml/util/temp.tmp" nil nil nil)
  copy-file("http://www.w3.org/QA/Tools/css-validator/css-validator.jar"
"temp.tmp")



If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
c:/emacs/u/090911/emacs/etc/DEBUG for instructions.


In GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
 of 2009-09-11
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'



Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. (Sun, 13 Sep 2009 21:30:04 GMT) Full text and rfc822 format available.

Notification sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
bug acknowledged by developer. (Sun, 13 Sep 2009 21:30:05 GMT) Full text and rfc822 format available.

Message #10 received at 4410-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 4410-done <at> debbugs.gnu.org
Subject: Re: 23.1.50; copy-file get wrong number of args with url-handler-mode
Date: Sun, 13 Sep 2009 17:23:41 -0400
> Turn on url-handler-mode and evaluate
>
>   (copy-file
>    "http://www.w3.org/QA/Tools/css-validator/css-validator.jar"
>    "temp.tmp")
>
> This gives the error

Thanks, I've checked in a fix.



Message #11 received at 4410-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 4410-done <at> debbugs.gnu.org
Subject: Re: 23.1.50; copy-file get wrong number of args with url-handler-mode
Date: Sun, 13 Sep 2009 23:28:10 +0200
Many thanks for fixing it.

On Sun, Sep 13, 2009 at 11:23 PM, Chong Yidong <cyd <at> stupidchicken.com> wrote:
>> Turn on url-handler-mode and evaluate
>>
>>   (copy-file
>>    "http://www.w3.org/QA/Tools/css-validator/css-validator.jar"
>>    "temp.tmp")
>>
>> This gives the error
>
> Thanks, I've checked in a fix.
>



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Mon, 12 Oct 2009 14:24:13 GMT) Full text and rfc822 format available.

bug unarchived. Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Tue, 19 Mar 2019 16:08:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4410; Package emacs. (Tue, 19 Mar 2019 16:34:01 GMT) Full text and rfc822 format available.

Message #18 received at 4410 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 4410 <at> debbugs.gnu.org
Subject: Re: 23.1.50; copy-file get wrong number of args with url-handler-mode
Date: Tue, 19 Mar 2019 16:33:31 +0000
[Message part 1 (text/plain, inline)]
found 4410 24.4
tags 4410 patch
quit

Chong Yidong <cyd <at> stupidchicken.com> writes:

>> Turn on url-handler-mode and evaluate
>>
>>   (copy-file
>>    "http://www.w3.org/QA/Tools/css-validator/css-validator.jar"
>>    "temp.tmp")
>>
>> This gives the error
>
> Thanks, I've checked in a fix.

This error was reintroduced in Emacs 24.4.
May I push the following fix to emacs-26?

[0001-Fix-url-copy-file-arglist.patch (text/x-diff, inline)]
From bd5795e0d1eb1632909393612dd53b6beda606f0 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Tue, 19 Mar 2019 16:00:18 +0000
Subject: [PATCH] Fix url-copy-file arglist

* lisp/url/url-handlers.el: Silence byte-compiler.
(url-copy-file): Add 6th argument following change to copy-file in
2012-12-16T19:22:27+01:00!romain <at> orebokech.com. (bug#4410)
---
 lisp/url/url-handlers.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index 3af4e9e7b1..91f9b7f520 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -41,6 +41,9 @@
 (declare-function mm-decode-string "mm-bodies" (string charset))
 ;; mm-decode loads mail-parse.
 (declare-function mail-content-type-get "mail-parse" (ct attribute))
+;; mm-bodies loads mm-util.
+(declare-function mm-charset-to-coding-system "mm-util"
+                  (charset &optional lbt allow-override silent))
 
 ;; Implementation status
 ;; ---------------------
@@ -250,15 +253,15 @@ url-handler-file-remote-p
 ;; The actual implementation
 ;;;###autoload
 (defun url-copy-file (url newname &optional ok-if-already-exists
-			  _keep-time _preserve-uid-gid)
+                          _keep-time _preserve-uid-gid _preserve-permissions)
   "Copy URL to NEWNAME.  Both args must be strings.
-Signals a `file-already-exists' error if file NEWNAME already exists,
+Signal a `file-already-exists' error if file NEWNAME already exists,
 unless a third argument OK-IF-ALREADY-EXISTS is supplied and non-nil.
 A number as third arg means request confirmation if NEWNAME already exists.
 This is what happens in interactive use with M-x.
 Fourth arg KEEP-TIME non-nil means give the new file the same
 last-modified time as the old one.  (This works on only some systems.)
-Fifth arg PRESERVE-UID-GID is ignored.
+Args PRESERVE-UID-GID and PRESERVE-PERMISSIONS are ignored.
 A prefix arg makes KEEP-TIME non-nil."
   (if (and (file-exists-p newname)
 	   (not ok-if-already-exists))
@@ -341,7 +344,7 @@ url-insert-file-contents
     (unless buffer (signal 'file-error (list url "No Data")))
     (with-current-buffer buffer
       ;; XXX: This is HTTP/S specific and should be moved to url-http
-      ;; instead.  See https://debbugs.gnu.org/17549.
+      ;; instead.  See bug#17549.
       (when (bound-and-true-p url-http-response-status)
         ;; Don't signal an error if VISIT is non-nil, because
         ;; 'insert-file-contents' doesn't.  This is required to
@@ -354,7 +357,7 @@ url-insert-file-contents
                          (< url-http-response-status 300)))
           (let ((desc (nth 2 (assq url-http-response-status url-http-codes))))
             (kill-buffer buffer)
-            ;; Signal file-error per https://debbugs.gnu.org/16733.
+            ;; Signal file-error per bug#16733.
             (signal 'file-error (list url desc))))))
     (url-insert-buffer-contents buffer url visit beg end replace)))
 
-- 
2.20.1

[Message part 3 (text/plain, inline)]
Thanks,

-- 
Basil

bug Marked as found in versions 24.4 and reopened. Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Tue, 19 Mar 2019 16:34:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Tue, 19 Mar 2019 16:34:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4410; Package emacs. (Tue, 19 Mar 2019 18:47:02 GMT) Full text and rfc822 format available.

Message #25 received at 4410 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: cyd <at> stupidchicken.com, lennart.borgman <at> gmail.com, 4410 <at> debbugs.gnu.org
Subject: Re: bug#4410: 23.1.50;
 copy-file get wrong number of args with url-handler-mode
Date: Tue, 19 Mar 2019 20:46:06 +0200
> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
> Date: Tue, 19 Mar 2019 16:33:31 +0000
> Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 4410 <at> debbugs.gnu.org
> 
> May I push the following fix to emacs-26?

Yes, thanks.




Added tag(s) fixed. Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Wed, 20 Mar 2019 02:07:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.2, send any further explanations to 4410 <at> debbugs.gnu.org and Lennart Borgman <lennart.borgman <at> gmail.com> Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Wed, 20 Mar 2019 02:07:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4410; Package emacs. (Wed, 20 Mar 2019 02:07:02 GMT) Full text and rfc822 format available.

Message #32 received at 4410-done <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: cyd <at> stupidchicken.com, lennart.borgman <at> gmail.com, 4410-done <at> debbugs.gnu.org
Subject: Re: bug#4410: 23.1.50;
 copy-file get wrong number of args with url-handler-mode
Date: Wed, 20 Mar 2019 02:05:54 +0000
tags 4410 fixed
close 4410 26.2
quit

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
>> Date: Tue, 19 Mar 2019 16:33:31 +0000
>> Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 4410 <at> debbugs.gnu.org
>> 
>> May I push the following fix to emacs-26?
>
> Yes, thanks.

Thanks, done.

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4410; Package emacs. (Thu, 21 Mar 2019 09:21:01 GMT) Full text and rfc822 format available.

Message #35 received at 4410 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 4410 <at> debbugs.gnu.org
Subject: Re: 23.1.50; copy-file get wrong number of args with url-handler-mode
Date: Thu, 21 Mar 2019 17:20:10 +0800
Patch looks fine to me.

-- Yidong

On Wed, Mar 20, 2019 at 12:33 AM Basil L. Contovounesios
<contovob <at> tcd.ie> wrote:
>
> found 4410 24.4
> tags 4410 patch
> quit
>
> Chong Yidong <cyd <at> stupidchicken.com> writes:
>
> >> Turn on url-handler-mode and evaluate
> >>
> >>   (copy-file
> >>    "http://www.w3.org/QA/Tools/css-validator/css-validator.jar"
> >>    "temp.tmp")
> >>
> >> This gives the error
> >
> > Thanks, I've checked in a fix.
>
> This error was reintroduced in Emacs 24.4.
> May I push the following fix to emacs-26?
>
>
> Thanks,
>
> --
> Basil




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 18 Apr 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 346 days ago.

Previous Next


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