From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: dict Date: Fri, 26 May 2023 15:26:19 +0300 Message-ID: References: <87ednnvtt6.fsf@posteo.net> <875y8ywwko.fsf@posteo.net> <83zg69br5f.fsf@gnu.org> <83ednj9sw2.fsf@gnu.org> <837ct5x5v6.fsf@gnu.org> <83sfbtvii4.fsf@gnu.org> <83h6s9vdft.fsf@gnu.org> <871qjb9cd6.fsf@posteo.net> <875y8m95tb.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4264"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org, Philip Kaludercic , Eli Zaretskii To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 26 14:27:29 2023 Return-path: Envelope-to: ged-emacs-devel@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 1q2WXZ-0000xm-6x for ged-emacs-devel@m.gmane-mx.org; Fri, 26 May 2023 14:27:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2WWf-0005Rh-9a; Fri, 26 May 2023 08:26:33 -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 1q2WWa-0005RR-KZ for emacs-devel@gnu.org; Fri, 26 May 2023 08:26:30 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2WWY-00013G-0o; Fri, 26 May 2023 08:26:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1685103983; bh=uuxtAAe15o+Pj8RUHE7krJ0g3GL2HjfdHiWwKcEO2H4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=e6cAcxH1RC84aLCd75qGdL3l5tCXLR8Lz1hNFQdbYzFk4UOv5D4OXYyPDwZ8jf9tX YY+b5IKbfDbtQyf7GwYKd11GHxOEnTIi2eSvEWQs2SY+YAclXm29/Qd2O+kEiSmkkv VjlE4HN19qTuf2tylGixMW/KW5mEIZL2ZkpYMjeQIZgVgcKDxoGNSZmb/3LuodmT0a sEl1apv19YjaY5HXJ+LQCnYGp3FWLjfdNN+23bSZ3AqGrs/6Sp/kOFdlY39pJdwaFE BxyoPW1QhVy8TLQ29YZazXqsEZ6Ixcfk8Y/eg4Qo0mCJR/TKSdobBhypErVxeNTYyg XxDrgdvgn3tkA== In-Reply-To: ("Rudolf =?utf-8?Q?Adamkovi=C4=8D=22'?= =?utf-8?Q?s?= message of "Fri, 26 May 2023 13:36:19 +0200") Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:306350 Archived-At: Hi, Rudolf Adamkovi=C4=8D writes: > QUESTION 1. > > Is it expected that 'dictionary-lookup-definition' still uses the old > interface, even thought I set > > (with-eval-after-load 'dictionary > (setopt dictionary-search-interface 'help)) Yes, `dictionary-search-interface` only affects `dictionary-search`. It shouldn't be too hard to have it also affect `dictionary-lookup-definition` though, would that be helpful? Note that now you can also have `dictionary-search` use the word at point without prompting, as `dictionary-lookup-definition` does, by setting `dictionary-read-word-function` to something like: --8<---------------cut here---------------start------------->8--- (lambda (&rest _) (thing-at-point 'word)) --8<---------------cut here---------------end--------------->8--- > QUESTION 2. > > With > > (with-eval-after-load 'dictionary > (setopt dictionary-server "dict.org")) > > when I have > > dictionary > > and type 'M-x dictionary-search RET', I get > > Search word (default Ditionary): > > Notice the default word "Ditionary" [sic]. > > Further, when I continue by manually typing 'dictionary M-RET' (in > Vertico), Emacs says "[Match required]" and does nothing. That's interesting, AFAICT this is essentially a problem with the defaults of the dict.org server: when using its default matching strategy, the only match it provides for "dictionary" is "ditionary", and vice versa. The main problem is that in this case the word we're matching ("dictionary") is not returned as a match, although it is defined. If you set `dictionary-default-strategy` to something other than the default "." (which means "let the server choose"), maybe something like "prefix", then this oddity is avoided. But since this is currently the default setting I wonder what'd be the best way to address this issue. We can change the call to `completing-read` such that it doesn't require a match, so you could always input a word regardless of the completion candidates. Another option would be to change the default for `dictionary-default-strategy` to something more useful. Any other ideas? --=20 Thanks, Eshel