From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs 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 Message-ID: <87woku3jtw.fsf@tcd.ie> References: <87ws42lesi.fsf@cyd.mit.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="179346"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Lennart Borgman , 4410@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 19 17:34:51 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6HhS-000kZh-IZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2019 17:34:50 +0100 Original-Received: from localhost ([127.0.0.1]:59975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6HhR-0002ud-It for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2019 12:34:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6Hgi-0002U3-CI for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 12:34:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6Hgh-0004LZ-44 for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 12:34:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37274) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h6Hgg-0004Kg-2Q for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 12:34:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h6Hgf-00036K-Qh for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 12:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Mar 2019 16:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4410 X-GNU-PR-Package: emacs Original-Received: via spool by 4410-submit@debbugs.gnu.org id=B4410.155301322311889 (code B ref 4410); Tue, 19 Mar 2019 16:34:01 +0000 Original-Received: (at 4410) by debbugs.gnu.org; 19 Mar 2019 16:33:43 +0000 Original-Received: from localhost ([127.0.0.1]:50818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6HgN-00035e-46 for submit@debbugs.gnu.org; Tue, 19 Mar 2019 12:33:43 -0400 Original-Received: from mail-ed1-f45.google.com ([209.85.208.45]:40120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6HgI-00035D-S6 for 4410@debbugs.gnu.org; Tue, 19 Mar 2019 12:33:39 -0400 Original-Received: by mail-ed1-f45.google.com with SMTP id h22so6443835edw.7 for <4410@debbugs.gnu.org>; Tue, 19 Mar 2019 09:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=O4bQc1hJ3T/NbAO0TxaPBXBJQUXkkyNScfl1gpIRJdI=; b=15F3itXwTn8MhCccoUdTmb/YRTtGb91Xgm6aphPZxnGWtnvdwlfqxG5Z5UqjAXaHIH wVy4tZZiLLM9GhzX2LDD2nnRC3nCLQKTU8zSoJBJxWUzq8qTPnx3V8v6CStI/RvTC29x IRaO8hCpqb6zK2LgHwl0I+Q+HS+mo0/5KseqLOVusl50jv4vRlNJ17yjwcnx70u0hp/+ I9klScCRSKdbIZEuP11oIaVnQNTANwHo58t3tJeDr4gLtjSt4mYJ60WTEF4Vi3G00vVg khK67Qely8e3tIif4JJ+9Tg/qRl6i83GKi2OaN61ECWmdxxywCKOf4aqJmt92oUoCcZl hZ4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=O4bQc1hJ3T/NbAO0TxaPBXBJQUXkkyNScfl1gpIRJdI=; b=LO7PppCBwrB0dyN3VgV6VjqZIyZoR2NiwWfiS/0mPHYReqEgPZtfKjwISosXGEg1/y 20SPPIASC/K0GDcz4ta9ri5XolR235Wp0MUZZpSOjWO4syQ0G1esqY8oY8vydSycc0ho TlvuI+Tg5lhVhiPgcWhaoVlPlAy+0CIlYYvxGYyQBHaHI4O9dL7vKwRdBK4N4TVNSdTD 5jqATWAEHeSz18lIbYJ9NaUfeL2I6wha5jKKVYQiDnNt9XkHclrzuGwGWkm7mjLjPE9h hxqR5Q2MR2rh4MiLmHo12vTy2W5oPqIiq9CsYaicadezry/hLAnppQL3FbioLfI6X1M1 FdqQ== X-Gm-Message-State: APjAAAXFqyEM/SriX8Z+7H9lXyqqaFKQWrZ79q5ReoQGyV8WQ2fsAtM4 Wb2LPWoi/G7ZjEwlUVTtNd2J9A== X-Google-Smtp-Source: APXvYqxSE+ECyl4PV7/wBO230IQDknTMzv0vpJ2Ov/J64cJGsLKvIoT7wFdMtFUZ0yiYRXTxkqClqg== X-Received: by 2002:a05:6402:3cd:: with SMTP id t13mr17521593edw.281.1553013213020; Tue, 19 Mar 2019 09:33:33 -0700 (PDT) Original-Received: from localhost ([134.226.214.246]) by smtp.gmail.com with ESMTPSA id n7sm4364202edq.69.2019.03.19.09.33.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 19 Mar 2019 09:33:32 -0700 (PDT) In-Reply-To: <87ws42lesi.fsf@cyd.mit.edu> (Chong Yidong's message of "Sun, 13 Sep 2009 17:23:41 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156507 Archived-At: --=-=-= Content-Type: text/plain found 4410 24.4 tags 4410 patch quit Chong Yidong 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? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-url-copy-file-arglist.patch >From bd5795e0d1eb1632909393612dd53b6beda606f0 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" 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 --=-=-= Content-Type: text/plain Thanks, -- Basil --=-=-=--