unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Lennart Borgman <lennart.borgman@gmail.com>, 4410@debbugs.gnu.org
Subject: bug#4410: 23.1.50; copy-file get wrong number of args with url-handler-mode
Date: Tue, 19 Mar 2019 16:33:31 +0000	[thread overview]
Message-ID: <87woku3jtw.fsf@tcd.ie> (raw)
In-Reply-To: <87ws42lesi.fsf@cyd.mit.edu> (Chong Yidong's message of "Sun, 13 Sep 2009 17:23:41 -0400")

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

found 4410 24.4
tags 4410 patch
quit

Chong Yidong <cyd@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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-url-copy-file-arglist.patch --]
[-- Type: text/x-diff, Size: 3009 bytes --]

From bd5795e0d1eb1632909393612dd53b6beda606f0 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@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@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


[-- Attachment #3: Type: text/plain, Size: 20 bytes --]


Thanks,

-- 
Basil

  parent reply	other threads:[~2019-03-19 16:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87ws42lesi.fsf@cyd.mit.edu>
2009-09-11 21:58 ` bug#4410: 23.1.50; copy-file get wrong number of args with url-handler-mode Lennart Borgman
2009-09-13 21:30   ` bug#4410: marked as done (23.1.50; copy-file get wrong number of args with url-handler-mode) Emacs bug Tracking System
2019-03-19 16:33 ` Basil L. Contovounesios [this message]
2019-03-19 18:46   ` bug#4410: 23.1.50; copy-file get wrong number of args with url-handler-mode Eli Zaretskii
2019-03-20  2:05     ` Basil L. Contovounesios
2019-03-21  9:20   ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87woku3jtw.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=4410@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=lennart.borgman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).