emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Juan Pechiar <juan@pechiar.com>
To: Emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [BUG] org-agenda-goto-today from end of agenda buffer fails / OS-X only
Date: Sat, 29 Sep 2012 00:20:49 -0300	[thread overview]
Message-ID: <20120929032049.GA21191@soloJazz.com> (raw)

A very minor bug when jumping to today from agenda buffer, on Emacs
for OS-X.

To reproduce:

On the weekly agenda buffer (C-c a a):
 - switch to a week other than the current week (e.g. press 'f')
 - go to the end of the buffer ('M->')
 - call org-agenda-goto-today (press '.')

This operation fails with

    'call-interactively: Wrong type argument: consp, nil'

The following setf fails because org-agenda-overriding-arguments is nil:

    (setf (nth 1 org-agenda-overriding-arguments) sd)

The value of org-agenda-overriding-arguments is set to

    (get-text-property (point) 'org-last-args)

So apparently, at end of agenda buffer (not on this week), this last
expression returns nil.

I get this error on Emacs for OSX (GNU Emacs 24.1.50.1
(x86_64-apple-darwin, NS apple-appkit-1038.36)), running Emacs -q or
otherwise, with latest org-mode development version (Org-mode version
7.9.1 (release_7.9.1-421-ge54882)).

Error does not occur on Linux.

Call trace:

Debugger entered--Lisp error: (wrong-type-argument consp nil)
  setcar(nil 734770)
  (let* ((c (nthcdr 1 org-agenda-overriding-arguments))) (setcar c sd))
  (setf (nth 1 org-agenda-overriding-arguments) sd)
  (let* ((sd (org-agenda-compute-starting-span (org-today) (or curspan org-agenda-ndays org-agenda-span))) (org-agenda-overriding-arguments args)) (setf (nth 1 org-agenda-overriding-arguments) sd) (org-agenda-redo) (org-agenda-find-same-or-today-or-agenda))
  (cond (tdpos (goto-char tdpos)) ((eq org-agenda-type (quote agenda)) (let* ((sd (org-agenda-compute-starting-span (org-today) (or curspan org-agenda-ndays org-agenda-span))) (org-agenda-overriding-arguments args)) (setf (nth 1 org-agenda-overriding-arguments) sd) (org-agenda-redo) (org-agenda-find-same-or-today-or-agenda))) (t (error "Cannot find today")))
  (let* ((args (get-text-property (point) (quote org-last-args))) (curspan (nth 2 args)) (tdpos (text-property-any (point-min) (point-max) (quote org-today) t))) (cond (tdpos (goto-char tdpos)) ((eq org-agenda-type (quote agenda)) (let* ((sd (org-agenda-compute-starting-span (org-today) (or curspan org-agenda-ndays org-agenda-span))) (org-agenda-overriding-arguments args)) (setf (nth 1 org-agenda-overriding-arguments) sd) (org-agenda-redo) (org-agenda-find-same-or-today-or-agenda))) (t (error "Cannot find today"))))
  org-agenda-goto-today()
  call-interactively(org-agenda-goto-today nil nil)

Thanks,
.j.

             reply	other threads:[~2012-09-29  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-29  3:20 Juan Pechiar [this message]
2012-09-29  6:18 ` [BUG] org-agenda-goto-today from end of agenda buffer fails / OS-X only Bastien

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=20120929032049.GA21191@soloJazz.com \
    --to=juan@pechiar.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).