From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Composing words from acronyms Date: Tue, 25 Jul 2023 20:50:16 +0200 Message-ID: <87sf9b3jpo.fsf@gnu.org> References: <2_RZ8A26ry2Z_vdsYxjFkT_0ZLgEq5uRp_U0kAVw-7ssI8szprfyc99ejKXnnvZMLxFSgQog967qq1EliFMGzS9WVuJ1bzWXmT69NMkMWEk=@proton.me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38658"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.11.10; emacs 30.0.50 Cc: help-gnu-emacs@gnu.org To: uzibalqa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 25 20:55:29 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1qONBx-0009qc-8A for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 25 Jul 2023 20:55:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qONBL-00011E-4K; Tue, 25 Jul 2023 14:54: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 1qONBJ-00010g-6W for help-gnu-emacs@gnu.org; Tue, 25 Jul 2023 14:54:49 -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 1qONBI-0003Uv-OE; Tue, 25 Jul 2023 14:54:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=DaF+DpRDJnbZ28GgfJm9aXkGMmihfmbyViGw7lO2cWs=; b=hCIAtFiac9kdVD DD84XEaEKvkP+DCVcK1FtwWbS6RRIR5NpytUaWh5HFj/baWZm/pi3SjKHBewqFfbnLpDcYqFlCLEX J6HctWYZ3Z6aTAfhz6v87Km/lQTPGbbaLGQGPX0nigQbjjvwujU2Bj07qEanybXNCX3JZ8QV5Yy0c 97xVhvMDZDx9UwKVSCKlh71DWVsUIZqsEi7LcjNa8FC76GwrZ/SxY6Jp71pJ79tafDQvw5VaSni+u H0v2sOzHIGmaafwH35yEnVE1ZQz07owhOKw9ynwMfG/1OGjwgo95W/pAldVVZytpgF13zG5xhOcvK DTzUvCowD9PoQl6NIZXw==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qONBI-0006C4-G6; Tue, 25 Jul 2023 14:54:48 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 7D8CD27C005B; Tue, 25 Jul 2023 14:54:47 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 25 Jul 2023 14:54:47 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedriedtgdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvfevufffjgfkgggtsehttd ertddtredtnecuhfhrohhmpefvrghsshhilhhoucfjohhrnhcuoehtshguhhesghhnuhdr ohhrgheqnecuggftrfgrthhtvghrnhepudejtdehuddvleffjeekteegvdehleehvdeufe fhueekkeekhedvgfeggeffvefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlih hthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfhgr shhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Jul 2023 14:54:45 -0400 (EDT) In-reply-to: <2_RZ8A26ry2Z_vdsYxjFkT_0ZLgEq5uRp_U0kAVw-7ssI8szprfyc99ejKXnnvZMLxFSgQog967qq1EliFMGzS9WVuJ1bzWXmT69NMkMWEk=@proton.me> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144444 Archived-At: uzibalqa writes: > I would like to compose words from acronyms (e.g. 5-letter words, > 4-letter words, etc). For instance, from the acronym 'Emacs' I can > compose 'maces'. > > Is this difficult to de in eamcs, and how may I approach this task ? It's a bit cheating but the dash package has a -permutations function which does the job. (defun acronyms (word) (seq-filter (lambda (acronym) ;; TODO: check if acronym is actually a sensible word. t) (mapcar (lambda (lst) (mapconcat #'char-to-string lst)) (-permutations (string-to-list word))))) For the TODO, you could probably use some dictionary file. Bye, Tassilo