From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Rodolfo Medina Newsgroups: gmane.emacs.help Subject: Re: Indent first line of each paragraph of file in one hit Date: Fri, 25 Nov 2016 12:20:45 +0000 Message-ID: <8760nbn42q.fsf@gmail.com> References: <877f7ssxfz.fsf@gmail.com> <20161125104812.GA8781@eee.birulevo.net> <87lgw7lrx3.fsf@gmail.com> <87k2brpyi0.fsf@gmail.com> <20161125121552.GA11459@eee.birulevo.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1480076486 5802 195.159.176.226 (25 Nov 2016 12:21:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2016 12:21:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Konstantin Shakhnov Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 25 13:21:19 2016 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 1cAFVF-0000SN-TB for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Nov 2016 13:21:18 +0100 Original-Received: from localhost ([::1]:45610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAFVJ-0003ej-Hh for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Nov 2016 07:21:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAFUp-0003ec-I1 for help-gnu-emacs@gnu.org; Fri, 25 Nov 2016 07:20:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAFUm-0006Kf-A8 for help-gnu-emacs@gnu.org; Fri, 25 Nov 2016 07:20:51 -0500 Original-Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:37122) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cAFUm-0006K2-41 for help-gnu-emacs@gnu.org; Fri, 25 Nov 2016 07:20:48 -0500 Original-Received: by mail-wm0-x22a.google.com with SMTP id t79so89900114wmt.0 for ; Fri, 25 Nov 2016 04:20:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lY0Uqsis9f8On2WDRnKGviYak0SKlc+fbt7QJeKAw7o=; b=ueGxPBPLfbNW/58ql9+672rIeERZGss+XdHpWPkIMGIW93muGQADrXNzEEJlPZKyrX VCeZkxcflMO6JiQwCRaXSspcSBdMQaYLwRTnHEuadPW7wFwKXgciqr6bFxNqeYK7FuLM P6oxD++cSb4WaIOB2lKG0M8PPnVLssbLBLcKALtzgxBGkqABo1gL07ab/vkp4N+R9Svp D8AKo20+xrv1Fz+4dQZF1upY7sCAQgq45VTVKxXvWtIIk56kgfqWHX4Te+7HwJd6xgsC U/3PuITNfUGqyNqT49uo0qrQn1uM9f0xf2Sv+31Cmv147MraI3iHDVgSg7NhAnYftTZh S9mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=lY0Uqsis9f8On2WDRnKGviYak0SKlc+fbt7QJeKAw7o=; b=j4gTOwD2Y2D79JO243CmBzSokR3yH3B69pl9C3LeGtwEgCPH/fQZrkLgge2zN7rl/Q VaLWU0FlvV5NxJgaQCxRoU9wEd7v2cV9o3zMBiK6P7PZEmQuUI5KGV2NmoEr2IxZwGw8 zy5MtlZUdYRUhDAJl1qTvSXtnpLsY4hdjhYTkH08hwJrvPdJNBcFh0BpABH+ECAavT86 yq7eJdvq2+B6h0nhyM+25UO4wKNjTgeNk3T3nHZk95GiY3csE2QVSS/LNkyhUXbpO/Ix hQowPJBpEQ2D4ypypmD4na9udQkm74bdsvZGQMWdO1I4frkvrBBLz6+fqDSS/7zNcKUZ BI8w== X-Gm-Message-State: AKaTC020lK4+iabItQaQIJGn7af/K9b5yy50cGEMn/7MCHFOHPuQZdUujkEsRCENPT4Nww== X-Received: by 10.28.130.66 with SMTP id e63mr7110800wmd.39.1480076446879; Fri, 25 Nov 2016 04:20:46 -0800 (PST) Original-Received: from sdb6-pentium3 ([151.70.84.20]) by smtp.gmail.com with ESMTPSA id k2sm46796926wjv.11.2016.11.25.04.20.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 04:20:46 -0800 (PST) In-Reply-To: <20161125121552.GA11459@eee.birulevo.net> (Konstantin Shakhnov's message of "Fri, 25 Nov 2016 15:15:52 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22a 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:111801 Archived-At: Konstantin Shakhnov writes: > On Fri, Nov 25, 2016 at 11:52:55AM +0000, Rodolfo Medina wrote: >> This seems to work: >> >> (defun my-indent-first-line1 () >> "Indent the first line of each paragraph" >> (interactive) >> (backward-paragraph) >> (next-line) >> (insert " ") >> (fill-paragraph) >> ) > > > Yes, I've just made something similar. But there is a trap - if your > file doesn't starts with '\n' you'll get wrong indentation of the > first paraghaph Yes, I see. No way to avoid that? Rodolfo