From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Flaschen Newsgroups: gmane.emacs.help Subject: Re: Delete (kill) entire line at cursor - how? Date: Tue, 06 Mar 2007 03:34:15 -0500 Message-ID: <45ED2787.7030700@gatech.edu> References: <1173165762.936371.202290@q40g2000cwq.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1914389749==" X-Trace: sea.gmane.org 1173170113 24844 80.91.229.12 (6 Mar 2007 08:35:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2007 08:35:13 +0000 (UTC) To: cmr.Pent@gmail.com, emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 06 09:35:05 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HOV8R-0001em-SR for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Mar 2007 09:35:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOV8S-0005pY-FL for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Mar 2007 03:35:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HOV7s-0005pQ-37 for help-gnu-emacs@gnu.org; Tue, 06 Mar 2007 03:34:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HOV7q-0005ou-Dq for help-gnu-emacs@gnu.org; Tue, 06 Mar 2007 03:34:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOV7q-0005or-0R for help-gnu-emacs@gnu.org; Tue, 06 Mar 2007 03:34:26 -0500 Original-Received: from deliverator6.gatech.edu ([130.207.165.168]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1HOV7p-0006U1-6y for help-gnu-emacs@gnu.org; Tue, 06 Mar 2007 03:34:25 -0500 Original-Received: from deliverator6.gatech.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 01E92180F; Tue, 6 Mar 2007 03:34:24 -0500 (EST) (envelope-from matthew.flaschen@gatech.edu) Original-Received: from mailprx1.gatech.edu (mailprx1.prism.gatech.edu [130.207.171.15]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "smtp.mail.gatech.edu", Issuer "RSA Data Security, Inc." (verified OK)) by deliverator6.gatech.edu (Postfix) with ESMTP id D36201807; Tue, 6 Mar 2007 03:34:22 -0500 (EST) (envelope-from matthew.flaschen@gatech.edu) Original-Received: from [128.61.73.81] (r73h81.res.gatech.edu [128.61.73.81]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (sasl: method=PLAIN, username=mflaschen3@mailprx1.gatech.edu, sender=n/a) by mailprx1.gatech.edu (Postfix) with ESMTP id 85E1A26CE; Tue, 6 Mar 2007 03:34:22 -0500 (EST) (envelope-from matthew.flaschen@gatech.edu) User-Agent: Thunderbird 1.5.0.9 (X11/20070104) In-Reply-To: <1173165762.936371.202290@q40g2000cwq.googlegroups.com> X-Enigmail-Version: 0.94.2.0 X-detected-kernel: Solaris 9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:41705 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1914389749== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig733AD07F2DEF7DA5C09C6303" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig733AD07F2DEF7DA5C09C6303 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable cmr.Pent@gmail.com wrote: > I've been a Windows user for years, but recently I began to feel that > my usual work (mostly R scripts and scientific articles) could be done > much more efficiently in text-oriented environment, which Linux is. So > I've installed Linux and tried some editors like Kate, but they didn't > suit my needs 100% (for example, I don't know how to switch between > text file and console using keyboard, keeping console open; plus Kate > loads like ages). Now I'm studying Emacs. >=20 > Well, Emacs has this kewl psychotherapist and Conway's life built in, Thanks. I didn't know it had life. :) > I believe the Emacs is powerful enough to emulate such a feature, so > please, Emacs gurus, point me out how to create a _simple_ shortcut > (like C-y) which would kill line at cursor not moving the cursor > itself. I just made the below hack. Add it to your ~/.emacs file. Then, restart emacs and, C-x y will do what you ask (I think). There's probably a better way to do it: Matt Flaschen (defun kill-entire-line () "Kills the whole line, including terminating newline, and moves the cursor directly down" (interactive) (next-line 1) (save-excursion (previous-line 1) (beginning-of-line) (kill-line 1))) (global-set-key [?\C-x ?y] 'kill-entire-line) --------------enig733AD07F2DEF7DA5C09C6303 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF7SeNQ5LSyju97VkRAp5uAJ4t6NY9qwo1I2b6wNywCgv9dHsSRQCfaWls LjpySlPjHxbo0bkXVcoKRxQ= =6p/b -----END PGP SIGNATURE----- --------------enig733AD07F2DEF7DA5C09C6303-- --===============1914389749== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1914389749==--