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: Mon, 15 May 2023 21:58:18 +0300 Message-ID: References: <834joj55pt.fsf@gnu.org> <87ednnvtt6.fsf@posteo.net> <875y8ywwko.fsf@posteo.net> <83zg69br5f.fsf@gnu.org> <86h6seyk10.fsf@stephe-leake.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="5632"; 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: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 15 20:59:13 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 1pydPc-0001Io-Sl for ged-emacs-devel@m.gmane-mx.org; Mon, 15 May 2023 20:59:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pydP1-0005eG-Dx; Mon, 15 May 2023 14:58:35 -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 1pydOz-0005e0-Uj for emacs-devel@gnu.org; Mon, 15 May 2023 14:58:33 -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 1pydOo-0000Ox-Js; Mon, 15 May 2023 14:58:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1684177101; bh=pICAJpXFG8+Fy10uoJVQ7/vltXH3lVdlJF7zCQP4WE4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FOyrgj+R4Hfev5RAm6OjTIv5bw37VndcixsERJIMKuVtHGRSrVKBnEb0v2Z6LBdZW wP9JBBkFG5cVOuLT1mkF07ZccrIn7zUIPXp7+QfACYcRxyDYaR0VL3SFihE1cKAtMA FzJRrrIEtVOPM5C6alBizejdLMT4YBmjSKL/9l+d0hiKx1EiRfjD9QRvjWIq3WEUiF aPGoWIiYlDDQj6iDTvWpwn6ECMQcBDrvZtYDmXp+i8MEU92mEcqr/4GllKWlJ1dvZZ 6dAYaxALhiermLycZ/NnDBWyn8YylZaIkxWdlRt0dJW8LhqQAvsHsYavvqk0VACXC0 IYCI27ZBjrcxQ== In-Reply-To: <86h6seyk10.fsf@stephe-leake.org> (Stephen Leake's message of "Sun, 14 May 2023 09:06:51 -0700") 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:306130 Archived-At: Stephen Leake writes: > 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). That'd definitely make it easier to integrate new functionality, but I think it would be quite hard to do without risking breaking existing dictionary.el features. For now I avoided making extensive changes. -- Best, Eshel