emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Duianto - <otnaiud@gmail.com>
To: Duianto - <otnaiud@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: org-insert-item, indent causes a soft freeze or error message
Date: Mon, 6 Jul 2020 13:50:01 +0200	[thread overview]
Message-ID: <CAE-tX7iAeAgcqGLYoqd7bkOiaZm-uzD9PeEkwh_o0PWkODtVuw@mail.gmail.com> (raw)
In-Reply-To: <874kql3qhu.fsf@nicolasgoaziou.fr>

I applied the fix manually and there are no more freezes or error messages.

Thank you.

On Mon, Jul 6, 2020 at 12:08 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> Hello,
>
> Duianto - <otnaiud@gmail.com> writes:
>
> > Reproduction Steps:
> >
> > Copy the following lines:
> > 1. a
> >    b
> > 2. c
> >
>
> [...]
>
> > Move the cursor to the end of the first line, after the: a
>
> [...]
>
> > Evaluate the following command: S-M-; (org-insert-item) RET
>
> [...]
>
> > A Backtrace buffer opens with the message:
> >
> > Debugger entered--Lisp error: (args-out-of-range 0 1)
> >   replace-match("1. " nil nil nil 1)
> >   #f(compiled-function (struct old-struct item) #<bytecode
> > 0x497071>)(((1 0 "1. " nil nil nil 6) (6 0 "2. " nil nil nil 13) (16 0
> > "1. " nil nil nil 20)) ((1 0 "1. " nil nil nil 6) (6 0 "1. " nil nil
> > nil 13) (16 0 "2. " nil nil nil 20)) 16)
> >   org-list-struct-apply-struct(((1 0 "1. " nil nil nil 6) (6 0 "2. "
> > nil nil nil 13) (16 0 "1. " nil nil nil 20)) ((1 0 "1. " nil nil nil
> > 6) (6 0 "1. " nil nil nil 13) (16 0 "2. " nil nil nil 20)))
> >   org-list-write-struct(((1 0 "1. " nil nil nil 6) (6 0 "2. " nil nil
> > nil 13) (16 0 "1. " nil nil nil 20)) ((1) (6) (16)))
> >   org-insert-item()
> >   eval((org-insert-item) nil)
> >   eval-expression((org-insert-item) nil nil 127)
> >   funcall-interactively(eval-expression (org-insert-item) nil nil 127)
> >   call-interactively(eval-expression nil nil)
> >   command-execute(eval-expression)
>
> Fixed. Thank you.
> >
> > No indentation:
> > If the indentation is removed from the second line:
> > 1. a
> > b
> > 2. c
> >
> > Then it might be working as expected:
> > 1. a
> > 2.
> > b
> > 2. c
> >
> > a correctly numbered list item is inserted.
> >
> > The fourth lines list number: 2. c
> > didn't change, but it might be expected since there was no indentation
> > before the: b
> > therefore it might be assumed that the list ended there.
>
> This is expected. You need to fix the second list manually, with C-c C-c.
>
> Regards,
> --
> Nicolas Goaziou


      reply	other threads:[~2020-07-06 11:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06  8:51 org-insert-item, indent causes a soft freeze or error message Duianto -
2020-07-06 10:08 ` Nicolas Goaziou
2020-07-06 11:50   ` Duianto - [this message]

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAE-tX7iAeAgcqGLYoqd7bkOiaZm-uzD9PeEkwh_o0PWkODtVuw@mail.gmail.com \
    --to=otnaiud@gmail.com \
    --cc=emacs-orgmode@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).