From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34291: Some EWW patches Date: Sat, 02 Feb 2019 21:53:52 +0200 Message-ID: <83d0oavuen.fsf@gnu.org> References: Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="98850"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34291@debbugs.gnu.org To: Nicholas Drozd Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 02 20:55:10 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 1gq1Ne-000Paf-08 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Feb 2019 20:55:10 +0100 Original-Received: from localhost ([127.0.0.1]:47376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gq1Nc-0001nM-Sz for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Feb 2019 14:55:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gq1NX-0001nG-ID for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 14:55:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gq1NW-0004FQ-MP for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 14:55:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57324) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gq1NW-0004FG-Ig for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 14:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gq1NW-0004A7-7U for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 14:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Feb 2019 19:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34291 X-GNU-PR-Package: emacs Original-Received: via spool by 34291-submit@debbugs.gnu.org id=B34291.154913726315944 (code B ref 34291); Sat, 02 Feb 2019 19:55:02 +0000 Original-Received: (at 34291) by debbugs.gnu.org; 2 Feb 2019 19:54:23 +0000 Original-Received: from localhost ([127.0.0.1]:56605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gq1Mt-000496-6B for submit@debbugs.gnu.org; Sat, 02 Feb 2019 14:54:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gq1Ms-00048t-4K for 34291@debbugs.gnu.org; Sat, 02 Feb 2019 14:54:22 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gq1Ml-00040W-G4; Sat, 02 Feb 2019 14:54:16 -0500 Original-Received: from [176.228.60.248] (port=3883 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gq1Mk-0008AE-Qt; Sat, 02 Feb 2019 14:54:15 -0500 In-reply-to: (message from Nicholas Drozd on Sat, 2 Feb 2019 13:26:16 -0600) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:155033 Archived-At: > From: Nicholas Drozd > Date: Sat, 2 Feb 2019 13:26:16 -0600 > > Subject: [PATCH 3/3] * lisp/net/eww.el (eww-download-callback): Fix download > URL path > > Previously this wasn't handling download URLs correctly, resulting in > all downloaded pages being named "!", "!(1)", etc. > > Take "https://emptysqua.re/blog/getaddrinfo-cpython-mac-and-bsd/" as > an example. `url-path-and-query' breaks this down to > "/blog/getaddrinfo-cpython-mac-and-bsd/", and this gets passed to > `file-name-nondirectory'. But that path looks like a directory because > of the trailing slash, so `eww-decode-url-file-name' would end up with > an empty string. Instead, remove the trailing slash so that a nonempty > file name is passed in. This log message lacks the ChangeLog-style list of functions that are being changes, with short descriptions of the changes in each one. (Same problem with the second patch.) Also, please leave 2 spaces between sentences. > - (path (car (url-path-and-query obj))) > + (path (string-remove-suffix "/" (car (url-path-and-query obj)))) Please use directory-file-name here instead of string-remove-suffix. Btw, isn't it better to remove all the leading directories, leaving just the last component (a.k.a. the "basename")? > * lisp/net/eww.el (eww-download) > * doc/misc/eww.texi (Basics) This should tell what was changed in each function/node. See CONTRIBUTE, and the examples in the ChangeLog files in the tree. > +the current page. The file will be written to the directory specified ^^ Two spaces between sentences, please. > +in @code{eww-download-directory} (Default: @file{~/Downloads/}). The "Default" part should not be capitalized (it's not a separate sentence). Thanks.