From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64126: [PATCH] New command 'eww-copy-alternate-url' Date: Sat, 17 Jun 2023 16:07:07 +0300 Message-ID: <83a5wyqltw.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2526"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64126@debbugs.gnu.org To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 17 15:08:32 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qAVfM-0000Ui-9b for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Jun 2023 15:08:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAVeu-0003UI-Bm; Sat, 17 Jun 2023 09:08:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAVes-0003Tz-Hh for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 09:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAVes-0008Us-92 for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 09:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAVes-0002Pg-3l for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 09:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Jun 2023 13:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64126 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64126-submit@debbugs.gnu.org id=B64126.16870072389216 (code B ref 64126); Sat, 17 Jun 2023 13:08:02 +0000 Original-Received: (at 64126) by debbugs.gnu.org; 17 Jun 2023 13:07:18 +0000 Original-Received: from localhost ([127.0.0.1]:51020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAVeA-0002Oa-99 for submit@debbugs.gnu.org; Sat, 17 Jun 2023 09:07:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAVe6-0002O8-Bw for 64126@debbugs.gnu.org; Sat, 17 Jun 2023 09:07:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAVe0-0008Sb-Hc; Sat, 17 Jun 2023 09:07:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Ni87nxNZQ/ZxguRu2eTysiVG7nLJdL8M22QzHgafDk0=; b=aWZkxSMym1qB zpLEqbUK72ke+P3GrguKXVIOndM8sSisFPd13vtLFr2EDFLbaO4VEuf/5aQWz1QF19+VDy+GB2KX1 r2y9ycxY1u4qI3MwZB0mekHi75Tse+cnnkQeyRFHGp/6/EI7SQEwaYkFfe2vrCEaGtH0M2vnNv+Pv IPmB5/PfyL403JI8hNFUUKcclSuLNDf6eqdjr17sdbQK0ZZxzisgfJdPYq2VnUUfait/cNmRkKIZ5 UZe/C+bRCP4E2D0OpzMX4vQVHhcTujl0nF0CwjtC3m2IvK2v6gXRsjAR6XHaBmTCdATtxrchEtQAG E+AQYWJJFb79InCOPHWGFQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAVe0-0002pL-1Y; Sat, 17 Jun 2023 09:07:08 -0400 In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263534 Archived-At: > Date: Sat, 17 Jun 2023 14:07:40 +0300 > From: Eshel Yaron via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > This patch extends EWW with a command that grabs the URL of an alternate > link of the current page, such as an RSS or Atom feed. Thanks. > This adds a new command to EWW that copies an alternate link to the > currently visited page into the kill ring. This is useful for > subscribing to website feeds, etc.. ^^ Two periods, one of which is probably redunant. > +@findex eww-copy-alternate-url > +@kindex A > + The @kbd{A} command (@code{eww-copy-alternate-url}) copies the URL > +of an alternate link of the current page (such as an associated RSS > +feed) into the kill ring. If the page specifies multiple alternate > +links, this command prompt for one of them in the minibuffer. This doesn't say anything about what an "alternate link" could be, it just provides a single example. Since this is for the manual (as opposed to the doc string), there's no need to be so terse; we should instead explain more about what these alternate links are or could be, and give more than just a single example. Perhaps also tell how the alternate links are designated in HTML. > +*** New command 'eww-copy-alternate-url'. > +It copies an alternate link to the page currently visited in EWW into > +the kill ring. Searching the Internet for "alternate link" brings this: A type of hyperlink that gives alternate representations of the current document. Is this what is meant here? If so, why are you talking about RSS feeds? > +(defun eww-read-alternate-url () > + "Get the URL of an alternate link of this page. > + > +If there is just one alternate link, return it's URL. If there ^^^^ "its" > +are multiple alternate links, prompt for one in the minibuffer. I guess the prompt is with completion? If so, please mention that. > +(defun eww-copy-alternate-url () > + "Copy an alternate URL of the current page into the kill ring." This doc string says nothing at all about what an alternate link is. It should say at least something. > + (interactive nil eww-mode) > + (if-let ((url (eww-read-alternate-url))) > + (progn > + (kill-new url) > + (message "Copied %s to kill ring" url)) > + (user-error "No feeds found!"))) "No feeds"? Can the alternate link be something other than a feed? In any case, "No feeds found on this page!" is better, I think, as "No feeds!" is too general.