bug#34291: Some EWW patches

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#34291: Some EWW patches

Nicholas Drozd
One doc fix, one minor feature, one minor bug fix.

Let me know if these attachments are a problem, and I can send the
text of the patches individually.

0003-lisp-net-eww.el-eww-download-callback-Fix-download-U.patch (1K) Download Attachment
0001-doc-misc-eww.texi-Basics-Fix-eww-manual-keybinding.patch (1K) Download Attachment
0002-eww-download-Use-link-under-point-or-current-URL.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#34291: Some EWW patches

Eli Zaretskii
> From: Nicholas Drozd <[hidden email]>
> 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 | Threaded
Open this post in threaded view
|

bug#34291: Some EWW patches

Nicholas Drozd
Feel free to fix any remaining formatting / style issues.

On Sat, Feb 2, 2019 at 1:54 PM Eli Zaretskii <[hidden email]> wrote:

>
> > From: Nicholas Drozd <[hidden email]>
> > 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.

0002-Use-link-under-point-or-current-URL-for-eww-download.patch (2K) Download Attachment
0001-doc-misc-eww.texi-Basics-Fix-eww-manual-keybinding.patch (1K) Download Attachment
0003-lisp-net-eww.el-eww-download-callback-Fix-download-U.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#34291: Some EWW patches

Eli Zaretskii
> From: Nicholas Drozd <[hidden email]>
> Date: Mon, 4 Feb 2019 18:26:49 -0600
> Cc: [hidden email]
>
> Feel free to fix any remaining formatting / style issues.

Done.  Please note that user-visible changes in behavior (PATCH 1/3
below) should also be called out in NEWS.

Closing the bug report.  Thanks for working on this.