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 01:53:48 +0200 Message-ID: References: <87cztpx8oz.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="20423"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Skip Montanaro , Help Gnu Emacs To: Eric Abrahamsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 01:54:39 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 1lin4I-00055i-UV for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 01:54:38 +0200 Original-Received: from localhost ([::1]:55058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lin4H-0003PD-Vd for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 17 May 2021 19:54:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lin3l-0003Ol-KI for help-gnu-emacs@gnu.org; Mon, 17 May 2021 19:54:05 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:49503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lin3j-0001lQ-NV for help-gnu-emacs@gnu.org; Mon, 17 May 2021 19:54:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621295628; bh=XpEOSMdN+BWWfmtag5CBDCYmaysQ56OHZ0Kp/dNGxvA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=gItSiMefZFv/p+MIw6K5W3U3+DAaoBMYfEdTO2XT6YMuGiUEZNq7gZ/t1+n8Cn+bg sDVLa1B+SkI15/Itfprz9zwJ3vxlGgrMMZ6GbFXi/kNbedOrYaxUBfljH67MqVFLGa uLn4NtG+4HJ5tqPY37/q4UJnKn2zZuPXnpbRPiuo= 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-bs06.server.lan [172.19.170.174]) (via HTTP); Tue, 18 May 2021 01:53:48 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <87cztpx8oz.fsf@ericabrahamsen.net> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:cYEgZMVAsWkEQjLpnUeekGh6saW5Hz7o5e0zphMqI/LBp/qS0yr5zBTBbRvMWy8Lqour3 Yf9FWQEGOrznZFOMflbzUdq16xRPEp6JkJqY+qrIEgCCfAaH1egoMFW6ZxuHN/o2rWoU8WiEwO4U UFNOkFE5BGUuPPMbOf8NVrVqLVTb6FCIKTvkSdJ6z+EFI+LAzAHqlUKMybKAUsz4DWDcoTYygxSp uhAQ1CD0cEmVAcgHNAgvkDKdusU+t5btuZQQwt/ui9G1fvca9nTFWVku+qemm9oL/WTlpiVhzPJF eo= X-UI-Out-Filterresults: notjunk:1;V03:K0:mAyd4ECiy8E=:sAhXhj2jozobBXCZpv4aES mbH7WTGVsjYlOCl8FW2sVQP3Y6nfcATKfwA4hisTjjYpUnvoDX+9dtCq57QMQfmUaypABz8wj cUEzf4+N7180/o6oum0nWrCv3sxjquNqcko4+3VXb6MhA5yA+P+z77gcqjNB3RPZ2N6jE7Xwk pdInkHGyCxviSFPLZFxsXdRz247THRTQkTBBdeMb0Urpc/D+MqH8Vn7SHs+YKmtcQKzYhZvlW Ond1rLa9S6L9xfji7K8kRvmRMD8cj1eIBXPiw9QGDlAgXKVha0SgyV2HmfDHjALbvCDU570Ry 21aYpZndDkGKrrL/yCnnaOzAYd31e0VrQzXcJb2Fosq8UhatnZU0p6IaZWesMpunCb9h08tQf 7TGeFCpxsT1hfkLxfuK258bFdFeN7fmD8Jh3Aw+VnPx7MwRv5LGMS62Mdz0eW0Y9Pc/8iK67e jxxjFUaiObj6LwWBXQEq5znv28veU6F7rjSbUlWGn8Wg+TCfsLywcAlUOl7xIdIoNOZMktFMO bRIpNON1AdUYznpZSQ4TWufIByXVHw4KmaWfB7N4agGx9AMe4RjF35v2L6mWvLErna9wLF7vG u9QvpPGKERGtWvUYBAs914XRZ0Rq4C9VOhMl1aJQ/5+xaonWZzDNtCSqQmJy63+AXLk8vIHCp YtWKzVF2J0nMj8LJVoH6S4SsABOvfuWx/nkkSnL7IjBLOP4VD/G132SKmZR14g1sr8vrBh4OL zSKj/xvwARRRZL2mrmdvDKDOoTd3gRYav42BF/SD/TbS27aDHlmrbDjEvaQvOvCawhg+xuW+ Received-SPF: pass client-ip=212.227.15.18; 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_H3=0.001, RCVD_IN_MSPIKE_WL=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:129850 Archived-At: I could use something based on the follewing (if (looking-at "[[:alnum:]]+") But I am quite unsure about the regexp=2E If there exists at least a char= acter, I would not insert any text=2E > Sent: Tuesday, May 18, 2021 at 11:05 AM > From: "Eric Abrahamsen" > To: michael-franzese@gmx=2Ecom > Cc: "Skip Montanaro" , "Help Gnu Emacs" > Subject: Re: Determining existence of text following point > > michael-franzese@gmx=2Ecom writes: >=20 > > Would like to delete and insert a string "s" only if there is no te= xt > > folloming point=2E > > > > (delete-region (point) (line-end-position)) > > (save-excursion (insert s)) >=20 > There's a function for this: `eolp' >=20 > Return t if point is at the end of a line=2E > =E2=80=98End of a line=E2=80=99 includes point being at the end of the b= uffer=2E >