From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: dict Date: Sun, 14 May 2023 09:06:51 -0700 Message-ID: <86h6seyk10.fsf@stephe-leake.org> References: <834joj55pt.fsf@gnu.org> <87ednnvtt6.fsf@posteo.net> <875y8ywwko.fsf@posteo.net> <83zg69br5f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34263"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , philipk@posteo.net, emacs-devel@gnu.org To: Eshel Yaron Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 14 18:08:26 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 1pyEGn-0008kl-DX for ged-emacs-devel@m.gmane-mx.org; Sun, 14 May 2023 18:08:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyEFw-0003a2-05; Sun, 14 May 2023 12:07:32 -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 1pyEFt-0003Zt-VJ for emacs-devel@gnu.org; Sun, 14 May 2023 12:07:29 -0400 Original-Received: from qproxy6-pub.mail.unifiedlayer.com ([69.89.23.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyEFr-0004DY-Aw for emacs-devel@gnu.org; Sun, 14 May 2023 12:07:28 -0400 Original-Received: from gproxy4-pub.mail.unifiedlayer.com (unknown [69.89.23.142]) by qproxy6.mail.unifiedlayer.com (Postfix) with ESMTP id DA1998032BEA for ; Sun, 14 May 2023 16:07:25 +0000 (UTC) Original-Received: from cmgw11.mail.unifiedlayer.com (unknown [10.0.90.126]) by progateway6.mail.pro1.eigbox.com (Postfix) with ESMTP id 566741003FB9E for ; Sun, 14 May 2023 16:06:54 +0000 (UTC) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id yEFJpK1q6V8I5yEFJpyR1v; Sun, 14 May 2023 16:06:54 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=Z80poFdA c=1 sm=1 tr=0 ts=6461071e a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=P0xRbXHiH_UA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=bFXRwsVzAAAA:8 a=mDV3o1hIAAAA:8 a=tX7DZ8MrIWu5rGM3WB4A:9 a=KZxBJkn6Xz4A:10:uccc_2email_address a=_0FzKfYLFQgA:10:uccc_2email_address a=SbqxM2Yfux94sIp4U6aP:22 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding: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=kT5QCiPx2OPT0MTu785ZAsuBaAg/fflE+CNHbUV42Os=; b=ortPTSSwzhMVOt9zDMwYA+lD4F mxJKVs/viOY8YGtUxcVlHCqNlXB5OiZ6dHvBlzmWQ5xwANBVlgbBmlyxbv1Z6BjXsOMWpboHAARNL yUqGiqwPOLNiFkxcmxTBsxeYxKx3GWidm2QbgdSFO7XRlaHwW/SxPmU5TrMZfhMUgFwYvjG84Q2K6 cs13DIinx7hwko3+Hv3TnTfkOk+Nf9i993HL9ANqhp7M5jhQFiPeKwjYC5WFn5e0EgdSsEY6BiWfO HiYO0HgxJYUTmj7dtl8cD2WOuMhp2LFr9mBYg9qhqslposRYnPPAUDxz50HuvvVHZmdEGxYY3QaGl SvFhWJ/Q==; Original-Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:62793 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pyEFJ-000gN4-Ja; Sun, 14 May 2023 10:06:53 -0600 In-Reply-To: (Eshel Yaron's message of "Sun, 14 May 2023 09:41:52 +0300") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1pyEFJ-000gN4-Ja X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:62793 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 4 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=69.89.23.12; envelope-from=stephen_leake@stephe-leake.org; helo=qproxy6-pub.mail.unifiedlayer.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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:306119 Archived-At: Eshel Yaron writes: > Eli Zaretskii writes: > >>> From: Eshel Yaron >>> Cc: Eli Zaretskii , emacs-devel@gnu.org >>> Date: Fri, 12 May 2023 16:17:53 +0300 >>> >>> Any thoughts/ideas? >> >> How about adding to dictionary.el a customizable function that >> dictionary-search would call instead of its default operation? > > Thanks, this would be a good way to expose the different behavior that I > want to add. However, my difficulty lies elsewhere. The issue I > brought up in my previous message is with implementing this behavior > without introducing unnecessary code duplication to dictionary.el. > > In short, we need two things: a way to obtain a word's definition and a > way to obtain dictionary matches given some input (for completion). > dictionary.el does these things already, but in way that's too coupled > with its user interface to admit reuse for my purposes. So the question > is whether to add the needed stuff from Dict to dictionary.el and accept > some code duplication, or try to refactor the parts of dictionary.el > that communicate with the dictionary server to provide a cleaner API. Maybe you can rewrite the higher-level code in dictionary.el to depend on the lower-level code in dict.el (while combining them into one file). -- -- Stephe