From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: uzibalqa Newsgroups: gmane.emacs.help Subject: Re: Abbrev for shorthand purposes Date: Thu, 11 Aug 2022 12:28:05 +0000 Message-ID: References: Reply-To: uzibalqa Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30928"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "help-gnu-emacs@gnu.org" To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 11 15:22:10 2022 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 1oM88Y-0007r9-C9 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 11 Aug 2022 15:22:10 +0200 Original-Received: from localhost ([::1]:40524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oM88W-0006zk-Io for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 11 Aug 2022 09:22:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM7IM-0004df-L7 for help-gnu-emacs@gnu.org; Thu, 11 Aug 2022 08:28:14 -0400 Original-Received: from mail-40141.protonmail.ch ([185.70.40.141]:22257) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM7II-0002kJ-Ax for help-gnu-emacs@gnu.org; Thu, 11 Aug 2022 08:28:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=4sxfbey7jffhrbtrx4ejj73dru.protonmail; t=1660220887; x=1660480087; bh=hBoYjcIsqT1pOOk8RFrSAUiA2CKUCrQOBAvshIZxHqc=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=kHcioaWag8s2QpUDLFz5D8GSm9JHUWcGoiUvvcbnyHAD+H59/AVDa6mjND2YXYkCw kZd42YiyCMFLvoTjoMnEn2FIgsdQ3BdEc8IilzADgG0gadOPWBodPQSapRdqbwgc7Q 4dX3YtmS7ymXtWyazgOJaYUG/7uAlrVolP1UfKQUcYfnfz/y8NDajsaPYTAvtDp5AV 3ArlfRFMvRHEfuw2E01qCsT35VPUUiUiav5jFcU2fXzNwEaA5Kh1m5kl44yjRBXaHt /wdF/YsgvpgRFCAqZdHs7dWrhqfSyxr32pAoMLSx970agMsXAiUDE6yqj+7qzkJA9N GvnwJAGk2vBrQ== In-Reply-To: Feedback-ID: 52887082:user:proton Received-SPF: pass client-ip=185.70.40.141; envelope-from=uzibalqa@proton.me; helo=mail-40141.protonmail.ch 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, RCVD_IN_MSPIKE_H2=-0.001, 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: 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" Xref: news.gmane.io gmane.emacs.help:138799 Archived-At: ------- Original Message ------- On Thursday, August 11th, 2022 at 3:43 AM, Jean Louis wr= ote: > * uzibalqa uzibalqa@proton.me [2022-08-11 00:43]: > > > > Purpose of abbrevs was not to use them programmatically, but to have > > > it handy to quickly add them while writing text. > > > > I am using them programmatically because I want to implement a specific > > scheme for short writing. > > > You can implement it rather by thinking and using Emacs built-in > functions. You are inserting them into parenthesis, but you can insert th= em into > parenthesises by using built in Emacs functions as well, without > worries. > > Your file will be saved. You may reuse the information. > > > Yes I can complete the word "sentimental", but am struggling on how the= word can then be > > changed to "s--l". > > > For that you do following: > > - write s--l > > - put cursor after s--l > > - Press C-2 C-x a g > > This is because C-2 or C-u 2 is equivalent of going 2 words back, as > s--l probably looks as 2 words to Emacs because of dashes. > > - insert "sentimental" > > - when you write sentimental it will expand into s--l > > That method is faster. Hi Jean, I need the functionality for use with my group, meaning that the l= ist of words and substitutions have to be done programatically, so I can send t= hem the `.el` file. What I would like to have is completion of tho word "sentimental", so writi= ng "sentim" will complete it like company-mode does. Then the more difficult task of replac= ing with the shortened version (which I currently do with abbrev, user just introduces s= pace just like writing and the replacement happens). People would be writing prose and do not wan= t them have to use key binding input for every word they write.