From: Rodolfo Medina <rodolfo.medina@gmail.com>
To: Konstantin Shakhnov <kastian@mail.ru>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Indent first line of each paragraph of file in one hit
Date: Fri, 25 Nov 2016 12:20:45 +0000 [thread overview]
Message-ID: <8760nbn42q.fsf@gmail.com> (raw)
In-Reply-To: <20161125121552.GA11459@eee.birulevo.net> (Konstantin Shakhnov's message of "Fri, 25 Nov 2016 15:15:52 +0300")
Konstantin Shakhnov <kastian@mail.ru> 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
next prev parent reply other threads:[~2016-11-25 12:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-24 15:35 Indent first line of each paragraph of file in one hit Rodolfo Medina
2016-11-24 22:44 ` Rodolfo Medina
2016-11-25 10:48 ` Konstantin Shakhnov
2016-11-25 11:28 ` Rodolfo Medina
2016-11-25 11:52 ` Rodolfo Medina
2016-11-25 12:15 ` Konstantin Shakhnov
2016-11-25 12:20 ` Rodolfo Medina [this message]
2016-11-25 12:45 ` Konstantin Shakhnov
2016-11-25 15:39 ` [solved] " Rodolfo Medina
-- strict thread matches above, loose matches on Subject: below --
2016-11-24 20:18 Rodolfo Medina
2016-11-25 11:34 ` Andreas Röhler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760nbn42q.fsf@gmail.com \
--to=rodolfo.medina@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=kastian@mail.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.