From unknown Sat Jun 21 10:28:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#58552 <58552@debbugs.gnu.org> To: bug#58552 <58552@debbugs.gnu.org> Subject: Status: 29.0.50; [PATCH] dictionary-lookup-definition "Wrong type argument" error when there is no word at point Reply-To: bug#58552 <58552@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:28:25 +0000 retitle 58552 29.0.50; [PATCH] dictionary-lookup-definition "Wrong type arg= ument" error when there is no word at point reassign 58552 emacs submitter 58552 Daniel Mart=C3=ADn severity 58552 normal tag 58552 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 15 15:36:53 2022 Received: (at submit) by debbugs.gnu.org; 15 Oct 2022 19:36:53 +0000 Received: from localhost ([127.0.0.1]:42676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojmxo-0002gD-RG for submit@debbugs.gnu.org; Sat, 15 Oct 2022 15:36:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:52210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojmxj-0002g1-Oy for submit@debbugs.gnu.org; Sat, 15 Oct 2022 15:36:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojmxj-0005NJ-JI for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 15:36:47 -0400 Received: from sonic317-26.consmr.mail.bf2.yahoo.com ([74.6.129.81]:34077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojmxg-0005gn-Ft for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 15:36:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1665862599; bh=xZkEyvluUWkF97nfYk1YuEXj0iPCku/SxLvjxU0XXzY=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=HQMVJcugqraksEse2TZGwhe4HofVsO6x6cTEwbxz8NZ5Y1IjLHVCDqJ+TP35dGS1wbVETVMRkcTOyl5HsqAMJjHSxzuE6exlsnhBdkIdI2egj3aesuM47eBwZpH92yjG6YA+V2IhPXPFMz8h8yTnAfECPL7aWM/BRS0OEGb8YWZBhEzuCL9abNuW+rkMAfpphgsaG5xH+JXAgOuIJsida6oxyPDLXJcUPjXqpxb7hSyM4bMZGTY9FEJ+8sUtW0IxDI3zhvUyXxWks/PH+M0VLRqj0fgD4pifTfF1BzTMw7FQ/veOluhbF2edanTlFGDNG9LDZ3hGsxx+IZ52FJ18Qg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1665862599; bh=1yI2LEi0cD53DPme4X4qwC9/d3Vk5n/KhhgOwBp9wto=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=dRFCiNUn2jfiRmNj9y7mi/wgspkthvtukc9tmEdPc+JCSLXi9RtLWi6VoQAZpyz45swkcK1YePKigB2/uhiVLTCZWQKmm8q5dPEYQQoAMDrNvShYmXW1slOaUuw6ur7tflGv9gv/MLw1LjD3+T8uxyalXzOL4cuNlcbPg0CuhublyYxqNm4mV57hG6MMJZJCnfFf96AcNh3tRtU9afvPcqyrGXgfo/n03lKXqKxIyRquKLn9l9QSnmg7ecXgVdR3bN0uc/8PioNrceEKtdm2xVmyy2iDmSigeyA186Wl0tIoK/ivh39VB7TnUjWgxYkxsXlqmWYjYQ1BwBb/1C0EWg== X-YMail-OSG: LmdnuksVM1k7xCe3f38xYf4g5pZGzjOsIiUJWOQDu5yJW15Pn6YfvVGOxmFI58q ..foxHtEZt2GRdDnnddxSQKBapVXNq2GapdJaURI8GmM1YTa5Efhg3AY5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H52uU8sIfcw- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.bf2.yahoo.com with HTTP; Sat, 15 Oct 2022 19:36:39 +0000 Received: by hermes--production-ir2-6c65697d7-c5jqv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 365b66ff89dddefa62bb5adb7b22ace2; Sat, 15 Oct 2022 19:36:37 +0000 (UTC) From: =?utf-8?Q?Daniel_Mart=C3=ADn?= To: bug-gnu-emacs@gnu.org Subject: 29.0.50; [PATCH] dictionary-lookup-definition "Wrong type argument" error when there is no word at point Date: Sat, 15 Oct 2022 21:36:35 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" References: X-Mailer: WebService/1.1.20740 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1819 Received-SPF: pass client-ip=74.6.129.81; envelope-from=mardani29@yahoo.es; helo=sonic317-26.consmr.mail.bf2.yahoo.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Steps to reproduce the issue: emacs -Q M-x dictionary-lookup-definition RET Answer "y" if asked about using dict.org. Expected result: As there is no word at point to act on, the operation should inform the user right away. Actual result: dictionary-encode-charset: Wrong type argument: stringp, nil An empty dictionary buffer is shown, which is confusing. The attached patch informs the user that there is no word at point to act on and aborts the operation early. If you think it's a good patch, please install on my behalf. Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Signal-an-error-in-dictionary-lookup-if-there-s-no-w.patch >From ac9505d3105138c69b018d6432182e45d12a2bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Sat, 15 Oct 2022 21:25:59 +0200 Subject: [PATCH] Signal an error in dictionary lookup if there's no word at point * lisp/net/dictionary.el (dictionary-lookup-definition): Signal an error when there is no word at point. --- lisp/net/dictionary.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index 4c52382c67..b8f5018005 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -1173,7 +1173,10 @@ dictionary-search (defun dictionary-lookup-definition () "Unconditionally lookup the word at point." (interactive) - (dictionary-new-search (cons (current-word) dictionary-default-dictionary))) + (let ((word (current-word))) + (unless word + (error "No word at point")) + (dictionary-new-search (cons word dictionary-default-dictionary)))) (defun dictionary-previous () "Go to the previous location in the current buffer." -- 2.34.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 16 05:25:49 2022 Received: (at 58552) by debbugs.gnu.org; 16 Oct 2022 09:25:49 +0000 Received: from localhost ([127.0.0.1]:43379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojzu0-0006s1-Q0 for submit@debbugs.gnu.org; Sun, 16 Oct 2022 05:25:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojztx-0006rj-Ll for 58552@debbugs.gnu.org; Sun, 16 Oct 2022 05:25:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=z3XLkEhNze6BmBzQdZXphOkOm3hh5RrCrsGefRkATF8=; b=naEUZ3Km3Daqs3ubjVPg8sTYcZ V1TJntkVreILPhR9MmYghXlBlkv1c08lvZ6Qa/SwbAnRH/28+1qMnyi7Cjf7RY98ePEF9HJZLs5s8 K1xsYuHL3UIUQ/fSvyFWCryoMhHn9uL0MzF5hCdhc8utjIS7jsWbh7vT+KGhXQTaqiH0=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojztp-0004YJ-Ep; Sun, 16 Oct 2022 11:25:39 +0200 From: Lars Ingebrigtsen To: Daniel =?utf-8?Q?Mart=C3=ADn?= Subject: Re: bug#58552: 29.0.50; [PATCH] dictionary-lookup-definition "Wrong type argument" error when there is no word at point In-Reply-To: ("Daniel =?utf-8?Q?Mart=C3=ADn=22's?= message of "Sat, 15 Oct 2022 21:36:35 +0200") References: X-Now-Playing: Tracey Thorn's _Out Of The Woods_: "It's All True" Date: Sun, 16 Oct 2022 11:25:35 +0200 Message-ID: <87pmesyvao.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Daniel Martín writes: > If you think it's a good patch, please install on my behalf. Thanks. Looks good to me; now pushed to Emacs 29. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58552 Cc: 58552@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Daniel Mart=C3=ADn writes: > If you think it's a good patch, please install on my behalf. Thanks. Looks good to me; now pushed to Emacs 29. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 16 05:25:52 2022 Received: (at control) by debbugs.gnu.org; 16 Oct 2022 09:25:52 +0000 Received: from localhost ([127.0.0.1]:43382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojzu4-0006sK-2R for submit@debbugs.gnu.org; Sun, 16 Oct 2022 05:25:52 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojzu1-0006rq-9t for control@debbugs.gnu.org; Sun, 16 Oct 2022 05:25:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=x1TtWeEf8TABuLSKFGFmaeYJ7L6lvAap0AbYQlrfDFY=; b=W49yHLSYqs0Ti2CGCYrPtm2U7l 32zo4DB8N9uD+x+gI/AT1DGo6K97M/9H11RpRz8K3ylbt0o/nykcEPclG5fsRR7NseoM3IDe/0XLp zuxQ29OZGUB0D9JIFDDlif6LE7Pltd3rHi8yFzVzyZrn3ci5luIth8yBfvNj77P1vWYc=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojztt-0004YQ-Qw for control@debbugs.gnu.org; Sun, 16 Oct 2022 11:25:43 +0200 Date: Sun, 16 Oct 2022 11:25:41 +0200 Message-Id: <87o7ucyvai.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #58552 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 58552 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 58552 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 16 16:53:13 2022 Received: (at 58552) by debbugs.gnu.org; 16 Oct 2022 20:53:13 +0000 Received: from localhost ([127.0.0.1]:46374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okAdE-0006A7-OU for submit@debbugs.gnu.org; Sun, 16 Oct 2022 16:53:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okAdC-00069t-QI for 58552@debbugs.gnu.org; Sun, 16 Oct 2022 16:53:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59270) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okAd7-0005RX-GI; Sun, 16 Oct 2022 16:53:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=NGw8+QQWsn4wQrPXxwvh3N7QIfQe2LoS9z4RR2wl7+M=; b=oFd4BPTzZ35a KIzWLZkaMNbS+Zuh7gyyZ6Y381YhqIJI7OLoCTrvL3lKztuIezFBfkaLWoLThKPZS2yBjYv7dD+j4 I2KYju1YcLEB+Ao6tf8QhiZ6Gt3oT168VwHJMSPlBu4xwY8UIIX3MwkZjqqR/eGp+FURezc29R/4s 9lRV47X4OK3hFX1q2xrCM/rVVvNAEPGXrt7vDaR2iMHX7uvteYa9ML2br5cLQxoD6HSCFHuUlRH8l hHS4Yse1+tB9jCLLlLBxmWsUxVn+tRobubz+SxYNoesZIc+8FCK98KBc+uHYjYpeJupA0BVvj9RP0 h96LdQePkyfXIoSv93NkdA==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1okAd5-0003Kn-Hl; Sun, 16 Oct 2022 16:53:03 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Daniel =?iso-8859-1?Q?Mart=C3=ADn?= In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#58552: 29.0.50; [PATCH] dictionary-lookup-definition "Wrong type argument" error when there is no word at point References: Message-Id: Date: Sun, 16 Oct 2022 16:53:03 -0400 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58552 Cc: 58552@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] As far as I can tell, the message below was sent only to me. But the message is strange. So I decided to forward it here. ------- Start of forwarded message ------- From: Daniel Martín Date: Sat, 15 Oct 2022 21:25:59 +0200 Subject: [PATCH] Signal an error in dictionary lookup if there's no word at point * lisp/net/dictionary.el (dictionary-lookup-definition): Signal an error when there is no word at point. - --- lisp/net/dictionary.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index 4c52382c67..b8f5018005 100644 - --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -1173,7 +1173,10 @@ dictionary-search (defun dictionary-lookup-definition () "Unconditionally lookup the word at point." (interactive) - - (dictionary-new-search (cons (current-word) dictionary-default-dictionary))) + (let ((word (current-word))) + (unless word + (error "No word at point")) + (dictionary-new-search (cons word dictionary-default-dictionary)))) (defun dictionary-previous () "Go to the previous location in the current buffer." - -- 2.34.1 - --=-=-=-- ------- End of forwarded message ------- -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From unknown Sat Jun 21 10:28:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 14 Nov 2022 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator