From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: michael-franzese@gmx.com Newsgroups: gmane.emacs.help Subject: Re: Determining existence of text following point Date: Tue, 18 May 2021 22:50:51 +0200 Message-ID: References: <87cztpx8oz.fsf@ericabrahamsen.net> <87zgwsx5r3.fsf@ericabrahamsen.net> 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="34780"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eric Abrahamsen , Skip Montanaro , Help Gnu Emacs To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 22:52:03 2021 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 1lj6h8-0008px-Uz for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 22:52:02 +0200 Original-Received: from localhost ([::1]:54444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lj6h7-0000JB-UC for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 16:52:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj6gk-0000HK-0P for help-gnu-emacs@gnu.org; Tue, 18 May 2021 16:51:38 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:38161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj6gf-0005hD-TA for help-gnu-emacs@gnu.org; Tue, 18 May 2021 16:51:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621371051; bh=UWgEYVDSamjakLoK2llRrxJA1aOhLY61LzF8Nlq4+sA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OZL0wpe86zlJmoujM/ONBer6ZicrHStsznkdOmbVkhM5xI4+yoI4vLC1W1bKWlNxf IVX256+bmuYKcGK+FDGigz+iW87+TfrxTVDi5Nn1Pv/QUHx6xMRoysPhPX2q2ZWGqb 2PFy8gCT+fFT1Tbj0i0FJsdlVyE2A2kj82NRqq5I= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs13.server.lan [172.19.170.181]) (via HTTP); Tue, 18 May 2021 22:50:51 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:5GzJegC7fVW7YmqTEcg4XAr1LVbd8VN8XaGthaGsZL9f203gdKOtwM0gvhk0xaazt65Mr lx8ouw/ULpDATsnHsFh+uePWcDTIz2bbzf0xIbuPsw7oUbw2vANU89AdpeRDVFJI8UPsGC/fDScG Bn8dg9yAAL8yK1akNW3eNTGe/u3Nc67gNB63ctHX7mnK/sMHxAQmuxRPOYFYgosIJIFn8g6Cc7GH 8n///Va7w5v7qgaMhPvuzjsAysRj7rP/0xY8C0/ubibW9baddBrrXJ5JxWvB7wQB/9VDPiL4/huN E8= X-UI-Out-Filterresults: notjunk:1;V03:K0:hK+JZGc+7lw=:zpSq32YmqWn0ca9pnlu+Ga 7yeUyrKTRlsSHYS1p5zmAEduq8sp9VOBhcF7QFeM9msvc6Zr3t9+TZj9G59EMjr8EpvJqmNxa SbRDWffZsvY37fNeuKUG7LFKxDu1NfvSVC6y4JjO8rC/PeyZ9igl/OkSe1blR/ckCeULbFHeT ViE+zhdFkD4Pkplp3ksJvYG3sm1yDUgR2ZCAfg/LfB1n4aSAYhULr5/SuXeGnov0CHgXkJHHJ t97Mh5eFN01zsdko1k75BzHpcSJZiN+eNsQ9Yu/pSj/wOov6YbF/HbEVb90q+UAsNQUroE+Rr VrYIToR7vrParetqFW7pKXf/y7aVCi70helCZgHXgPYRpo5tXucm3MDOjB2CEMVreiXWx9G00 Vp6jebAQvYVEJeiQID2WcDe/d9y7TclvNj+0kGK3K45X9AFXsTmjgjdZ0tlKwE14FbnmtFUqe EEGQ18VCxz7P9c8ZEEVUiL4dBeJu727UufjU0YujJGh1+kzG/g6f5Kb4uwF3W4/v4s0SKviAM UWBOLcjLU1WInyA9ORhaXe7Miu4vHhBkKsWHk51bYR9Te1qZyvSly7Gi5LPngnz+PMFpkCZ73 PKi4XdSAbSu56kDwstGadPRoNqhlvXyASj46wk/lUqvWoD95rMRnxWVWEHmF6b7Mc3H4NQAZl lZk1l5eHxtjAlN8EbCs89ZXUbItCmfuj24CPAIY1aAxbu3l7VumHE8d0BePLMm8uFwh9E+RVG bU2y97uSPjY1Wg/XqUHlV7zPeNJJFUKPSar3p3cmTKNVYBpjDaZ1smbPl8EwsS4110JZoXFT Received-SPF: pass client-ip=212.227.17.22; envelope-from=michael-franzese@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:129904 Archived-At: > Sent: Tuesday, May 18, 2021 at 8:56 PM > From: "Jean Louis" > To: "Eric Abrahamsen" > Cc: "Skip Montanaro" , "Help Gnu Emacs" , michael-franzese@gmx.com > Subject: Re: Determining existence of text following point > > * Eric Abrahamsen [2021-05-18 03:09]: > > michael-franzese@gmx.com writes: > > > > > But if there are only empty spaces it is ok too. > > (defun my-insert-on-empty-end-of-line (s) > (let ((line-cut (buffer-substring-no-properties (point) (line-end-posi= tion)))) > (when (or (not (string-match "[^[:blank:]]" line-cut)) (eolp)) > (insert s)))) Found out that I would need to extend this some more because if the text i= s ";;" followed by space followed by either a series of ";" or "+", or "-", then = the insertion is allowed. So not just only blanks. For instance, if the text in a commented string as follows, I will go ahea= d with the insertion. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ++++++++++++++++++++++++++++++++++ ;; ------------------------------- > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > >