From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: C-x home/end to select buffer before/after point? Date: Mon, 24 Sep 2007 10:28:05 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1190654971 19892 80.91.229.12 (24 Sep 2007 17:29:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Sep 2007 17:29:31 +0000 (UTC) To: "Emacs-Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 24 19:29:26 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IZrkK-00045G-Kx for ged-emacs-devel@m.gmane.org; Mon, 24 Sep 2007 19:29:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IZrkH-00083h-Gf for ged-emacs-devel@m.gmane.org; Mon, 24 Sep 2007 13:29:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IZrkF-00083X-6M for emacs-devel@gnu.org; Mon, 24 Sep 2007 13:29:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IZrkD-000832-KB for emacs-devel@gnu.org; Mon, 24 Sep 2007 13:29:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IZrkD-00082y-E2 for emacs-devel@gnu.org; Mon, 24 Sep 2007 13:29:17 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IZrkD-0007YO-6O for emacs-devel@gnu.org; Mon, 24 Sep 2007 13:29:17 -0400 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l8OHTEXw031383 for ; Mon, 24 Sep 2007 12:29:15 -0500 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id l8OBCaGj012264 for ; Mon, 24 Sep 2007 11:29:12 -0600 Original-Received: from dhcp-4op11-4op12-west-130-35-178-158.us.oracle.com by acsmt350.oracle.com with ESMTP id 3240130731190654884; Mon, 24 Sep 2007 10:28:04 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-Detected-Kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:79720 Archived-At: Any interest in these commands? They select the text preceding and following point. I bind them to `C-x home' and `C-x end'. (I don't bother with bindings for console mode, personally.) I tend to write commands that act on either the whole buffer or the region, if active, rather than acting from point forward. That is one motivation for these commands. (defun mark-buffer-before-point (reversep) "Select the part of the buffer before point. With a prefix argument, select the part after point." (interactive "P") (mark-buffer-after-point t)) (defun mark-buffer-after-point (reversep) "Select the part of the buffer after point. With a prefix argument, select the part before point." (interactive "P") (push-mark (if reversep (point-min) (point-max)) nil t) (setq deactivate-mark nil))