From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Magnus Therning Newsgroups: gmane.emacs.help Subject: Re: How to delete all text from beginning of buffer to mark Date: Tue, 09 May 2017 13:39:04 +0200 Message-ID: <874lwu9s4n.fsf@therning.org> References: <481f9e2a-475f-4fb6-bb6b-abba56a27c2f@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1494336222 5777 195.159.176.226 (9 May 2017 13:23:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 May 2017 13:23:42 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 25.2.1 Cc: help-gnu-emacs@gnu.org To: Angus Comber Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 09 15:23:38 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8573-0001Ns-4t for geh-help-gnu-emacs@m.gmane.org; Tue, 09 May 2017 15:23:37 +0200 Original-Received: from localhost ([::1]:37250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8578-0000N1-Nv for geh-help-gnu-emacs@m.gmane.org; Tue, 09 May 2017 09:23:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d83Tz-00014m-GD for help-gnu-emacs@gnu.org; Tue, 09 May 2017 07:39:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d83Tw-00049v-EV for help-gnu-emacs@gnu.org; Tue, 09 May 2017 07:39:11 -0400 Original-Received: from mail-wr0-x236.google.com ([2a00:1450:400c:c0c::236]:34447) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d83Tw-00049j-6V for help-gnu-emacs@gnu.org; Tue, 09 May 2017 07:39:08 -0400 Original-Received: by mail-wr0-x236.google.com with SMTP id l9so68910444wre.1 for ; Tue, 09 May 2017 04:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=therning-org.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=KVD17m/J0SR8yz83sf5m6zFccDLBZmY39T3uNFrYVMI=; b=jdlPgIYPoxi9M5qOVrxOF1kAG5isXZbD+9CGU91N/w3uBD1m1l2lFpS4a9WP0Z77xz ASe1orn74d/5X6Bte+u7Ztfs6K1dyMQYQlOqWMmxYJ3KMOuEwlKN+dDs5nSi95xJM5hd gr97U+vt0BEbKb+J2OGCLTKJIwsgAv/q/TMSnhVBzMz4ldv2K2oH2iqXsodQx4Q63DTZ SFZaZXeI7bVXXPh6uwbaNHlsyQ3luvjXX/6Zc8pun+j/y1kKavH0X8P5HEgQKBeTe/LE T/e/gAl6z3KOlejwSUXDMoM/fXIbuuRYFsMPxO8axFLs8M9Om+ZDnn8uyJG7bEBi6rM9 Lb2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=KVD17m/J0SR8yz83sf5m6zFccDLBZmY39T3uNFrYVMI=; b=N8iPUAeS9S6LRQl/nIktuwrsyTjr/7VelgrZuah53yu2duIH20TjeCA8jiMQpkqFP1 ZhO62ELkMqRsfhkexkRM5ko4UJQ+YBgl6kbOHGb7wFjGzIO8c87a3U2XCTiZ0d1pPGy2 rOgajyav0Kd6JkdgOUhjB+bNwEFqmQwhUkAWgc1AW6/04NXfI65PE+0hGUAnxmSLNnoh u/AXrwKI+1vC27zR2FYAvcFr5j2KHVM9GG5Q8+RWwGjJ1QOQhKDDB2qqlzW/Rj0/uuz9 RHHajPLSsFs5BjVLWSsuWINvMzpeNcqT8FJC3vcfHiSx4OI8S8AyaqMvWqgdp0LGthMU /kag== X-Gm-Message-State: AODbwcAk7ylBMevxZILieRRkDMFdgm/cNNAMBpf7SmupAURg8Ug1p6EK xBBvDWslJJoGSACC X-Received: by 10.25.235.210 with SMTP id f79mr12642836lfk.27.1494329946626; Tue, 09 May 2017 04:39:06 -0700 (PDT) Original-Received: from sobel (pc-132.aktiviteten.se. [194.218.229.132]) by smtp.gmail.com with ESMTPSA id f20sm3263505lfa.21.2017.05.09.04.39.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 May 2017 04:39:05 -0700 (PDT) In-reply-to: <481f9e2a-475f-4fb6-bb6b-abba56a27c2f@googlegroups.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::236 X-Mailman-Approved-At: Tue, 09 May 2017 09:22:55 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112978 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Angus Comber writes: > I am in a large file of text and my cursor is at the start of the text > I want. I want to delete all the text before the cursor. I know I can > set the mark using C-sp but how do I then select to the beginning of > the file? > > What is the best way to basically delete all text before the cursor in > the buffer? In Evil mode this one way to do it: `d 0 k d gg` ;) If you the text you want is at the start of a line you can skip the initial `d 0`. /M =2D- Magnus Therning OpenPGP: 0x927912051716CE39 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus Some people, when confronted with a problem, think, =E2=80=9CI know, I=E2=80=99ll use MySQL.=E2=80=9D Now their problem is a si= ngle point of failure. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKwgezhW98spw4aSSknkSBRcWzjkFAlkRqlgACgkQknkSBRcW zjl5nRAAlHkwra4vezzxFI5yceDZTsAMg68mCwSiM/GbGv5A52TEymAne0F8Rdyj ThH5l1w44DVOWZNhXbhl1Efw5eCo4uCP5ZEKeVBvgiL9o29/eXxdcWDqEcc26t2Q 04pXM+KFrws2D0jlrX5mBS2VEBBIoQMxhmJncoIt133UU+CsXno1Qh0m98UPfsVA RFhBCSMerYO2asOQotbVsllrAK8jF+HESn9oP+3VQRh9oGsnocUOBIzaFSQ4Lqrs cOwntDTpfCfDyOq9U3ZeZMHOD+TOOrBa/eDvHbn2samMKELrSoh9O9gqSS8utftO +T/8l4JjGwCNmFb+FqtvyQ+mXuDimyCX8iJdHuUsQ714darccU0aSpr1z0iu098e iV1OXu5j3zFoIRXKUj0ipqCnT14qRQGMhR0a6oJVvlovqcuZXYuoQK/wsDf5wANO QDGIuWZLXgnQw+oQfgnqVS8W3LbVKotb7SrrGqROzPE9tioeXNGyJBTHnsdtQnMl DyoY6QlJanqMpaOah5oe0fxwjcRZSFblhN4IWL/dmZZgRdDrm0DIOD0DAJezTBKO xz4WSdQNC+rbLsbeY+WIzHPh4pUi/SFib0/jY9st4rw9VP3W8LvqunprGGRBLAaN vFyxkwGzaIdRT75p+xJKP2aFxb1B4Tj6fdHk1ZJUntYYnVEGEbc= =PjlX -----END PGP SIGNATURE----- --=-=-=--