all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Heime <heimeborgia@protonmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: Re: insert gives args out of range
Date: Fri, 16 Aug 2024 23:29:10 +0200	[thread overview]
Message-ID: <871q2oma1l.fsf@gmx.net> (raw)
In-Reply-To: <bqmrtlfHkoF_7Bw5ts6HniFAFIYYcbXxab8rb28iU9N7mA6vOwLWdgQSkq8aSLnfIpfI9G_atxMdhIKqBae8WNaQT_vgIKlS7kuNRxGyzXA=@protonmail.com> (Heime's message of "Fri, 16 Aug 2024 17:32:49 +0000")

On Fri, 16 Aug 2024 17:32:49 +0000 Heime <heimeborgia@protonmail.com> wrote:

> On Saturday, August 17th, 2024 at 3:34 AM, Stephen Berman
> <stephen.berman@gmx.net> wrote:
>
>> On Fri, 16 Aug 2024 15:21:12 +0000 Heime heimeborgia@protonmail.com wrote:
[...]
>> > I have solved the problem by adding (forward-line 1) after setting blank-lines
>> >
>> > (while (and (< blank-lines 2)
>> > (re-search-forward "^\\s-*$" nil t))
>> > (setq blank-lines (1+ blank-lines))
>> > ;; Move point forward to avoid re-matching the same blank line
>> > (forward-line 1))
>> >
>> > Could this fail on some circumstances ?
>>
>>
>> Depends on what you consider failure: with the buffer "test" I gave as
>> an example above, output-buffer contains not just two but three empty
>> lines between the two defuns, and not just one but two empty lines at
>> the end; is that what you want?
>>
>> Steve Berman
>
> By failure, I mean this: Could Emacs fire an error buffer based on some unforeseen
> structure of the file when re-search-forward executes ?

Yes.

Steve Berman



  reply	other threads:[~2024-08-16 21:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16  9:24 insert gives args out of range Heime
2024-08-16  9:54 ` Stephen Berman
2024-08-16 10:20   ` Heime
2024-08-16 10:59     ` Heime
2024-08-16 11:51       ` Stephen Berman
2024-08-16 12:03         ` Heime
2024-08-16 12:10           ` Heime
2024-08-16 12:26             ` Stephen Berman
2024-08-16 15:01               ` Heime
2024-08-16 15:09                 ` Heime
2024-08-16 15:16                   ` Stephen Berman
2024-08-16 15:21                     ` Heime
2024-08-16 15:34                       ` Stephen Berman
2024-08-16 17:32                         ` Heime
2024-08-16 21:29                           ` Stephen Berman [this message]
2024-08-16 21:47                             ` Heime
2024-08-16 22:26                               ` Stephen Berman
2024-08-17  9:47                                 ` Heime

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=871q2oma1l.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.