unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Nicholas Drozd <nicholasdrozd@gmail.com>
Cc: 34291@debbugs.gnu.org
Subject: bug#34291: Some EWW patches
Date: Sat, 02 Feb 2019 21:53:52 +0200	[thread overview]
Message-ID: <83d0oavuen.fsf@gnu.org> (raw)
In-Reply-To: <CABAiW0pZZWeh+kL+kc_HbRoEGjcMk4+94OygjP=KFVvZqyE2+Q@mail.gmail.com> (message from Nicholas Drozd on Sat, 2 Feb 2019 13:26:16 -0600)

> From: Nicholas Drozd <nicholasdrozd@gmail.com>
> 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.





  reply	other threads:[~2019-02-02 19:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-02 19:26 bug#34291: Some EWW patches Nicholas Drozd
2019-02-02 19:53 ` Eli Zaretskii [this message]
2019-02-05  0:26   ` Nicholas Drozd
2019-02-08  7:53     ` Eli Zaretskii

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=83d0oavuen.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34291@debbugs.gnu.org \
    --cc=nicholasdrozd@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).