emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: emacs-orgmode@gnu.org
Subject: Bug: org-insert-link issues error when list of links is empty [6.33trans (release_6.33f.34.gf806)]
Date: Wed, 25 Nov 2009 13:13:23 -0500	[thread overview]
Message-ID: <200911251813.nAPIDNn3001193@gollum.intra.norang.ca> (raw)


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

C-c C-l RET when there are no links in the list gives the following
backtrace.  This should probably just report a more user-friendly
error message.

-Bernt

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (args-out-of-range "" -1 0)
  substring("" -1)
  (equal ":" (substring link -1))
  (and (equal ":" (substring link -1)) (member (substring link 0 -1) all-prefixes) (setq link (substring link 0 -1)))
  (or (member link all-prefixes) (and (equal ":" ...) (member ... all-prefixes) (setq link ...)))
  (if (or (member link all-prefixes) (and ... ... ...)) (setq link (org-link-try-special-completion link)))
  (progn (setq link (let ... ...)) (if (or ... ...) (setq link ...)))
  (unwind-protect (progn (setq link ...) (if ... ...)) (set-window-configuration wcf) (kill-buffer "*Org Links*"))
  (cond (link-location) ((org-in-regexp org-bracket-link-regexp 1) (setq remove ...) (setq desc ...) (setq link ...)) ((or ... ...) (setq remove ... link ...)) ((member complete-file ...) (setq link ...)) (t (with-output-to-temp-buffer "*Org Links*" ... ...) (let ... ... ... ... ...) (setq tmphist ...) (setq all-prefixes ...) (unwind-protect ... ... ...) (setq entry ...) (or entry ...) (if ... ...) (setq desc ...)))
  (let* ((wcf ...) (region ...) (remove ...) (desc region) tmphist (link link-location) entry file all-prefixes) (cond (link-location) (... ... ... ...) (... ...) (... ...) (t ... ... ... ... ... ... ... ... ...)) (if (string-match org-plain-link-re link) (setq link ...)) (when (and buffer-file-name ...) (let* ... ...)) (when (string-match "^file:\\(.*\\)" link) (let* ... ... ... ...)) (if org-make-link-description-function (setq desc ...)) (setq desc (read-string "Description: " desc)) (unless (string-match "\\S-" desc) (setq desc nil)) (if remove (apply ... remove)) (insert (org-make-link-string link desc)))
  org-insert-link(nil)
  call-interactively(org-insert-link)
--8<---------------cut here---------------end--------------->8---


Emacs  : GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2008-11-09 on raven, modified by Debian
Package: Org-mode version 6.33trans (release_6.33f.34.gf806)

             reply	other threads:[~2009-11-25 18:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25 18:13 Bernt Hansen [this message]
2009-11-26  6:14 ` Bug: org-insert-link issues error when list of links is empty [6.33trans (release_6.33f.34.gf806)] Carsten Dominik

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=200911251813.nAPIDNn3001193@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --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).