GNU bug report logs - #81552
[PATCH] Fix handling of spaces for webjump's Wikipedia query

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: Perry Fraser <perry@HIDDEN>; Keywords: patch; Done: Sean Whitton <spwhitton@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 81552-done <at> debbugs.gnu.org:


Received: (at 81552-done) by debbugs.gnu.org; 6 Aug 2026 11:26:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 06 07:26:16 2026
Received: from localhost ([127.0.0.1]:33598 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrwEq-00051K-3e
	for submit <at> debbugs.gnu.org; Thu, 06 Aug 2026 07:26:16 -0400
Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]:32941)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wrwEn-000515-Np
 for 81552-done <at> debbugs.gnu.org; Thu, 06 Aug 2026 07:26:14 -0400
Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45])
 by mailfout.phl.internal (Postfix) with ESMTP id 728CDEC087D;
 Thu,  6 Aug 2026 07:26:08 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-05.internal (MEProxy); Thu, 06 Aug 2026 07:26:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786015568; x=
 1786101968; bh=NqqCzNG0wEFkaGM0RyhMnHWCB15D6kghiCy64cecyjY=; b=g
 1DjoJsMXWImOavIIMPjAzPKWnzg0m45C+8V3h3abnFe7hmxOycHBuO6uHdZ6MnGE
 OTpV3O8EM7LalS1JYwbwc0D8BZZ8EaT2NMSCwP9KD1ri+ww5lNwGcr0uozDdsLgi
 f3i9FOA/27kj1AC1N2pZ5Zutvq9E+wvG9kP0IURsJy9CeboHpUA34TlWQNLHJJIv
 IIQ1kQchvY/UHMDHzobmrFPGWnAGWDX4qeZya4PyRdjLzZFlCWE03j9gYK3vmn3v
 IJBD+CnTHxpDGQFPGY9k53P4XRhetq0ZGUlMjBTRJyv7aqX8Q+izfQX2pzUbLwu1
 Nk7RHo2kBd0Hqb+cLgHsg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786015568; x=1786101968; bh=NqqCzNG0wEFkaGM0RyhMnHWCB15D6kghiCy
 64cecyjY=; b=D2myd99qyBJPv6juoRJSGSzrMJhPcg2jivJHKvv8K1dls+0WhkV
 1Hrk2rqJ3Y4tkODio479B2nbHdluDVaXNFcolR8/54ZXFgCqyyoOAuKFdbWT2HNq
 f42zpbI1dddtKLklJ0UPxUFOVAglNYtykXpL5zcTE+33Dk9jruGRLVUYm0WXLERh
 QgT4kmpjLu07BEqWrktMstPOjfp0cew4Pjhu0yYr4hcAXLxOTbHxD4ygeHmToojo
 ct99ljjtXl4FtTvdvUupnVsQChtd6h+qEv/jP8xGwrOXCoSTtU56eHCcJbJ4F0Rz
 UCr3yxJIu7NaqKFZeu1qoFRb3poGdhZUvhQ==
X-ME-Sender: <xms:T290av1K0Qz3Ftiio4spRJ8iny1DzdTucCyZeSovXUhnW0w9livVkQ>
 <xme:T290akHbS96eDiXuKguelkJyOZ9vyX5H8ldi3rK4GqLfvT9ammbAYHtC6SVrMXxvJ
 1hoGMyDvD28hgtjAGLzywQlrLV_uQWxwkzmShmJYhB6gxLXuj9bbQ>
X-ME-Received: <xmr:T290ati2fX9Fu8MTkKsH9oQ4trcBOhR0m7mPvzA_7xV73BJKC1-tBzvl3ToVu37L9BZ9tvo9R0kunhFa5vHzPDRRiVSVDA>
X-ME-Proxy-Cause: dmFkZTGPFDwaZ+n17e983ZcuQUOCG2/ZN9ANlaU+t3qJfc8Yt3cbpfpohxVGTA0nIc8sCf
 hCblpnU7YjRcTvSB6+cWD55kF4UAypQyQmqFz9oBsAeaOI13fu/Tkwmeci0iOzi1FLE1/H
 Y2Q30STsf2qLAs9VBVK4I4rzZopKSwg6L5MlqFYk06QxYJ2x7HFHYYA3CvaB5DBXRZZezp
 LNnBWDLypRfe4pYaa1SyAvSP0M/e7t4HqkGdDIpGAKMBdeX00XIbC2VccScgmq3nVzIxKn
 kADN82eagjO53Ltn5OSiZr7R+/GW7Vjuza88TZqMn5XRCfrbmS2F+SCrMwvmmVJWRDbxQg
 +Tc3CCK86a7O+7+2XBfvohRoQIbolIrD34oXs1KUPfj550huQR19wZxui92psmuiRKCdSM
 27Keqj/jzfoYtNznqrUIrkkVIZhGkrpSlI3dSNR7aU1qd8yzKKsltoTURM+qDwFj8csNou
 vY7EvxNHltvYCYSR3WQ2GThs4zcao/kXRGUF0zhSgDPugWyayK0x4jszAQt/NUTPeniesW
 nQnyO6sXxQQ3dRDhXPpi+Dhy8p14A1N/h2ocvSRqZpxMSMfTn4mENnDTuWRlaVs+1Bp+xd
 XyMQNKhqcaBbUgOJfS++ZlX1y2yi6unkiZtWYShWwen8ENEiLBtAdv6jHowQ
X-ME-Proxy: <xmx:T290av8yx0G4EpAx4hNyags3xbskOFYDCWaxIKiB0ubuSHUV6T7S9w>
 <xmx:T290akpOfAgTFylfTbiLKudf6qWMrhktyBBJE56I8Ba6UmT9FesZdQ>
 <xmx:T290au-8E0ERkA6nzm3fAsRQRxWYUWN8SM71Kg5l8qh20-I0GY3zaQ>
 <xmx:T290aoXeDrtyb1JWwT27nBYpIoF2K8IrrsI-0Vrg2H9Yg_qkX4KHLg>
 <xmx:UG90aodswZKugsn4bdm-A0m75SjtmbGPY0PR4ZeOweg7s1VEFikxw3c_>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 6 Aug 2026 07:26:07 -0400 (EDT)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 56BDD9411D2; Thu, 06 Aug 2026 12:26:02 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Perry Fraser <perry@HIDDEN>
Subject: Re: bug#81552: [PATCH] Fix handling of spaces for webjump's
 Wikipedia query
In-Reply-To: <m2mrv01sch.fsf@HIDDEN>
References: <m2ldalppk2.fsf@HIDDEN>
 <875x1od9mz.fsf@HIDDEN> <m2se4s1vsq.fsf@HIDDEN>
 <87o6fg8wav.fsf@HIDDEN> <m2mrv01sch.fsf@HIDDEN>
Date: Thu, 06 Aug 2026 12:26:02 +0100
Message-ID: <87fr0r1odx.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81552-done
Cc: 81552-done <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: -1.7 (-)

Version: 32.1

Perry Fraser [05/Aug 11:48am -04] wrote:
> In the process of explaining a decision you make, do you ever end up
> stumbling upon a /way/ better solution to a problem? I was about to
> mention in an aside that an alternative would've been using the
> `/w/index.php?search=' syntax... which would mean we can just use
> normal query parameter encoding anyway. Oops. :)

Of course!

> Massively simplified patch attached!

Installed, thanks!

-- 
Sean Whitton




Notification sent to Perry Fraser <perry@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Sean Whitton <spwhitton@HIDDEN>:
You have taken responsibility. Full text available.

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


Received: (at 81552) by debbugs.gnu.org; 5 Aug 2026 15:48:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 05 11:48:27 2026
Received: from localhost ([127.0.0.1]:52234 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrdr0-0008NE-Ek
	for submit <at> debbugs.gnu.org; Wed, 05 Aug 2026 11:48:26 -0400
Received: from qs-2004f-snip6-11.eps.apple.com ([2a01:b747:3006:206::3f]:8854
 helo=outbound.qs.icloud.com)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <perry@HIDDEN>) id 1wrdqy-0008My-7c
 for 81552 <at> debbugs.gnu.org; Wed, 05 Aug 2026 11:48:25 -0400
Received: from outbound.qs.icloud.com (unknown [127.0.0.2])
 by p00-icloudmta-asmtp-us-east-2d-60-percent-3 (Postfix) with ESMTPS id
 3936E180017E; Wed, 05 Aug 2026 15:48:15 +0000 (UTC)
X-ICL-RepId: 019fd29c-7245-717a-9a74-05d49a6ca32f
X-ICL-Out-Info: HUtFAUMHWwJACUgATUQeDx5WFlZNRAJCTQhIC0MCWRxICFYBXQVLVxQECFYfRRJyFksZQAhFGBwfSx8TC1NWVAJYC1YfREVdAl5YQQ4KWRIYXBRcUFgeRhJWDV0JGRpBXlAbXwJCDxwTVhUTHUMZDysISgRDB0UCXgslEwlTVlQCWAtWH0RFXQJeWF4EU1YOHQsVQRsHWkETUVZVHlErVAJYC1YfREVdAl5GExlOG1dNWg1AGVgGbRRWFVIEWQ==
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=frasers.org; s=sig1;
 t=1785944898; x=1788536898; bh=imlFT52beOIV/+41ryJMYHPD+iTFQQNLQ5vY7s1xo0E=;
 h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:x-icloud-hme;
 b=n69f2nZjUVGvd5zqovxJP3VfzqWR72T1Bt+mUfhdfzEJP1ZqrYgSSuYvwJdpHohvrRiin3njXX5MkqenQ7pZVGsAmfqx4mT8W1kF4LtWDHRsQamwOXBr/41BarGvnr3lb6TFw8+3wMy2KCssilsXLKON2/cuK5xU9vKwpSSD8DmXOqHPqeBeVHqjsxqoc/LYeI4RpmZb9Uw6a+CoN8SuphZITIC4L578r6YK1qM46bH6xirTd95ROWjgrA/cE/MMAJoXU+iZWJ99qUKMdRQsOPoMh0ctmKwG2nnZvOlJSYXZ0zi2SGb+0UzgOk3JhB4Kr4aTwrBgReZfZj0ZJn1+rw==
mail-alias-created-date: 1604598926000
Received: from localhost (unknown [17.57.155.37])
 by p00-icloudmta-asmtp-us-east-2d-60-percent-3 (Postfix) with ESMTPSA id
 229701800179; Wed, 05 Aug 2026 15:48:15 +0000 (UTC)
From: Perry Fraser <perry@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81552: [PATCH] Fix handling of spaces for webjump's
 Wikipedia query
In-Reply-To: <87o6fg8wav.fsf@HIDDEN>
References: <m2ldalppk2.fsf@HIDDEN>
 <875x1od9mz.fsf@HIDDEN> <m2se4s1vsq.fsf@HIDDEN>
 <87o6fg8wav.fsf@HIDDEN>
User-Agent: mu4e 1.14.2; emacs 32.0.50
Date: Wed, 05 Aug 2026 11:48:14 -0400
Message-ID: <m2mrv01sch.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Authority-Info-Out: v=2.4 cv=S/XUAYsP c=1 sm=1 tr=0 ts=6a735b40
 cx=c_apl:c_pps:t_out a=bsP7O+dXZ5uKcj+dsLqiMw==:117
 a=bsP7O+dXZ5uKcj+dsLqiMw==:17 a=9CJiANNiRzwt_EJx:21 a=Sv0fKeRqtYgA:10
 a=VkNPw1HP01LnGYTKEx00:22 a=9UZFY6S4AAAA:8 a=PXBfMmWJI2OoQGKsx50A:9
 a=QEXdDO2ut3YA:10 a=rznGKMDfcp432bGSPGsA:9 a=UK0zECyJsSLad8jMn5GP:22
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODA1MDEyOCBTYWx0ZWRfX1sLZ9K3gnv8C
 iABl1wFP9bhC5EBJehqyn9sEzPGPSVZK1XM9WJQFsHL48TzurawqlNcIBwXRiIwn7IJ+WwuOjAW
 nle0zh8P0zPPX6FL/7snHV8oz08/kSR6j983AQKdiLy2Glk7f/uhWgWm26wxPX4JS+uNJFrS/9t
 FK6zp7k7Yh7jGbwmtU8rAirSk0ejcxij/ykaMy+PLEnwz2srl75LEMeac6kgkCalzMvNstKnMLZ
 Rm6COaUkjVhkGgVx3+dGnjPWBnijD43BeJ2PP1YzrMEo2iKmETl0PqZww2DGSadjr8hpyaQGqzJ
 AqLpAh3uwMNdrdQkmFypJ9mW5j2VWoBSzj52WO8psSRHnWXnJvODuaG2qRQ1Zs=
X-Proofpoint-GUID: NtdL6_jP3H1kyRPIui2q8ksPPX9pcCGe
X-Proofpoint-ORIG-GUID: NtdL6_jP3H1kyRPIui2q8ksPPX9pcCGe
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 81552
Cc: 81552 <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: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Sean Whitton <spwhitton@HIDDEN> writes:

> Perry Fraser [05/Aug 10:33am -04] wrote:
>> Sean Whitton <spwhitton@HIDDEN> writes:
>>
>>> Perry Fraser [04/Aug  5:02pm -04] wrote:
>>>> From 1a0e57c09514f1469ebf858e649d8ceb27477543 Mon Sep 17 00:00:00 2001
>>>> From: Perry Fraser <perry@HIDDEN>
>>>> Date: Tue, 4 Aug 2026 16:29:27 -0400
>>>> Subject: [PATCH] Fix webjump's encoding of spaces for Wikipedia
>>>>
>>>> Wikipedia expects spaces to be encoded as underscores rather than
>>>> pluses, so give it a site function that wraps
>>>> `webjump-do-simple-query' and makes that replacement. Also adjust
>>>> its URL to use Special:Search which will redirect to a search
>>>> page if the query doesn't match an existing article.
>>>
>>> We prefer things like this to be in code comments instead of in the
>>> commit message.
>>
>> Interesting=E2=80=94that definitely goes against my normal instinct. For
>> example, the note about changing to using `Special:Search', it
>> wouldn't make sense to leave that as a comment. In my mind that
>> belongs in the commit message.
>
> If it truly about why we had to *change* it rather than the content of
> the code before or after, then it can go in the commit.
>
> In this case using Special:Search at all seems like something worth
> explaining in a comment.

In the process of explaining a decision you make, do you ever end up
stumbling upon a /way/ better solution to a problem? I was about to
mention in an aside that an alternative would've been using the
`/w/index.php?search=3D' syntax... which would mean we can just use
normal query parameter encoding anyway. Oops. :)

Massively simplified patch attached!

Thanks,

=E2=80=95 Perry

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-lisp-net-webjump.el-webjump-sample-sites-Fix-Wikiped.patch

From 1866c4c731dfab27624920c34fdbb5de9c0d1c86 Mon Sep 17 00:00:00 2001
From: Perry Fraser <perry@HIDDEN>
Date: Tue, 4 Aug 2026 16:29:27 -0400
Subject: [PATCH] * lisp/net/webjump.el (webjump-sample-sites): Fix Wikipedia's
 query

Copyright-paperwork-exempt: yes
---
 lisp/net/webjump.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index 709f58b88a5..c2f49f9f9ea 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -110,7 +110,8 @@ webjump-sample-sites
      [simple-query "https://duckduckgo.com"
 		   "https://duckduckgo.com/?q=" ""])
     ("Wikipedia" .
-     [simple-query "https://wikipedia.org" "https://wikipedia.org/wiki/" ""])
+     [simple-query "https://wikipedia.org"
+                   "https://wikipedia.org/w/?search=" ""])
 
     ;; Computer social issues, privacy, professionalism.
     ("Association for Computing Machinery" . "https://www.acm.org")
-- 
2.55.0


--=-=-=--




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

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


Received: (at 81552) by debbugs.gnu.org; 5 Aug 2026 14:41:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 05 10:41:05 2026
Received: from localhost ([127.0.0.1]:51731 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrcnp-0004Z5-Eq
	for submit <at> debbugs.gnu.org; Wed, 05 Aug 2026 10:41:05 -0400
Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]:46147)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wrcnm-0004YM-Qd
 for 81552 <at> debbugs.gnu.org; Wed, 05 Aug 2026 10:41:03 -0400
Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 86D0E1400015;
 Wed,  5 Aug 2026 10:40:57 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-01.internal (MEProxy); Wed, 05 Aug 2026 10:40:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-transfer-encoding:content-type:content-type
 :date:date:from:from:in-reply-to:in-reply-to:message-id
 :mime-version:references:reply-to:subject:subject:to:to; s=fm2;
 t=1785940857; x=1786027257; bh=AnAJvvDkEKeqT3v/MmASovcLNZyCNO18
 0B19lKX5q84=; b=CCXxe+M8+/vaWU5kZEREY8LXk26oioXDhgYFcJNHMBqkRdFE
 d1WfQ6N35bxKggYloz5RNgV4ZM/1d/CC/rLGoh44kQDy57RVYhC8deJ49aixVFAm
 S3nLj41VaTuUKyDuJiwZFqYBUFf0ydPqd35ulefHR/aUPB8dDFFo4JBUHqbaOWre
 2o7VbF/fE8KMf3xknq/fLcDO4GzAs3yALrnlIjgzXMtCHY/kx810Qr/ykC7m9SBG
 BxdiaKK8OlodJw+tT6yFQQW/H7tRAgKySMGm/CNi2/IANfM5DNwO8X+eU29XT1bS
 4ec6iSFnkHPWVg62eqDnTfPN2bLgCQoeWNGlQA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1785940857; x=
 1786027257; bh=AnAJvvDkEKeqT3v/MmASovcLNZyCNO180B19lKX5q84=; b=U
 dBka8i5k42lBs0qI4u8TuO2F+q11/7BmJtSbo7bT+e15egCUPAVJ9/QzlMPDVnAh
 a7JLnHrcb/4W5bonKmrseb/TeXJ+aiFCCNYn1tQ8blrE9Se2uZt16FFNsa9oyuRC
 EHyzHnGWAjzXwyKVdjAqXgzEZT6YHVYwVF8W2q9/W0uSOXbfLpwia5RaIlaTG+8c
 SFPFp8naKcZZowG3jdNRzDXkUBhsK+OJkjobr3wgHXqXnA+0EUjYwqIebMxMwklD
 XdG17gsfi1p4IZu0NEjXkIWFhhUk1FKw2hC/K/ZWWHvZxgENuotN5mh67ymF9rGA
 G8yPBqslGrV97E/GLGWrg==
X-ME-Sender: <xms:eUtzaoqO-En1W5uNPB70TchWY26Kt8n3PMqXRz3kMs24P3yk4AbW8Q>
 <xme:eUtzakpMsLpjydYwAW_O5xRacNnI7DAtK0rNKUvnJlijQ95B11_46LxurcsYviwdz
 NETTDCI6MnCblBSwDUiWbllYUlrEeJgvScmwIKAwEzk_c0fMzjnfxw>
X-ME-Received: <xmr:eUtzaq3tG5aFRdnd-rskiuAnvuuQ5MdOK8n9V5PSRdmFWgDPNMmQ1CeN8mrqA2PDNIIkXre22BbO>
X-ME-Proxy-Cause: dmFkZTE11WNVDfOs/bYrNYbjZu2hNVVlZeuWBqx3Ugr2JlFnZJMlDui2Arpxw1IFJttiXf
 3xf9c+99at0FbHiq6r0lngVB2xUqc8yUFt/FZUOh7HB4DDHNtHxyySF2eyNndHMUdDzVke
 PJOYn8Z1Bb2rkoZW1V54t71CDYPwfOosCWG3kPk0rYysyNga6WAy+fRpDqsD0S0D2ojmNs
 w5k41SsLRghLzszI1emiNG8goJN/QdMyPS032T13TRrR439lKZV9bUnerfUgPXdYZXFR3G
 mPeysrru0932613fUbbp2UoMVZ7twCoeQ00Tr3Iu82KpusZrUToRrdAbfDzOihLkAir3dc
 NLscY69YxGi3YZ8AYIJ9zwmG7BLQrRZdqB9EYRDxkheC9VTiXRL91sdoYMSLiNqE0Ochl0
 DokpnpqVBrgRk8SY7CtkztT7+mXnSkXV/sI1TGocim1UQqgyF3Gm1GtU7IHl/Vb0Bjcwgt
 cXZZrglOAZgzWaPsMPUtpwNSJshNVsD3s3KFO7yaOMrHO3ggUQgiYjya8UQ1tdcVqzUEaj
 22rlbV478gxcqGF/oF4oFIeYH6MAa5Qa6BeBHsNai3sZ3IRBSwkQPIp4r4MZIqwxOTZL4r
 Q//t8f/2K7Bw4StKjkmEqvuJJWANoYXBrCz4FpwB+XJiJWujtTo4iUIodjYw
X-ME-Proxy: <xmx:eUtzarDpw0qNZK-qaiNLsTuEsagBuXZBGn82FjYoPICNJHr3cN39ZQ>
 <xmx:eUtzaqcdZdEsJNlmHA4RfnpZwrLttUqKXnZOKL62ue18oAzLyLCMwQ>
 <xmx:eUtzaoiVPcbFziYN_78-VOq-GlV8rva448t4PFdOZRk2IO8gSH6FhA>
 <xmx:eUtzaqqNhWGfVT_0UrD7VVft_tsJIx5FwbIJF654Rd0VY-7uLJC7ew>
 <xmx:eUtzatyx9Cn9b5TyVFinkuZSnfduJZXN0dUpm15jye2CTzUCZPSGRXif>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 5 Aug 2026 10:40:57 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 1203C7E657E; Wed, 05 Aug 2026 15:40:56 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Perry Fraser <perry@HIDDEN>
Subject: Re: bug#81552: [PATCH] Fix handling of spaces for webjump's
 Wikipedia query
In-Reply-To: <m2se4s1vsq.fsf@HIDDEN>
References: <m2ldalppk2.fsf@HIDDEN>
 <875x1od9mz.fsf@HIDDEN> <m2se4s1vsq.fsf@HIDDEN>
Date: Wed, 05 Aug 2026 15:40:56 +0100
Message-ID: <87o6fg8wav.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81552
Cc: 81552 <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: -1.7 (-)

Perry Fraser [05/Aug 10:33am -04] wrote:
> Sean Whitton <spwhitton@HIDDEN> writes:
>
>> Perry Fraser [04/Aug  5:02pm -04] wrote:
>>> From 1a0e57c09514f1469ebf858e649d8ceb27477543 Mon Sep 17 00:00:00 2001
>>> From: Perry Fraser <perry@HIDDEN>
>>> Date: Tue, 4 Aug 2026 16:29:27 -0400
>>> Subject: [PATCH] Fix webjump's encoding of spaces for Wikipedia
>>>
>>> Wikipedia expects spaces to be encoded as underscores rather than
>>> pluses, so give it a site function that wraps
>>> `webjump-do-simple-query' and makes that replacement. Also adjust
>>> its URL to use Special:Search which will redirect to a search page
>>> if the query doesn't match an existing article.
>>
>> We prefer things like this to be in code comments instead of in the
>> commit message.
>
> Interesting=E2=80=94that definitely goes against my normal instinct. For
> example, the note about changing to using `Special:Search', it
> wouldn't make sense to leave that as a comment. In my mind that
> belongs in the commit message.

If it truly about why we had to *change* it rather than the content of
the code before or after, then it can go in the commit.

In this case using Special:Search at all seems like something worth
explaining in a comment.

--=20
Sean Whitton




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

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


Received: (at 81552) by debbugs.gnu.org; 5 Aug 2026 14:33:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 05 10:33:56 2026
Received: from localhost ([127.0.0.1]:51674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrcgt-00047X-NU
	for submit <at> debbugs.gnu.org; Wed, 05 Aug 2026 10:33:56 -0400
Received: from ms-2002a-snip6-1.eps.apple.com ([2a01:b747:3002:204::4]:62718
 helo=outbound.ms.icloud.com)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <perry@HIDDEN>) id 1wrcgq-00047F-FE
 for 81552 <at> debbugs.gnu.org; Wed, 05 Aug 2026 10:33:53 -0400
Received: from outbound.ms.icloud.com (unknown [127.0.0.2])
 by p00-icloudmta-asmtp-us-west-3a-100-percent-1 (Postfix) with ESMTPS id
 A3949180046C; Wed, 05 Aug 2026 14:33:43 +0000 (UTC)
X-ICL-RepId: 019fd258-3381-7fc3-a9b6-5007e15aa902
X-ICL-Out-Info: HUtFAUMHWwJACUgATUQeDx5WFlZNRAJCTQhIC0MCWRxICFYBXQVLVxQECFYfRRJyFksZQAhFGBwfSx8TC1NWVAJYC1YfREVdAl5YQQ4KWRIYXBRcUFgeRhJWDV0JGQZBXlAbXwJCDxwTVhUTHUMZDysISgRDB0UCXgslEwlTVlQCWAtWH0RFXQJeWF4EU1YOHQsLVllEWkQDSFZVHlErVAJYC1YfREVdAl5GExlOG1dNWg1AGVgGbRRWFVIEWQ==
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=frasers.org; s=sig1;
 t=1785940426; x=1788532426; bh=hWJdeZSN7/Rw5FHIF7a8/9DXRSWx0YRPkLEfAxc6t5Y=;
 h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:x-icloud-hme;
 b=a88XF1J2ZLXTIKuXLhwcMxJud6nSrN4XhnQorQQTmlNI/nPX2R4QrM2GLCZy5SeNeZjVxvPVE3JTFNv4akT98O96qMDicG9EuF8QTcLwBi7K3Tw6rSjbQPHbEOvAmJUR+pItX6nVq1uVxmH78ihx0Zgf3Onvddq06W8N5Kn6Mnez6bJBLRRpiXWMEVtZRiN6cfDxehSWsS3Ithhdyh3wH6Dwut4K0xBwQM8YLU0z90TP9xKMrnPGmFeczODMjgUCmyKXZMkq2mFicSApRALDnmifGEvPu26KRjSEt+V2PLHPFLzha+br4gdEQO+kQrIG7zuT+2IKbDKn+JGde3M3Kg==
mail-alias-created-date: 1604598926000
Received: from localhost (unknown [17.57.154.37])
 by p00-icloudmta-asmtp-us-west-3a-100-percent-1 (Postfix) with ESMTPSA id
 D67A31800164; Wed, 05 Aug 2026 14:33:42 +0000 (UTC)
From: Perry Fraser <perry@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81552: [PATCH] Fix handling of spaces for webjump's
 Wikipedia query
In-Reply-To: <875x1od9mz.fsf@HIDDEN>
References: <m2ldalppk2.fsf@HIDDEN>
 <875x1od9mz.fsf@HIDDEN>
User-Agent: mu4e 1.14.2; emacs 32.0.50
Date: Wed, 05 Aug 2026 10:33:41 -0400
Message-ID: <m2se4s1vsq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-ORIG-GUID: gkSwwZ6dyWvSWzn-1HBAohlDAUSVX4sX
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODA1MDExOCBTYWx0ZWRfX0uCUzAnERY4O
 mi2hlfJHO+tyc69hKiZ9DtjnTAECeLQn5f2H9ccDkzNLY4crIESaLGLVY/7ugSSg0AWJSvfxWbo
 YpGgfxzDybqm1ocbWilwuYA9g7D7vqK3SyubSy5v9s8KDFgEEqLC0IEudmRi1VDk/Vx6tuo9WNh
 4Iih5XNoXf0YQ2NAPZwe8kxrkINGe5BGap45Nv0hsAn48qIfrAJPQ3fx/BWl8GQNODBrW4IeqRw
 /v+rELjfidm7GanFXq63EuieRM++aDVlO2rk0s0G8zsu70qDMDScClM0V3rNR5hR0P5rKjLx3lY
 QYHatJMrXYv8vpclvlq0tsu4kOEvZsSOx0d8JwlOopYCSzFpCfXiNfk0wOGfWc=
X-Proofpoint-GUID: gkSwwZ6dyWvSWzn-1HBAohlDAUSVX4sX
X-Authority-Info-Out: v=2.4 cv=O4I0fR9W c=1 sm=1 tr=0 ts=6a7349c7
 cx=c_apl:c_pps:t_out a=qkKslKyYc0ctBTeLUVfTFg==:117 a=9CJiANNiRzwt_EJx:21
 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=VkNPw1HP01LnGYTKEx00:22
 a=8pif782wAAAA:8 a=9UZFY6S4AAAA:8 a=23bg3VEQAAAA:8 a=OpBZ4JRx9JlXofG2P9QA:9
 a=QEXdDO2ut3YA:10 a=UK0zECyJsSLad8jMn5GP:22 a=PxlLzgMpaVwhhkxuxP5B:22
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 81552
Cc: 81552 <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: -1.0 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> Perry Fraser [04/Aug  5:02pm -04] wrote:
>> From 1a0e57c09514f1469ebf858e649d8ceb27477543 Mon Sep 17 00:00:00 2001
>> From: Perry Fraser <perry@HIDDEN>
>> Date: Tue, 4 Aug 2026 16:29:27 -0400
>> Subject: [PATCH] Fix webjump's encoding of spaces for Wikipedia
>>
>> Wikipedia expects spaces to be encoded as underscores rather than
>> pluses, so give it a site function that wraps
>> `webjump-do-simple-query' and makes that replacement. Also adjust
>> its URL to use Special:Search which will redirect to a search page
>> if the query doesn't match an existing article.
>
> We prefer things like this to be in code comments instead of in the
> commit message.

Interesting=E2=80=94that definitely goes against my normal instinct. For
example, the note about changing to using `Special:Search', it
wouldn't make sense to leave that as a comment. In my mind that
belongs in the commit message.

For something like "Wikipedia expects spaces [...]", you're saying
it's better to /just/ be as a code comment?

>> @@ -228,6 +228,13 @@ webjump-to-risks
>>  	(format "catless.ncl.ac.uk/Risks/%d.%02d.html" volume issue)
>>        "catless.ncl.ac.uk/Risks/")))
>>
>> +(defun webjump-to-wikipedia (_)
>> +  ;; Wikipedia expects spaces to be encoded as underscores, not pluses.
>> +  (string-replace "+" "_" (webjump-do-simple-query
>> +                           "Wikipedia"
>> +                           "https://wikipedia.org"
>> +                           "https://wikipedia.org/wiki/Special:Search/"=
 "")))
>> +
>
> Perhaps we should call this webjump--to-wikipedia since it's an
> internal function?

Probably... the other site specific functions are all single-hyphens,
though.

> And conventionally if a function ignores all its arguments it's
> usually more readable to write "(&rest _ignore)".

Got it!

Thanks,

=E2=80=95 Perry




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

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


Received: (at 81552) by debbugs.gnu.org; 5 Aug 2026 12:39:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 05 08:39:28 2026
Received: from localhost ([127.0.0.1]:49786 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrau8-0005c7-1Y
	for submit <at> debbugs.gnu.org; Wed, 05 Aug 2026 08:39:28 -0400
Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]:58751)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wrau3-0005bn-MW
 for 81552 <at> debbugs.gnu.org; Wed, 05 Aug 2026 08:39:25 -0400
Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 09F6A1400069;
 Wed,  5 Aug 2026 08:39:18 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-04.internal (MEProxy); Wed, 05 Aug 2026 08:39:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:content-type:content-type:date:date:from:from:in-reply-to
 :in-reply-to:message-id:mime-version:references:reply-to:subject
 :subject:to:to; s=fm2; t=1785933558; x=1786019958; bh=Numif+FWyG
 0j8dY48YThSD6QPoWEiYWzXXicvqeuLtE=; b=nlDkuPSZ92DisMV71nNQGoMcZx
 akmsGvNusWzeGgYS8l9lJaELfEXSwMllbJiuwIscXGYGg0p/ghaVTF4f+BsE2BKK
 lB0srrbOt/abgVJGM6xMLXjcqOYnCY/oUgZaDcxU6HWeg4GkZL+pZzUAEtkSPZcE
 uyHz1jXXoUBkSRxrNXlSlkGUK4dT9fjNMgNz5eV6CfAshtVTdNFnWmlvQf9ttlok
 M0+f3k+R6OUGm2HA4t2Q9MzE5A8SWvJ8sGpUGpA8DBxT1m3rwDmuXSJQHUp07OGP
 u+IKy5nbtYRnNQuYLd6bUaDI+G2X2Qzf4zLvXk6mRCd7d7Ytn9w0cQkTYGDA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1785933558; x=1786019958; bh=Numif+FWyG0j8dY48YThSD6QPoWEiYWzXXi
 cvqeuLtE=; b=SOLgKExvXkJ+dPYf4DJl7VnG82Fnal8zYWARharctl3vOrnWGhG
 TuLgKqxD/E5+vL+paGhnYO6AR0eG3IHb6eRX34u8q2dYhmPjWgP29L1JpSOCs+Wi
 5271QEovSJwHXQBA8Fg/Nl2YldXvAvTmN3wXc9GCvo9LHQIyHaPsxjgh+F3JctTP
 slQiDhWskYirAPDCLDfW5w93ZQDY1UPWS61MiO/nLZsc5RGCkh8ALmmR2f1+nBml
 GWyUVR6zRht9Fq57aevwQME++/V/ko2BsukZCbG29f5iK5rOAvDHb46SoviAeGtg
 AAZbemOdk25cTSoBGozd8pqpPv8t1+Ths8g==
X-ME-Sender: <xms:9S5zaq-w5UxldFWQtmoNSadvXMqhTTQe04iN4XMPj0OtwarGGk8hpA>
 <xme:9S5zagsUcZbfvGcasIJZKW-nUh6EHxCwLm7mo2vGhiLIVc6AKJTFq8scxr-bVXpdA
 qTqgmQnnA5qtoret0mmX7G4RV6ecmez2QTcpxHPY1_-GXWtaiWfzw>
X-ME-Received: <xmr:9S5zatpglN5EDFKE44-Qj_SdpJNcgG0Mo-PS5B6w4Hs-faDMvz_RImcg5ZIGOgN_HLEENjEZ5EoP>
X-ME-Proxy-Cause: dmFkZTElhQO+w+tyBhraUM6+ktfo/cwZvjNkYujEKWJENfBMfjZ5jrQuc6jqwjnQSZIZZ+
 bj0piaFYUUOQUsEHHLNSyW/GUDgluWL4Hdz+gm8wT1DVbB1NTRVpWob88/qHjDuAcKHF0s
 0XfAki3UOv/6Edv1/WORO4C/hysfyzlogwbhzU9j6w+GFMbGZoYpd7/tQ+10ie7co13bux
 0JNhbqsN4EM4DxkLzwqJ/J9dDOPwkbzs3/LOeWNpL7+7LdFkB6z7a5K+UAWe8UyHSpn8sf
 Alxri8kdGlP10h7EcgwbHUzxvTNZ4zBu6yYdddewIEfYK8KorWuXgM6DEpX8oBAzp6LBWE
 GzxVIrWyaez2gWKaJLNgb6t0952I/Cg28hqqpV/wtYnVOLlFuHVQSGZEd9maSyDnf4neot
 sbvxUsBxGyLcRTUR5psRI9R0v2fm5kTVAz08N+3h0TwGHTFtiTF3mKjFr1tW70s9ZjZy5T
 32UB6GtDP8/RYv235Ju2Hpbf3tlbq4WbHgFPHXGlqxSF63K709LuCBwHhZUbLpDQEbCXKI
 lwrSNXBFVhcbuLDVZgIHNEa6BMSHkx6azMc/s92A+Q3TxAph73vyS1yxqFReNJ0VKMxHUK
 rEGevUpMyu1SQ5RIiWe88GrGbgHvxQ1QwMyjwolnIi0JpOm+ywct5bNS2NQg
X-ME-Proxy: <xmx:9S5zatlhA5Fs6I6OQXpqDPOC0YBTnxAujFWIATaoqdWdSONyF9Nwmw>
 <xmx:9S5zahwdLBRFelQVX9QbleFi0p3YLbZ6t1HR0dN6Rfjh-hdoq0SoIg>
 <xmx:9S5zall4V_QJrfXpYX8RQBIMSoa-IFfzwRt_yMu6upOEHzJE8yidRA>
 <xmx:9S5zaqfm_ppy3DlJ5iNt-S0kWHwZAQT0MAydixPYCpiBPLfdh0XfQQ>
 <xmx:9i5zaok_Tzqmu1smLLEUqZ4TtukCWVl1HWsuZo9PozeB-uftme4HkXci>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 5 Aug 2026 08:39:17 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 7BA0C7E64B0; Wed, 05 Aug 2026 13:39:16 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Perry Fraser <perry@HIDDEN>, 81552 <at> debbugs.gnu.org
Subject: Re: bug#81552: [PATCH] Fix handling of spaces for webjump's
 Wikipedia query
In-Reply-To: <m2ldalppk2.fsf@HIDDEN>
References: <m2ldalppk2.fsf@HIDDEN>
Date: Wed, 05 Aug 2026 13:39:16 +0100
Message-ID: <875x1od9mz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81552
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: -1.7 (-)

Perry Fraser [04/Aug  5:02pm -04] wrote:
> From 1a0e57c09514f1469ebf858e649d8ceb27477543 Mon Sep 17 00:00:00 2001
> From: Perry Fraser <perry@HIDDEN>
> Date: Tue, 4 Aug 2026 16:29:27 -0400
> Subject: [PATCH] Fix webjump's encoding of spaces for Wikipedia
>
> Wikipedia expects spaces to be encoded as underscores rather
> than pluses, so give it a site function that wraps
> `webjump-do-simple-query' and makes that replacement. Also
> adjust its URL to use Special:Search which will redirect to a
> search page if the query doesn't match an existing article.

We prefer things like this to be in code comments instead of in the
commit message.

> @@ -228,6 +228,13 @@ webjump-to-risks
>  	(format "catless.ncl.ac.uk/Risks/%d.%02d.html" volume issue)
>        "catless.ncl.ac.uk/Risks/")))
>
> +(defun webjump-to-wikipedia (_)
> +  ;; Wikipedia expects spaces to be encoded as underscores, not pluses.
> +  (string-replace "+" "_" (webjump-do-simple-query
> +                           "Wikipedia"
> +                           "https://wikipedia.org"
> +                           "https://wikipedia.org/wiki/Special:Search/" "")))
> +

Perhaps we should call this webjump--to-wikipedia since it's an internal
function?  And conventionally if a function ignores all its arguments
it's usually more readable to write "(&rest _ignore)".

-- 
Sean Whitton




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

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


Received: (at submit) by debbugs.gnu.org; 4 Aug 2026 21:03:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 04 17:03:17 2026
Received: from localhost ([127.0.0.1]:43597 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrMI8-0002TN-Dh
	for submit <at> debbugs.gnu.org; Tue, 04 Aug 2026 17:03:17 -0400
Received: from lists1p.gnu.org ([2001:470:142::17]:58956)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <perry@HIDDEN>) id 1wrMI4-0002Sb-SE
 for submit <at> debbugs.gnu.org; Tue, 04 Aug 2026 17:03:13 -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 <perry@HIDDEN>) id 1wrMHv-00081b-Uf
 for bug-gnu-emacs@HIDDEN; Tue, 04 Aug 2026 17:03:04 -0400
Received: from pv-2003a-snip6-6.eps.apple.com ([2a01:b747:3003:205::7]
 helo=outbound.pv.icloud.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <perry@HIDDEN>) id 1wrMHt-0002me-VP
 for bug-gnu-emacs@HIDDEN; Tue, 04 Aug 2026 17:03:03 -0400
Received: from outbound.pv.icloud.com (unknown [127.0.0.2])
 by p00-icloudmta-asmtp-us-west-1a-60-percent-8 (Postfix) with ESMTPS id
 4153218016B4
 for <bug-gnu-emacs@HIDDEN>; Tue, 04 Aug 2026 21:02:54 +0000 (UTC)
X-ICL-RepId: 019fce96-2495-7972-8f48-1875c5502062
X-ICL-Out-Info: HUtFAUMHWwJACUgBTUQeDx5WFlZNRAJCTQhIC0MCWRxICFYBXQVLVxQECFYfRRJyFksZQAhFGBwfSx8TC1NWVAJYC1YfREVdAl5YQQ4KWhIYXBRcUFgeRhJWDV0JGRtEXlAbXwJCDxwTVhUTHUMZDysISgRDB0UCXgslEwlTVlQCWAtWH0RFXQJeWF4EU1YOHQsUVwxbG0IbC1ZVHlErVAJYC1YfREVdAl5GExlOG1dNWg1AGVgGbRRWFVIEWQ==
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=frasers.org; s=sig1;
 t=1785877378; x=1788469378; bh=k8nG11MFqEtT+qVdjiZx68c5QpYO9JSfSfCJXtkBm6U=;
 h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:x-icloud-hme;
 b=OmVLiidT1o28ylZ2FYMARqokhj74c4D40f5MRCJ4ucq7OB0b2OiomsSBEtaQNFWiclZQI84FG2QOYZ4jMLb0F5H6tjfrx1IdLjhwFu4Z9tjDBDsZtb81GPdcP8XzM81mQa+REJIssKiI3l0xCqOVjxIgv0/zSmOCP2sXNvc2z+bKFowDSZPntNttSsPYlbBuoWy2jBXG11M427irfODPlB7pr3Pdsp+OMg1mjkTHsSavBlTlD1WLT/Gb/H01LGNC7CESiFzT0l2btBMiLUdTY5WkyjNZ9qWqWBGqVm5z/yRTU79FZGCZoaqB6VtSD0MsgDwZoSB4bOzvf4efutu5nQ==
mail-alias-created-date: 1604598926000
Received: from localhost (unknown [17.56.9.36])
 by p00-icloudmta-asmtp-us-west-1a-60-percent-8 (Postfix) with ESMTPSA id
 8E7841801763
 for <bug-gnu-emacs@HIDDEN>; Tue, 04 Aug 2026 21:02:23 +0000 (UTC)
From: Perry Fraser <perry@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Fix handling of spaces for webjump's Wikipedia query
User-Agent: mu4e 1.14.2; emacs 32.0.50
Date: Tue, 04 Aug 2026 17:02:21 -0400
Message-ID: <m2ldalppk2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Authority-Info-Out: v=2.4 cv=NorcssdJ c=1 sm=1 tr=0 ts=6a72537e
 cx=c_apl:c_pps:t_out a=azHRBMxVc17uSn+fyuI/eg==:117
 a=azHRBMxVc17uSn+fyuI/eg==:17 a=Sv0fKeRqtYgA:10 a=VkNPw1HP01LnGYTKEx00:22
 a=TOU-9b2kCBsTxU0xykIA:9 a=QEXdDO2ut3YA:10 a=SSmOFEACAAAA:8
 a=8a7XJKQZsw-_tscIQxEA:9 a=ULQVut_EBFRiiLgJ:21 a=_W_S_7VecoQA:10
 a=Q3yg56F37SZKzqEIyYgA:9
X-Proofpoint-GUID: W6fXlq_lCdqw1Fr2yulaPNWEgVHDUKr1
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODA0MDE3MCBTYWx0ZWRfX7CMeuOqWDsye
 c8y014MczQi7i8bfwNAWWVxAcLjsAd+Di1Qi74iHR7ifUpIAOkU3IB1Qqm/0/2SeZdEU4oYaLLl
 KZPtu4LoxifFPwhQJUhIXpIt6umJqz7i7Jc9Y8Es0FkAfwDk2CXsC8Ux4eufq9LaZvH9Nc0z6r8
 aYpqy/104ayz7x8O7I3Pm065PIcNg1JxutSxeDVbBfqtTUqdy3SHVXtWrVoGc3JBr9fUa+Hha6w
 A8dIZ5+Zf85hAaMsSDKJl2ZFRj6qVuuV1HO8xuxJ7OalgVa8+UwqZbPOPWnuK+dENsnccWhHjEI
 Az8GSVEIX3S1BbfF3Fvs2ATKrTJwWJXhTyrabANG0IdIN64RvryomWaPcipMGo=
X-Proofpoint-ORIG-GUID: W6fXlq_lCdqw1Fr2yulaPNWEgVHDUKr1
Received-SPF: pass client-ip=2a01:b747:3003:205::7;
 envelope-from=perry@HIDDEN; helo=outbound.pv.icloud.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001,
 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: multipart/alternative; boundary="==-=-="

--==-=-=
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Currently, `webjump' with Wikipedia doesn't quite work for queries
that include spaces or queries that don't exactly match an existing
page. The former is because Wikipedia interprets a `+' literally in a
search URI, and instead expects an underscore for any spaces. The
latter is because the URL used is just the prefix for viewing a
Wikipedia page; it makes more sense to use `Special:Search/' at the
prefix as that will still redirect to an article if it's an exact
match to the query, while otherwise acting as a normal search.

I've attached a patch that addresses this. It's my first time
submitting a patch, and I would especially appreciate even nitpicky
feedback if there's something I could've done better.

Thanks,

=E2=80=95 Perry

--==-=-=
Content-Type: text/html; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

<html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"en" xml:lang=3D"en"><h=
ead><!-- 2026-08-04 Tue 17:02 --><meta http-equiv=3D"Content-Type" content=
=3D"text/html;charset=3Dutf-8"/><meta name=3D"viewport" content=3D"width=3D=
device-width, initial-scale=3D1"/><meta name=3D"generator" content=3D"Org M=
ode"/></head><body>
<div id=3D"content" class=3D"content">
<p style=3D"text-decoration:none;">
Currently, <code style=3D"font-family:monospace;">webjump</code> with Wikip=
edia doesn=E2=80=99t quite work for queries<br/>
that include spaces or queries that don=E2=80=99t exactly match an existing=
<br/>
page. The former is because Wikipedia interprets a <code style=3D"font-fami=
ly:monospace;">+</code> literally in a<br/>
search URI, and instead expects an underscore for any spaces. The<br/>
latter is because the URL used is just the prefix for viewing a<br/>
Wikipedia page; it makes more sense to use <code style=3D"font-family:monos=
pace;">Special:Search/</code> at the<br/>
prefix as that will still redirect to an article if it=E2=80=99s an exact<b=
r/>
match to the query, while otherwise acting as a normal search.<br/></p>

<p style=3D"text-decoration:none;">
I=E2=80=99ve attached a patch that addresses this. It=E2=80=99s my first ti=
me<br/>
submitting a patch, and I would especially appreciate even nitpicky<br/>
feedback if there=E2=80=99s something I could=E2=80=99ve done better.<br/><=
/p>

<p style=3D"text-decoration:none;">
Thanks,<br/></p>

<p style=3D"text-decoration:none;">
=E2=80=95 Perry<br/></p>
</div>
</body></html>
--==-=-=--

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Fix-webjump-s-encoding-of-spaces-for-Wikipedia.patch

From 1a0e57c09514f1469ebf858e649d8ceb27477543 Mon Sep 17 00:00:00 2001
From: Perry Fraser <perry@HIDDEN>
Date: Tue, 4 Aug 2026 16:29:27 -0400
Subject: [PATCH] Fix webjump's encoding of spaces for Wikipedia

Wikipedia expects spaces to be encoded as underscores rather
than pluses, so give it a site function that wraps
`webjump-do-simple-query' and makes that replacement. Also
adjust its URL to use Special:Search which will redirect to a
search page if the query doesn't match an existing article.

* lisp/net/webjump.el (webjump-sample-sites): Make Wikipedia's
query a search and improve its handling of spaces.

Copyright-paperwork-exempt: yes
---
 lisp/net/webjump.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index 709f58b88a5..ba495282ec1 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -109,8 +109,8 @@ webjump-sample-sites
     ("DuckDuckGo" .
      [simple-query "https://duckduckgo.com"
 		   "https://duckduckgo.com/?q=" ""])
-    ("Wikipedia" .
-     [simple-query "https://wikipedia.org" "https://wikipedia.org/wiki/" ""])
+
+    ("Wikipedia" . webjump-to-wikipedia)
 
     ;; Computer social issues, privacy, professionalism.
     ("Association for Computing Machinery" . "https://www.acm.org")
@@ -228,6 +228,13 @@ webjump-to-risks
 	(format "catless.ncl.ac.uk/Risks/%d.%02d.html" volume issue)
       "catless.ncl.ac.uk/Risks/")))
 
+(defun webjump-to-wikipedia (_)
+  ;; Wikipedia expects spaces to be encoded as underscores, not pluses.
+  (string-replace "+" "_" (webjump-do-simple-query
+                           "Wikipedia"
+                           "https://wikipedia.org"
+                           "https://wikipedia.org/wiki/Special:Search/" "")))
+
 ;;-------------------------------------------------------------- Core Functions
 
 ;;;###autoload
-- 
2.55.0


--=-=-=--




Acknowledgement sent to Perry Fraser <perry@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#81552; 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: Thu, 6 Aug 2026 11:30:02 UTC

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