bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34291: Some EWW patches


From: Nicholas Drozd
Subject: bug#34291: Some EWW patches
Date: Mon, 4 Feb 2019 18:26:49 -0600

Feel free to fix any remaining formatting / style issues.

On Sat, Feb 2, 2019 at 1:54 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > 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.

Attachment: 0002-Use-link-under-point-or-current-URL-for-eww-download.patch
Description: Text Data

Attachment: 0001-doc-misc-eww.texi-Basics-Fix-eww-manual-keybinding.patch
Description: Text Data

Attachment: 0003-lisp-net-eww.el-eww-download-callback-Fix-download-U.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]