From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: A proposal for a friendlier Emacs Date: Tue, 27 Oct 2020 10:50:26 +0300 Organization: GNU.Support Message-ID: References: <20200928220307.GD18207@protected.rcdrun.com> <83ft71l3cf.fsf@gnu.org> <20200929041613.GH18207@protected.rcdrun.com> <20200929054546.GA22699@protected.rcdrun.com> <831riklkyc.fsf@gnu.org> <20200929152104.GF383@localhost> <20201020153220.GA6994@t400> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37771"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ (1036f0e) (2020-10-18) Cc: emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 27 18:50:18 2020 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 1kXT6w-0009hE-9p for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Oct 2020 18:50:18 +0100 Original-Received: from localhost ([::1]:54300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXT6v-0006eK-2f for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Oct 2020 13:50:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXSyo-0004He-N3 for emacs-devel@gnu.org; Tue, 27 Oct 2020 13:41:54 -0400 Original-Received: from static.rcdrun.com ([95.85.24.50]:54345) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXSym-00044M-MP for emacs-devel@gnu.org; Tue, 27 Oct 2020 13:41:54 -0400 Original-Received: from localhost ([::ffff:197.157.0.60]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002A0B3B.000000005F985BD0.00002FBA; Tue, 27 Oct 2020 17:41:36 +0000 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/27 13:40:55 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:258512 Archived-At: * Arthur Miller [2020-10-27 07:32]: > Jean Louis writes: > > > * Arthur Miller [2020-10-20 16:08]: > >> I would like to have an easy to loookup dictionary from Lisp posibly for > >> automatically translating of GUI ites. I have always thought of creating > >> an sqlite database of "programming" dictionary where some common gui > >> items are put together like (file, menu, cut, copy, paste, etc) and > >> indexed for use in programms. In a Lisp program sqlite is not even > >> needed. > > > > You mean very simple and common words? > Yes, like: File, Open, Close, Cut, Copy, Paste ... There are those /usr/share/locale .po files to be used with GNU gettext. NAME gettext - translate message SYNOPSIS gettext [OPTION] [[TEXTDOMAIN] MSGID] gettext [OPTION] -s [MSGID]... DESCRIPTION The gettext program translates a natural language message into the user's language, by looking up the translation in a message catalog. https://www.emacswiki.org/emacs/Gettext See: https://www.gnu.org/software/gettext/manual/html_node/PO-Mode.html So gettext is for you. You may already get all that what you want, you can translate user interfaces quickly and get translations from existing other software by using it. Are there any Emacs or completion packages for gettext? > > If there are not too many, Lisp structure is enough, that is how I am > > using it in some CGI scripts for multi languages. > I know; sqlite db is a bit more portable; think C++; but for Lisp > programs a hash map or even list are fine. If database is for single user then Lisp data in files is fine. If for multiple users then what if they write to database in the same file. Emacs should have database built-in such as gdbm the GNU database, or other similar databases optionally with ./configure options. I am using the PostgreSQL dynamic module for database management: https://github.com/anse1/emacs-libpq and this works well and fine, independent of Emacs package. I think original pg package broke with the new release of PostgreSQL, so I had to look for solution. Developers are looking how to include this dynamic module into GNU ELPA, they are willing so far. and there is SQLLite dynamic module: https://github.com/pekingduck/emacs-sqlite3-api There is GDBM tool named: gdbmtool for which one could write an Emacs package and use it that way indirectly. I wonder why such packages do not exist after so many years, in general, why some simple database is not built in. > > There is wordnut package for looking up into Wordnet dictionary, it is > > free as in freedom dictionary, it is fast, and pressing enter on words > > leads you to new words. > Always wanted to look up wordnet, but never got to it; one day .... In many GNU/Linux distributions there are packages with Wordnet. Emacs package is wordnut, works fine also in connection with helm, and Wordnet is freely licensed. Wordnet projects are huge: https://en.wikipedia.org/wiki/WordNet#Global_WordNet_Association And include allegedly more than 200 languages, but licenses are often non-free. Emacs packages work without any middle server. > I mean one could write program to look up a list of words; maybe > save it and then use the saved translation as a base for a human to > finish the translation? get the gettext -- Jean Louis