Subject: bug#56907: closed (Re: bug#56907: [PATCH] * eww.el (eww-browse): Raise error if there are no arguments)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 04 Aug 2022 12:23:02 +0000

Your bug report

#56907: [PATCH] * eww.el (eww-browse): Raise error if there are no arguments

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
56907: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56907
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#56907: [PATCH] * eww.el (eww-browse): Raise error if there are no arguments
From: Philip Kaludercic <[email-masked]>
To: Lars Ingebrigtsen <[email-masked]>
Cc: [email-masked]
Date: Thu, 04 Aug 2022 12:22:00 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Lars Ingebrigtsen <[email-masked]> writes:

> Philip Kaludercic <[email-masked]> writes:
>
>> Subject: [PATCH] * eww.el (eww-browse): Raise error if there are no arguments
>
> Looks good to me; please go ahead and push.

Done.

Subject: [PATCH] * eww.el (eww-browse): Raise error if there are no arguments
From: Philip Kaludercic <[email-masked]>
To: [email-masked]
Date: Wed, 03 Aug 2022 10:37:40 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

If there are no command line arguments, then nil is passed to eww, and
eventually it is given to string-trim, that raises an apparently
unrelated error due to the missing string.

An alternative to this patch would be to unmark it as interactive, since
it appears to be meant for batch use.  I had initially confused it with
`eww-open-file'.

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6)
 of 2022-08-01 built on rhea
Repository revision: 47f1cae83c269ea43d6b208e055ce536c017856f
Repository branch: feature/package+vc
System Description: Fedora Linux 36 (Workstation Edition)

Configured using:
 'configure --with-pgtk --with-native-compilation --with-imagemagick'

>From 8b25634cb3f5a486632caa97e20bfe73fa55f37e Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <[email-masked]>
Date: Wed, 3 Aug 2022 12:34:53 +0200
Subject: [PATCH] * eww.el (eww-browse): Raise error if there are no arguments

---
 lisp/net/eww.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 4dbd5de2ef..bf256ec21f 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -349,6 +349,8 @@ eww-browse
 
 will start Emacs and browse the GNU web site."
   (interactive)
+  (unless command-line-args-left
+    (user-error "No URL given"))
   (eww (pop command-line-args-left)))

-- 
2.37.1