From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Writing a function for a indented copy of a region Date: Wed, 17 Dec 2008 07:59:28 -0800 Message-ID: <001001c96060$72b521d0$0200a8c0@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229529605 11255 80.91.229.12 (17 Dec 2008 16:00:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2008 16:00:05 +0000 (UTC) To: "'Decebal'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 17 17:01:08 2008 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 1LCypY-0002O0-MF for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2008 17:01:00 +0100 Original-Received: from localhost ([127.0.0.1]:33011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCyoM-0004nl-GJ for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2008 10:59:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCyo1-0004lt-OG for help-gnu-emacs@gnu.org; Wed, 17 Dec 2008 10:59:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCyo0-0004jq-8i for help-gnu-emacs@gnu.org; Wed, 17 Dec 2008 10:59:25 -0500 Original-Received: from [199.232.76.173] (port=46680 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCynz-0004jn-U2 for help-gnu-emacs@gnu.org; Wed, 17 Dec 2008 10:59:23 -0500 Original-Received: from rcsinet13.oracle.com ([148.87.113.125]:21750 helo=rgminet13.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LCynz-0001pI-Dc for help-gnu-emacs@gnu.org; Wed, 17 Dec 2008 10:59:23 -0500 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBHFxmkJ010869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Dec 2008 15:59:50 GMT Original-Received: from acsmt703.oracle.com (acsmt703.oracle.com [141.146.40.81]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBHFxhGb030549; Wed, 17 Dec 2008 15:59:44 GMT Original-Received: from dradamslap1 (/69.181.100.171) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 17 Dec 2008 15:59:15 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AclgTQ1hRMJFbNdlTn2tztAsdb+AQgAEzw1w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt703.oracle.com [141.146.40.81] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010203.494921D5.000F:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:60735 Archived-At: > A lot of times I need to copy a part of a (log) file for an e-mail. I > like to indent this (default with four spaces). At this moment I do > this by hand. But I would like to do this with a function. > What I would like this function to do is take the part that is > selected, indent this with (default) four spaces, put the indented > region in the kill-ring and undo the indent. Has anyone a pointer > about how to code this? `C-x TAB' is `indent-rigidly' `M-w' copies the region to the `kill-ring'