From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: dict Date: Sun, 14 May 2023 12:14:37 +0300 Message-ID: <83ednj9sw2.fsf@gnu.org> References: <834joj55pt.fsf@gnu.org> <87ednnvtt6.fsf@posteo.net> <875y8ywwko.fsf@posteo.net> <83zg69br5f.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33778"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 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 11:15:46 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 1py7pS-0008b7-L4 for ged-emacs-devel@m.gmane-mx.org; Sun, 14 May 2023 11:15:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1py7oZ-0004VA-TE; Sun, 14 May 2023 05:14:51 -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 1py7oZ-0004Uy-4k for emacs-devel@gnu.org; Sun, 14 May 2023 05:14:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1py7oK-0002Od-Sg; Sun, 14 May 2023 05:14:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Ov7qtJdSBJ1ImOAn122fgeQWXMxkXXvI8poyUb7taRA=; b=BLyBNgg4jvU8 TFXaTs5MtHF7GrRkLQ0R1Q91UJRAsnNLfdbCntHDxMdJsUzcKn8jjedFETnf3ySXnRo3Lsgj7RXV3 tr/8gT0P2Wy94xgnq3osJcE7Mrt8F6fFnbCj43ZkobROMyuoIkI3dC1rBh2SpQIT5jm3/eJvGLFpV EHQ8LRv9hcqZZOlomDJy3ZLxpEQ71qNX2LFW05SctNfThs5wO+YheglpuSPlmsLqytYAJgc674osQ wYI7BzXSXBVUiGypovRvIhlhTIBnMcX+RdU4OOLnuHU9elWfy7Ac9x8yweKSDkkjBs46ACEvtampU 50qjCO9u2rr//JXhxsekOQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1py7oK-0003UF-Cu; Sun, 14 May 2023 05:14:36 -0400 In-Reply-To: (message from Eshel Yaron on Sun, 14 May 2023 09:41:52 +0300) 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:306115 Archived-At: > From: Eshel Yaron > Cc: philipk@posteo.net, emacs-devel@gnu.org > Date: Sun, 14 May 2023 09:41:52 +0300 > > Eli Zaretskii writes: > > > 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. I'd say try the latter if it's reasonably easy; otherwise try the former.