emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Carlos Pita <carlosjosepita2@gmail.com>
Cc: Greg Minshall <minshall@umich.edu>, emacs-orgmode@gnu.org
Subject: Re: [BUG] "args out of range" on link heading completion [9.5 (9.5-gd361c7 @ /Users/carlos/.emacs.d/straight/build/org/)]
Date: Sat, 11 Dec 2021 16:00:53 +0800	[thread overview]
Message-ID: <87lf0rin9m.fsf@localhost> (raw)
In-Reply-To: <m2wnm566hp.fsf@gmail.com>

Carlos Pita <carlosjosepita2@gmail.com> writes:

> Hi Igor,
>
> I believe the problem is in:
>
>     (defun pcomplete/org-mode/searchhead ()
>        ...
>           ;; When completing a bracketed link, i.e., "[[*", argument
>           ;; starts at the star, so remove this character.
>           (substring pcomplete-stub 1))))  <-- trailing ]] not removed!
>
> Changing the last line to (substring pcomplete-stub 1 -2) fixes it in my
> example. I don't know if one is supposed to do [[*prefix<c-a-p>]] or
> [[*prefix<c-a-p> as is implied by the code, but better to support both,
> specially considering electric pairs, don't you think?

I agree that the error is thrown there. However, there is nothing wrong
in the pcomplete/org-mode/searchhead. It is pcomplete that is passing
something strange to our completion backend.

Maybe you can try to send it as Emacs bug?

Best,
Ihor



  parent reply	other threads:[~2021-12-11  8:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20 23:09 [BUG] "args out of range" on link heading completion [9.5 (9.5-gd361c7 @ /Users/carlos/.emacs.d/straight/build/org/)] Carlos Pita
2021-10-21  3:50 ` Greg Minshall
2021-10-21  4:07   ` Carlos Pita
2021-10-21  4:45     ` Ihor Radchenko
2021-10-22  4:14       ` Carlos Pita
2021-10-22  8:08         ` Carlos Pita
2021-12-11  8:00         ` Ihor Radchenko [this message]
2022-10-07  7:52         ` Ihor Radchenko
2021-10-21 15:22     ` Greg Minshall
  -- strict thread matches above, loose matches on Subject: below --
2021-10-20  8:36 Carlos Pita

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=87lf0rin9m.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=carlosjosepita2@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=minshall@umich.edu \
    /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).