emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-insert-link issues error when list of links is empty [6.33trans (release_6.33f.34.gf806)]
@ 2009-11-25 18:13 Bernt Hansen
  2009-11-26  6:14 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Bernt Hansen @ 2009-11-25 18:13 UTC (permalink / raw)
  To: emacs-orgmode


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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: org-insert-link issues error when list of links is empty [6.33trans (release_6.33f.34.gf806)]
  2009-11-25 18:13 Bug: org-insert-link issues error when list of links is empty [6.33trans (release_6.33f.34.gf806)] Bernt Hansen
@ 2009-11-26  6:14 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-11-26  6:14 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Fixed, thanks.

- Carsten

On Nov 25, 2009, at 7:13 PM, Bernt Hansen wrote:

>
> 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)
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-26  6:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-25 18:13 Bug: org-insert-link issues error when list of links is empty [6.33trans (release_6.33f.34.gf806)] Bernt Hansen
2009-11-26  6:14 ` Carsten Dominik

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).