GNU bug report logs - #44822
27.1; Regression in `ffap-read-file-or-url'

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Drew Adams <drew.adams@HIDDEN>; dated Mon, 23 Nov 2020 17:25:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Disconnected #44841 from all other report(s). Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 44822 44841. Request was from 積丹尼 Dan Jacobson <jidanni@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 44822 <at> debbugs.gnu.org:


Received: (at 44822) by debbugs.gnu.org; 23 Nov 2020 17:53:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 12:53:52 2020
Received: from localhost ([127.0.0.1]:51065 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khG2B-0007ij-Qz
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 12:53:52 -0500
Received: from eggs.gnu.org ([209.51.188.92]:59208)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1khG2A-0007iW-Ca
 for 44822 <at> debbugs.gnu.org; Mon, 23 Nov 2020 12:53:50 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50076)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1khG24-0004Ld-9f; Mon, 23 Nov 2020 12:53:44 -0500
Received: from [176.228.60.248] (port=2812 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1khG1x-0001ZB-Qi; Mon, 23 Nov 2020 12:53:40 -0500
Date: Mon, 23 Nov 2020 19:53:34 +0200
Message-Id: <83pn44ufhd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Thierry Volpiatto <thierry.volpiatto@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <d4f8e6e2-7a0c-44cd-9c12-79f62a18b4d2@default> (message from Drew
 Adams on Mon, 23 Nov 2020 09:23:37 -0800 (PST))
Subject: Re: bug#44822: 27.1; Regression in `ffap-read-file-or-url'
References: <d4f8e6e2-7a0c-44cd-9c12-79f62a18b4d2@default>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 44822
Cc: 44822 <at> debbugs.gnu.org, Drew Adams <drew.adams@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 23 Nov 2020 09:23:37 -0800 (PST)
> From: Drew Adams <drew.adams@HIDDEN>
> 
> `ffap-read-file-or-url' now reads a URL as a file name, truncating to
> remove a prefix such as http:/.  Prior to Emacs 27, it correctly
> returned the URL.
> 
> If point is not on a URL, then the guess is nil.  The user is prompted
> (as before) with the default directory as default.  If the user rejects
> that default value and replaces it by a URL (e.g. yanking), then
> `ffap-read-file-or-url' should just return that URL, as it has always
> done.  In Emacs 27, it instead tries to handle it as a file name,
> removing the prefix up to the first `/' before a non-/ char.
> 
> emacs -Q
> 
> ;; With point not on a URL or file name:
> 
> (ffap-read-file-or-url "URL: " nil)
> 
> ;; User is prompted, with the default-directory as default:
> 
> URL: /my/default/dir/
> 
> ;; User pastes a URL after that or replaces that with a URL.
> 
> URL: /my/default/dir/http://foobar.com RET
> ;; or
> URL: http://foobar.com RET
> 
> ;; This is returned: /foobar.com
> 
> In Emacs 26.3 the URL entered by the user is returned correctly.
> 
> A main use of `read-file-or-url' is to prompt for and read a URL.  If a
> user enters a URL when FFAP has not been able to guess a URL, FFAP now
> just treats the input as a filename.  It treats prefix `http:/' the same
> way it would treat prefix `c:' on MS Windows.
> 
> Reading a URL is maybe the main use case of `ffap-read-file-or-url'.  (There is no `ffap-read-url'.)  It's now broken.

Thierry and Stefan, these changes seem to have been done by you.  Can
you please take a look at this issue?  Would it be possible to fix
this for Emacs 27.2?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#44822; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Nov 2020 17:24:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 12:24:14 2020
Received: from localhost ([127.0.0.1]:51001 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khFZW-0006vx-GO
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 12:24:14 -0500
Received: from lists.gnu.org ([209.51.188.17]:40170)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1khFZV-0006vq-3f
 for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 12:24:13 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:38752)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <drew.adams@HIDDEN>)
 id 1khFZU-0004En-3I
 for bug-gnu-emacs@HIDDEN; Mon, 23 Nov 2020 12:24:12 -0500
Received: from aserp2130.oracle.com ([141.146.126.79]:60316)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <drew.adams@HIDDEN>)
 id 1khFZR-0007Wp-NN
 for bug-gnu-emacs@HIDDEN; Mon, 23 Nov 2020 12:24:11 -0500
Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1])
 by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0ANHKeRe007588
 for <bug-gnu-emacs@HIDDEN>; Mon, 23 Nov 2020 17:23:40 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : subject : content-type :
 content-transfer-encoding; s=corp-2020-01-29;
 bh=R33mmHWzVARRIKutwRonck/othxaQTXnbUwgyCN0LGQ=;
 b=lHBQTOhUmHRjPBgx9jjE25uWykbL4rofZY7ye/FOSvF2t4UYzsIsEL+K49IgGcOjC6c2
 W3X0OLWvfuRvXbhQ0YTAyE3cEqP/Qte+spEQRO4fy5f2HFT/O34BT1W+9OsVjLeQ56HN
 ikBy/K3RX0Fjoun0xEyvhvYgsDoudMgbh2hPhquGhgxvQBbPzXVsDX9FQFLhWZcL100v
 0o+K7xXr9kMvCWDEp++RQ4BGNMT2yHT5VpyM04CTeerJJe5EgGur9spSLCITtGCqUoo5
 ksYXh0xcUTYxY9F+GbPbRF8JmGeG+vcupAVwj/ieMR4dRwM0s6XLVFaiuDj8z1apUmZd cg== 
Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79])
 by aserp2130.oracle.com with ESMTP id 34xrdaphtn-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL)
 for <bug-gnu-emacs@HIDDEN>; Mon, 23 Nov 2020 17:23:40 +0000
Received: from pps.filterd (userp3020.oracle.com [127.0.0.1])
 by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0ANHFu3j169952
 for <bug-gnu-emacs@HIDDEN>; Mon, 23 Nov 2020 17:23:39 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by userp3020.oracle.com with ESMTP id 34ycnr7dgx-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Mon, 23 Nov 2020 17:23:39 +0000
Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0ANHNc3G027997
 for <bug-gnu-emacs@HIDDEN>; Mon, 23 Nov 2020 17:23:38 GMT
MIME-Version: 1.0
Message-ID: <d4f8e6e2-7a0c-44cd-9c12-79f62a18b4d2@default>
Date: Mon, 23 Nov 2020 09:23:37 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.1; Regression in `ffap-read-file-or-url'
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5071.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9814
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 suspectscore=1
 mlxlogscore=941 phishscore=0 spamscore=0 malwarescore=0 adultscore=0
 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2009150000 definitions=main-2011230115
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9814
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 impostorscore=0 mlxscore=0
 mlxlogscore=966 spamscore=0 phishscore=0 clxscore=1015 malwarescore=0
 lowpriorityscore=0 adultscore=0 suspectscore=1 priorityscore=1501
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2011230115
Received-SPF: pass client-ip=141.146.126.79;
 envelope-from=drew.adams@HIDDEN; helo=aserp2130.oracle.com
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,
 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

`ffap-read-file-or-url' now reads a URL as a file name, truncating to
remove a prefix such as http:/.  Prior to Emacs 27, it correctly
returned the URL.

If point is not on a URL, then the guess is nil.  The user is prompted
(as before) with the default directory as default.  If the user rejects
that default value and replaces it by a URL (e.g. yanking), then
`ffap-read-file-or-url' should just return that URL, as it has always
done.  In Emacs 27, it instead tries to handle it as a file name,
removing the prefix up to the first `/' before a non-/ char.

emacs -Q

;; With point not on a URL or file name:

(ffap-read-file-or-url "URL: " nil)

;; User is prompted, with the default-directory as default:

URL: /my/default/dir/

;; User pastes a URL after that or replaces that with a URL.

URL: /my/default/dir/http://foobar.com RET
;; or
URL: http://foobar.com RET

;; This is returned: /foobar.com

In Emacs 26.3 the URL entered by the user is returned correctly.

A main use of `read-file-or-url' is to prompt for and read a URL.  If a
user enters a URL when FFAP has not been able to guess a URL, FFAP now
just treats the input as a filename.  It treats prefix `http:/' the same
way it would treat prefix `c:' on MS Windows.

Reading a URL is maybe the main use case of `ffap-read-file-or-url'.  (Ther=
e is no `ffap-read-url'.)  It's now broken.


In GNU Emacs 27.1 (build 1, x86_64-w64-mingw32)
 of 2020-08-12 built on CIRROCUMULUS
Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.18362
System Description: Microsoft Windows 10 Pro (v10.0.1903.18362.1139)




Acknowledgement sent to Drew Adams <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#44822; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 28 Nov 2020 03:45:01 UTC

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