From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: How to detect end of buffer? [was: Deleting a word using keybinding] Date: Fri, 16 Oct 2020 00:12:01 +0200 Message-ID: References: <4b391ea8-ef95-42f8-990b-6ff2bfccd201@default> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21101"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs , Thien-Thi Nguyen To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 16 00:14:45 2020 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 1kTBWH-0005Pc-7T for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 16 Oct 2020 00:14:45 +0200 Original-Received: from localhost ([::1]:42892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTBWG-0004m0-3P for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Oct 2020 18:14:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTBTs-0004lM-UW for help-gnu-emacs@gnu.org; Thu, 15 Oct 2020 18:12:18 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:33085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTBTp-0007iQ-Af for help-gnu-emacs@gnu.org; Thu, 15 Oct 2020 18:12:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1602799921; bh=OzN7aSFmXB1NauzJa6cBHXCxP0JdywWjt2G5TgcYyvI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=MF4Q4KKtAXJ8bPlZftW1Y+TerEFBkvSFwl39vruTC45M+RhMX5KYk4mUvJQpV/S2B 1HvwgGYny60bfFW7iQ24eAKijt9oTBpjdyrJfeJRZtu4+2vwkwRFHDDNmZnzYqeZ65 eQ0DJho/iuJzXDhGMy2Zlq1pzFBzjPAyT0ekcSvE= 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-bs01.server.lan [172.19.170.58]) (via HTTP); Fri, 16 Oct 2020 00:12:01 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <4b391ea8-ef95-42f8-990b-6ff2bfccd201@default> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:IbpO8EeJcE1vM16xmad7fjXIH6Jq4nrZWtyZ3bG/JAvelvZnU2757sFWvDJIOKjKVftLY dzBR831Yq0CkkcXtNzXHvMKV/RrjvrTUUHLkdQ8b298nBIckVS9RZIORerKVwxWD3r8v0W0TAn3A eNo2z6LOIovuNknFB9bO7hOgMtCjJi16xuPjj99JPdVEMdmkgRBE5qrGvyaBbtlb4uSeZhofscS2 /8HdYWnoj1J9pmG6BgNtyi7S1z1P/wmx/mdOAQxUSzKyicLyC+Z4EYyVOpkIS6/6KsOkV8g0eyDx BQ= X-UI-Out-Filterresults: notjunk:1;V03:K0:nIzQTHOQJlQ=:5RI74TvNKksFFMV9vaah6n qS7ihlvm7RNc4fJOeEGY5upskzrgviJ/u89SKQ9o3ozBEWBl4hQaaonFd7pxkVNdFKvmfbOg+ ncyJDFDhEHCBNqrl2N6K4Enfx/e0gZUUPUHnoncj40ZBJdA3kPmMYpqGp1NnKhosd1fVFiaVd TG9KIaftJp4ojnNCaNMOTz0lSoGdfR183SCuH3Tm4fSeV3G8mavyfhp7HfbsZ9wldPjLZHKDo CGmwT26h4pXbEMV//Pukg0+h4exDyMFfBXJwGL8onmtdJMsWhhk97GhPOY5pIySjJuWjU84vw yR4wF+gEnfeXqyuNOIOcOWledOW9BHE2TraJ7edYTH9XMOSuztufK6F/8/qzqo6fgJNEwrHhX 9D62N9TsxVC5FVpXlAD0jVGZ7AbMHxOtviZG1f6l6qwq1xyIk+LsUWY/CmhdGd0T45JnAgJrH +ahD5My0ZbS3gQ6wOOkQsdhKJFF3r25JUDQAOdKvMVTIG/HFdN0kK5Y8E+jUFBfqY0zvEQjIq Ozm+muRKqEz2ExkrqQ/ssY7AJ5gUpCr6Yz6DIxkEdmLNzqb8bVKfW02XYnzsXy+Jnxu2qT3FH phu9v7jP4gHyk= Received-SPF: pass client-ip=212.227.15.18; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 18:12:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, 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-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:124480 Archived-At: I think I have done it now. But I would be happy should someone spot some problem. Regarding the condition below, I think it takes care of the ranges appropriately, so that I can go to the beginning of the word. It should determine whether the current point is on a number or a letter. if (looking-at "[0-9a-zA-Z]") Sent: Thursday, October 15, 2020 at 11:46 PM From: "Drew Adams" To: "Christopher Dimech" Cc: "Help Gnu Emacs" , "Thien-Thi Nguyen" Subject: How to detect end of buffer? [was: Deleting a word using keybinding] > > Is there a way to detect end of buffer? > > Function `eobp' FYI, for asking Emacs itself: `C-h d end buffer' or `C-h d buffer end' finds `eobp' for you. That's command `apropos-documentation'. It searches doc strings for the words or regexp you give it. (Actually, it doesn't find it with Emacs 26, for some reason. But it does with Emacs 27.)