emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-agenda-finalize throws args-out-of-range [9.3.6 (9.3.6-19-gf360f9-elpaplus @ /home/nivekuil/.emacs.d/elpa/org-plus-contrib-20200302/)]
@ 2020-03-03  1:36 Kevin Liu
  2020-05-24 12:27 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Liu @ 2020-03-03  1:36 UTC (permalink / raw)
  To: emacs-orgmode

This bit in org-agenda-finalize:

(save-excursion
	  (while (org-activate-links (point-max))
	    (add-text-properties (match-beginning 0) (match-end 0)
				 '(face org-link))))

Will throw an error at add-text-properties:

Debugger entered--Lisp error: (args-out-of-range 0 2)
  add-text-properties(0 2 (face org-link))
  org-agenda-finalize()
  org-agenda-list(nil)
  funcall-interactively(org-agenda-list nil)
  call-interactively(org-agenda-list)
  org-agenda(nil)
  funcall-interactively(org-agenda nil)
  call-interactively(org-agenda nil nil)
  command-execute(org-agenda)

This happens after I open the agenda, C-c C-o a captured file from my
org-journal, and then open the agenda again.  The effect is that
subsequent links after the first are not styled (visible brackets, not a
link).

However, it seems like add-text-properties may be redundant, and
org-activate-links does it already?  I deleted the add-text-properties
sexp entirely and it seems to work as expected.

Emacs  : GNU Emacs 27.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.14, cairo version 1.17.3)
 of 2020-02-24
Package: Org mode version 9.3.6 (9.3.6-19-gf360f9-elpaplus @ /home/nivekuil/.emacs.d/elpa/org-plus-contrib-20200302/)

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

* Re: Bug: org-agenda-finalize throws args-out-of-range [9.3.6 (9.3.6-19-gf360f9-elpaplus @ /home/nivekuil/.emacs.d/elpa/org-plus-contrib-20200302/)]
  2020-03-03  1:36 Bug: org-agenda-finalize throws args-out-of-range [9.3.6 (9.3.6-19-gf360f9-elpaplus @ /home/nivekuil/.emacs.d/elpa/org-plus-contrib-20200302/)] Kevin Liu
@ 2020-05-24 12:27 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2020-05-24 12:27 UTC (permalink / raw)
  To: Kevin Liu; +Cc: emacs-orgmode

Hi Kevin,

Kevin Liu <kevin@nivekuil.com> writes:

> This bit in org-agenda-finalize:
>
> (save-excursion
> 	  (while (org-activate-links (point-max))
> 	    (add-text-properties (match-beginning 0) (match-end 0)
> 				 '(face org-link))))
>
> Will throw an error at add-text-properties:
>
> Debugger entered--Lisp error: (args-out-of-range 0 2)
>   add-text-properties(0 2 (face org-link))
>   org-agenda-finalize()
>   org-agenda-list(nil)
>   funcall-interactively(org-agenda-list nil)
>   call-interactively(org-agenda-list)
>   org-agenda(nil)
>   funcall-interactively(org-agenda nil)
>   call-interactively(org-agenda nil nil)
>   command-execute(org-agenda)

FWIW I could not reproduce this bug but the code was wrong indeed, I
removed the redundant call to `add-text-properties' in maint.

I hope it fixed the problem you had, thanks for reporting it.

Best,

-- 
 Bastien


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

end of thread, other threads:[~2020-05-24 12:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03  1:36 Bug: org-agenda-finalize throws args-out-of-range [9.3.6 (9.3.6-19-gf360f9-elpaplus @ /home/nivekuil/.emacs.d/elpa/org-plus-contrib-20200302/)] Kevin Liu
2020-05-24 12:27 ` Bastien

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