GNU bug report logs - #81013
[PATCH] Newsticker: add function to copy url of current item

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Joshua Murphy <joshuamurphy@HIDDEN>; Keywords: patch; dated Sun, 10 May 2026 18:40:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 81013 <at> debbugs.gnu.org:


Received: (at 81013) by debbugs.gnu.org; 6 Jun 2026 09:29:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 06 05:29:43 2026
Received: from localhost ([127.0.0.1]:36051 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wVnLa-0007yk-SF
	for submit <at> debbugs.gnu.org; Sat, 06 Jun 2026 05:29:43 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45522)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wVnLY-0007yS-RK
 for 81013 <at> debbugs.gnu.org; Sat, 06 Jun 2026 05:29:41 -0400
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 <eliz@HIDDEN>)
 id 1wVnLT-0005OM-Ge; Sat, 06 Jun 2026 05:29:35 -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=3ziP9dv+W0q0rH4pQKctW7Jqfc6iSSN3cWl6UnkaMwM=; b=UDA+Y5gUzmNM
 ChASSVGuQ5IDz7myD3MN1S9llmvHT8m7kJ8zH1zFT9EfDnOH3ywvXEQsDZQVVkRZNWQNu5jb/1e4o
 3c3BS51NzgksIUnJyJXngDGuHKbFMVl3Zmzsh+N0evQhNKE/TNbKuaw7yhBQzrTgiWG+g7rkceH2K
 3kFHefBDPoZw/cGtWzHpngqiaXqyHgiz149LvOKLc2Jppp89T/ZnePT1j8qR48rPh7E6+rTRO8H46
 s75rzg0ihJ82hPcbWG47CjnTeezhjQJI9Wmz6kuFqnvtO+t+sl44V5BpUAR3amhyt5LFMFl8flpzO
 9+gdvmq7wr7LIdNjne9JbA==;
Date: Sat, 06 Jun 2026 12:29:32 +0300
Message-Id: <86pl24koeb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: ulf.jasper@HIDDEN, Joshua Murphy <joshuamurphy@HIDDEN>
In-Reply-To: <8733zj8ifx.fsf@HIDDEN> (message from Joshua Murphy on Fri,
 22 May 2026 17:25:57 +0000)
Subject: Re: bug#81013: [PATCH] Newsticker: add function to copy url of
 current item
References: <874ikft8ll.fsf@HIDDEN> <87ecjgzb2p.fsf@HIDDEN>
 <86v7cn4o0q.fsf@HIDDEN> <8733zj8ifx.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81013
Cc: 81013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ping!  Ulf, any comments?

> From: Joshua Murphy <joshuamurphy@HIDDEN>
> Cc: Ulf Jasper <ulf.jasper@HIDDEN>,  81013 <at> debbugs.gnu.org
> Date: Fri, 22 May 2026 17:25:57 +0000
> 
> Here's a properly formatted version of the patch.
> I also added an entry for it in etc/NEWS.
> 
> >From ab44f8dac9f49e94614eefa8144ea699d340feec Mon Sep 17 00:00:00 2001
> From: Joshua Murphy <joshuamurphy@HIDDEN>
> Date: Sat, 16 May 2026 14:02:57 -0400
> Subject: [PATCH] Add function to copy url of newsticker item
> 
> * lisp/net/newst-treeview.el (newsticker-treeview-copy-url):
> Allow copying selected url
> (newsticker-treeview-mode-map): Add binding
> * etc/NEWS: Document function
> ---
>  etc/NEWS                   |  5 +++++
>  lisp/net/newst-treeview.el | 10 ++++++++++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/etc/NEWS b/etc/NEWS
> index 0c221d049e0..d5ce1a6f5ec 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -3775,6 +3775,11 @@ The new commands 'newsticker-hide-old-feed-header' and
>  respectively, hide and show the headers of feeds whose items are all old
>  or obsolete.
>  
> +---
> +*** New command to copy the URL of the selected newsticker item.
> +The new command 'newsticker-copy-url', bound to 'w', adds the URL of
> +the currently selected item in the list view to the kill-ring.
> +
>  ** CPerl mode
>  
>  *** Syntax of Perl up to version 5.42 is supported.
> diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
> index 04d796b0b90..dcf2788a4bd 100644
> --- a/lisp/net/newst-treeview.el
> +++ b/lisp/net/newst-treeview.el
> @@ -1191,6 +1191,15 @@ Arguments are ignored."
>          (if newsticker-automatically-mark-visited-items-as-old
>              (newsticker-treeview-mark-item-old))))))
>  
> +(defun newsticker-treeview-copy-url ()
> +  "Copy the url for the current item."
> +  (interactive)
> +  (let ((url (url-encode-url
> +              (newsticker--link
> +               (newsticker--treeview-get-selected-item)))))
> +    (kill-new url)
> +    (message "Copied %s" url)))
> +
>  (defun newsticker--treeview-buffer-init ()
>    "Initialize all treeview buffers."
>    (setq newsticker--treeview-buffers nil)
> @@ -2038,6 +2047,7 @@ Return t if groups have changed, nil otherwise."
>    "s"          #'newsticker-treeview-save
>    "u"          #'newsticker-treeview-update
>    "v"          #'newsticker-treeview-browse-url
> +  "w"          #'newsticker-treeview-copy-url
>    ;;"C-j"      #'newsticker-treeview-scroll-item
>    ;;"RET"      #'newsticker-treeview-scroll-item
>    "M-m"        #'newsticker-group-move-feed
> -- 
> 2.54.0
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81013; Package emacs. Full text available.

Message received at 81013 <at> debbugs.gnu.org:


Received: (at 81013) by debbugs.gnu.org; 22 May 2026 17:26:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 13:26:08 2026
Received: from localhost ([127.0.0.1]:58436 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wQTdP-0007ug-Vi
	for submit <at> debbugs.gnu.org; Fri, 22 May 2026 13:26:08 -0400
Received: from mout01.posteo.de ([185.67.36.65]:56919)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <joshuamurphy@HIDDEN>)
 id 1wQTdL-0007tm-Hk
 for 81013 <at> debbugs.gnu.org; Fri, 22 May 2026 13:26:05 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 58B68240027
 for <81013 <at> debbugs.gnu.org>; Fri, 22 May 2026 19:25:57 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017;
 t=1779470757; bh=TYUFHsw6bVpyfXzKNTMN3qiiiVSidN2IEuvXIplP6eo=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=OZ9QpHE4VHy2XU8WywOVw7UM5LWN3HpAGbg6QPBhQ4RiP6O2OVOWBePxFfjh8hF17
 ZH3VdioCjrc2ZA/Z1fYaqDxKOvr9pNwjQrNlS5LfdV1EhJKBFXstq2wYqSxWJolvlD
 g4fE3HYJoqqcX4GrtAeUTajdJQHPss0IlTdr5iDJG2rz+/bu2gI2ziv8nDyZEwfnIt
 iPzr8Ju7ykkLTGPI2V1hVW1Ze9f2JUevoSkmZVJiVqBOyJ7vejwTlXs9hu2AzWqZF/
 phpG6wmtJhI0f/TgWcMEegUIRMw0csGKXgiX0mbtIQUDSwxuzExOgtkHTO3E8hE/MN
 SrWrTceoyqAXQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4gMXHS2rgtz6tsf;
 Fri, 22 May 2026 19:25:56 +0200 (CEST)
From: Joshua Murphy <joshuamurphy@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#81013: [PATCH] Newsticker: add function to copy url of
 current item
In-Reply-To: <86v7cn4o0q.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 16 May
 2026 14:00:53 +0300")
References: <874ikft8ll.fsf@HIDDEN> <87ecjgzb2p.fsf@HIDDEN>
 <86v7cn4o0q.fsf@HIDDEN>
Date: Fri, 22 May 2026 17:25:57 +0000
Message-ID: <8733zj8ifx.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81013
Cc: Ulf Jasper <ulf.jasper@HIDDEN>, 81013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Here's a properly formatted version of the patch.
I also added an entry for it in etc/NEWS.

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Add-function-to-copy-url-of-newsticker-item.patch
Content-Description: formatted patch

From ab44f8dac9f49e94614eefa8144ea699d340feec Mon Sep 17 00:00:00 2001
From: Joshua Murphy <joshuamurphy@HIDDEN>
Date: Sat, 16 May 2026 14:02:57 -0400
Subject: [PATCH] Add function to copy url of newsticker item

* lisp/net/newst-treeview.el (newsticker-treeview-copy-url):
Allow copying selected url
(newsticker-treeview-mode-map): Add binding
* etc/NEWS: Document function
---
 etc/NEWS                   |  5 +++++
 lisp/net/newst-treeview.el | 10 ++++++++++
 2 files changed, 15 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index 0c221d049e0..d5ce1a6f5ec 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -3775,6 +3775,11 @@ The new commands 'newsticker-hide-old-feed-header' and
 respectively, hide and show the headers of feeds whose items are all old
 or obsolete.
 
+---
+*** New command to copy the URL of the selected newsticker item.
+The new command 'newsticker-copy-url', bound to 'w', adds the URL of
+the currently selected item in the list view to the kill-ring.
+
 ** CPerl mode
 
 *** Syntax of Perl up to version 5.42 is supported.
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index 04d796b0b90..dcf2788a4bd 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -1191,6 +1191,15 @@ Arguments are ignored."
         (if newsticker-automatically-mark-visited-items-as-old
             (newsticker-treeview-mark-item-old))))))
 
+(defun newsticker-treeview-copy-url ()
+  "Copy the url for the current item."
+  (interactive)
+  (let ((url (url-encode-url
+              (newsticker--link
+               (newsticker--treeview-get-selected-item)))))
+    (kill-new url)
+    (message "Copied %s" url)))
+
 (defun newsticker--treeview-buffer-init ()
   "Initialize all treeview buffers."
   (setq newsticker--treeview-buffers nil)
@@ -2038,6 +2047,7 @@ Return t if groups have changed, nil otherwise."
   "s"          #'newsticker-treeview-save
   "u"          #'newsticker-treeview-update
   "v"          #'newsticker-treeview-browse-url
+  "w"          #'newsticker-treeview-copy-url
   ;;"C-j"      #'newsticker-treeview-scroll-item
   ;;"RET"      #'newsticker-treeview-scroll-item
   "M-m"        #'newsticker-group-move-feed
-- 
2.54.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81013; Package emacs. Full text available.

Message received at 81013 <at> debbugs.gnu.org:


Received: (at 81013) by debbugs.gnu.org; 16 May 2026 11:01:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 16 07:01:04 2026
Received: from localhost ([127.0.0.1]:57324 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wOClT-0001ia-MO
	for submit <at> debbugs.gnu.org; Sat, 16 May 2026 07:01:04 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56170)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wOClS-0001hr-9X
 for 81013 <at> debbugs.gnu.org; Sat, 16 May 2026 07:01:02 -0400
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 <eliz@HIDDEN>)
 id 1wOClM-0002vZ-0N; Sat, 16 May 2026 07:00:56 -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=UKIfBdf7mHTxw4JL9yNUWppugZyAgc6CdYXyPMZ0UvY=; b=PItNu6kupMpW
 gmvRcpp0OOnkVF3Mzt43fZBG+LfSlS8xMlZAwhksHfgQIaeWIhyqkAzYfO2NOPx8GO7F2irr8j/0v
 VcNzfN+zsPB7ZqURqTtcfE3iJXazgH5ZfHdNtBITQeFh8/wE8Y3p8InUCkvHuVPwyyDmrnP7x5QyY
 5ZQF4tQWtEDOV1sa9f3bVFnbANjwawRV+tIdz2Uln3d8/2f82n1rnsHxUXyasvbUxL7rYcSd4/4yw
 Roo/pFoGD7T3474TB0MKlLmGtNqV/VtCdcBqfajJzudBYy94tk+ALhNpTCCYSA34htLg0+BcJL/S3
 KUbaoIGqzTg+M0vYb0LuCg==;
Date: Sat, 16 May 2026 14:00:53 +0300
Message-Id: <86v7cn4o0q.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Joshua Murphy <joshuamurphy@HIDDEN>, Ulf Jasper <ulf.jasper@HIDDEN>
In-Reply-To: <87ecjgzb2p.fsf@HIDDEN> (message from Joshua Murphy on Tue,
 12 May 2026 19:27:57 +0000)
Subject: Re: bug#81013: [PATCH] Newsticker: add function to copy url of current
 item
References: <874ikft8ll.fsf@HIDDEN> <87ecjgzb2p.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81013
Cc: 81013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Joshua Murphy <joshuamurphy@HIDDEN>
> Date: Tue, 12 May 2026 19:27:57 +0000
> 
> Apparently `newsticker--link' exists, so we can
> use that instead of caddr.
> 
> Attached is the version that does that.

Adding Ulf to the discussion.

> diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
> index 04d796b0b90..3d4ddb01ae7 100644
> --- a/lisp/net/newst-treeview.el
> +++ b/lisp/net/newst-treeview.el
> @@ -1191,6 +1191,15 @@ Arguments are ignored."
>          (if newsticker-automatically-mark-visited-items-as-old
>              (newsticker-treeview-mark-item-old))))))
>  
> +(defun newsticker-treeview-copy-url ()
> +  "Copy the url for the current item."
> +  (interactive)
> +  (let ((url (url-encode-url
> +              (newsticker--link
> +               (newsticker--treeview-get-selected-item)))))
> +    (kill-new url)
> +    (message "Copied %s" url)))
> +
>  (defun newsticker--treeview-buffer-init ()
>    "Initialize all treeview buffers."
>    (setq newsticker--treeview-buffers nil)
> @@ -2038,6 +2049,7 @@ Return t if groups have changed, nil otherwise."
>    "s"          #'newsticker-treeview-save
>    "u"          #'newsticker-treeview-update
>    "v"          #'newsticker-treeview-browse-url
> +  "w"          #'newsticker-treeview-copy-url
>    ;;"C-j"      #'newsticker-treeview-scroll-item
>    ;;"RET"      #'newsticker-treeview-scroll-item
>    "M-m"        #'newsticker-group-move-feed




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81013; Package emacs. Full text available.

Message received at 81013 <at> debbugs.gnu.org:


Received: (at 81013) by debbugs.gnu.org; 12 May 2026 19:28:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 15:28:12 2026
Received: from localhost ([127.0.0.1]:38724 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wMsm2-00025p-1o
	for submit <at> debbugs.gnu.org; Tue, 12 May 2026 15:28:12 -0400
Received: from mout01.posteo.de ([185.67.36.65]:47753)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <joshuamurphy@HIDDEN>)
 id 1wMslx-00024A-7B
 for 81013 <at> debbugs.gnu.org; Tue, 12 May 2026 15:28:08 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 3092E240027
 for <81013 <at> debbugs.gnu.org>; Tue, 12 May 2026 21:27:58 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017;
 t=1778614078; bh=0EVZVipRRFa188l6JJNEfk3JikkIo2BsQv0YNB2Z2B0=;
 h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From;
 b=Hmq277Grj29hzBNDs1nzRsH+xJHQO5NG592jiemRgtWl+YF2P4zFanusDDMbysT0t
 h2CE4dSylsBKzNSKw7QYSzpdXcrXGzEbN+KRrlrhXiDvLICKuxRkP4Axl/8iMjBEZ6
 vbEb58IhTrZzvjejAqI46DnfaMLpOdlLZsycwNjn1qXS3tT2ONpzk7q1939CaikbJS
 gc+qN/EXmB/eNkh7UBtDjcTGCUVLdDjHrItCVTNQo0faYxVh/RnH4tnPtkEaAEoXQ1
 WEYaMqaPbCs0c69tI+P8J6VvijtMB+3IvorNnytuid6OTT53X+2i34zs8PxvsDHOWj
 3rJRYK0h6HOEg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4gFRSs447lz6tsb
 for <81013 <at> debbugs.gnu.org>; Tue, 12 May 2026 21:27:57 +0200 (CEST)
From: Joshua Murphy <joshuamurphy@HIDDEN>
To: 81013 <at> debbugs.gnu.org
Subject: Re: bug#81013: [PATCH] Newsticker: add function to copy url of
 current item
Date: Tue, 12 May 2026 19:27:57 +0000
Message-ID: <87ecjgzb2p.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81013
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Apparently `newsticker--link' exists, so we can
use that instead of caddr.

Attached is the version that does that.

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=newsticker-copy-url.patch
Content-Description: without caddr

diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index 04d796b0b90..3d4ddb01ae7 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -1191,6 +1191,15 @@ Arguments are ignored."
         (if newsticker-automatically-mark-visited-items-as-old
             (newsticker-treeview-mark-item-old))))))
 
+(defun newsticker-treeview-copy-url ()
+  "Copy the url for the current item."
+  (interactive)
+  (let ((url (url-encode-url
+              (newsticker--link
+               (newsticker--treeview-get-selected-item)))))
+    (kill-new url)
+    (message "Copied %s" url)))
+
 (defun newsticker--treeview-buffer-init ()
   "Initialize all treeview buffers."
   (setq newsticker--treeview-buffers nil)
@@ -2038,6 +2049,7 @@ Return t if groups have changed, nil otherwise."
   "s"          #'newsticker-treeview-save
   "u"          #'newsticker-treeview-update
   "v"          #'newsticker-treeview-browse-url
+  "w"          #'newsticker-treeview-copy-url
   ;;"C-j"      #'newsticker-treeview-scroll-item
   ;;"RET"      #'newsticker-treeview-scroll-item
   "M-m"        #'newsticker-group-move-feed

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81013; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 May 2026 18:39:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 10 14:39:21 2026
Received: from localhost ([127.0.0.1]:39473 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wM93f-00075d-Pe
	for submit <at> debbugs.gnu.org; Sun, 10 May 2026 14:39:21 -0400
Received: from lists1p.gnu.org ([2001:470:142::17]:50728)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <joshuamurphy@HIDDEN>)
 id 1wM93d-00073m-8Q
 for submit <at> debbugs.gnu.org; Sun, 10 May 2026 14:39:18 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <joshuamurphy@HIDDEN>)
 id 1wM93M-0007vC-2l
 for bug-gnu-emacs@HIDDEN; Sun, 10 May 2026 14:39:00 -0400
Received: from mout02.posteo.de ([185.67.36.66])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <joshuamurphy@HIDDEN>)
 id 1wM93K-0003q4-5v
 for bug-gnu-emacs@HIDDEN; Sun, 10 May 2026 14:38:59 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id AECC0240101
 for <bug-gnu-emacs@HIDDEN>; Sun, 10 May 2026 20:38:54 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017;
 t=1778438334; bh=H9LO6e25NbqHRjT5Q/AQOayemWWszph51hvPYMpUR/M=;
 h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From;
 b=iSHF+xZLeaYn7VMbfFixWescw5JK1akNGB5V0PRhmIyZ7kChP+VG+W8q4bC2JQhBv
 mtrERfCKmFFG6f9SamtCRFYuuTpuOcMJ0PCM2t0L4KtLr1k9M09YkRgNOYSWsQJV9+
 6kvnbYuW6MolkwCJEQItvcZJhjmrnQSUZ9LjLGRslL4stQ7xcgrMdLvWJqZGblCP3I
 4ehmK+17w2m8Z2F+Hl4xnbQKCHfHxKUDTCnBpGBzz3iQgdUvnKfJkSwPvRIEwDR5lP
 zH1sDBM/IjIEGd2RdpVOur23W2CUTM757dFA0HUGEM/kiaE9FHuRAgDVcayDfySLht
 YnJNE0R3UStWQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4gDBT96z5Vz6trs
 for <bug-gnu-emacs@HIDDEN>; Sun, 10 May 2026 20:38:53 +0200 (CEST)
From: Joshua Murphy <joshuamurphy@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Newsticker: add function to copy url of current item
Date: Sun, 10 May 2026 18:38:54 +0000
Message-ID: <874ikft8ll.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=185.67.36.66;
 envelope-from=joshuamurphy@HIDDEN; helo=mout02.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain

This adds a new function `newsticker-treeview-copy-url' and
a bind of 'w' for it that allows copying the url of the currently
selected item.

If there's an actual function to get the url of the item from
`newsticker-treeview--get-selected-item' rather than getting
the caddr let me know, I didn't see one.

I used 'w' for the bind because that seems to be commonly used for
kill/copy actions.

-- 
Joshua Murphy
joshuamurphy@HIDDEN

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=newsticker-copy-url.patch
Content-Description: copy-url patch

diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index 04d796b0b90..513a20f8168 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -1191,6 +1191,14 @@ Arguments are ignored."
         (if newsticker-automatically-mark-visited-items-as-old
             (newsticker-treeview-mark-item-old))))))
 
+(defun newsticker-treeview-copy-url ()
+  "Copy the url for the current item."
+  (interactive)
+  (let ((url (url-encode-url
+              (caddr (newsticker--treeview-get-selected-item)))))
+    (kill-new url)
+    (message "Copied %s" url)))
+
 (defun newsticker--treeview-buffer-init ()
   "Initialize all treeview buffers."
   (setq newsticker--treeview-buffers nil)
@@ -2038,6 +2048,7 @@ Return t if groups have changed, nil otherwise."
   "s"          #'newsticker-treeview-save
   "u"          #'newsticker-treeview-update
   "v"          #'newsticker-treeview-browse-url
+  "w"          #'newsticker-treeview-copy-url
   ;;"C-j"      #'newsticker-treeview-scroll-item
   ;;"RET"      #'newsticker-treeview-scroll-item
   "M-m"        #'newsticker-group-move-feed

--=-=-=--




Acknowledgement sent to Joshua Murphy <joshuamurphy@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#81013; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 6 Jun 2026 09:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.