emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: serious calendar integration bug
Date: Thu, 28 Apr 2011 08:02:33 -0400	[thread overview]
Message-ID: <BANLkTinUoKng9rjh2k6+CHN860S_JxW7jw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikyRLuEFU1C=-2KOaAZ5k_is_=gUw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3473 bytes --]

forgot to reply  to the list..

---------- Forwarded message ----------
From: Matt Price <moptop99@gmail.com>
Date: Wed, Apr 27, 2011 at 6:11 PM
Subject: Re: [O] serious calendar integration bug
To: David Maus <dmaus@ictsoc.de>




On Wed, Apr 27, 2011 at 3:11 PM, David Maus <dmaus@ictsoc.de> wrote:

> At Wed, 27 Apr 2011 11:06:38 -0400,
> Matt Price wrote:
> >
> > [1  <text/plain; ISO-8859-1 (7bit)>]
> >
> > [2  <text/html; ISO-8859-1 (quoted-printable)>]
> > Hi folks,
> >
> > Using a recent git version of org-mode (release_7.5.209.g1a687) with a
> fairly recent emacs-snapshot (20110408-1, a package from the debian
> emacs-snapshot ppa, but running under ubuntu maverick), I'm having a
> > really terrible calendar bug -- not sure if it comes from org or from
> emacs, but reporting here in case anyone else has seen it.  Attempts to
> insert a timestamped schedule or deadline using C-c C-s or C-c C-d
> > bring up an EMPTY buffer called Calendar, while REPLACING THE CONTENTS of
> the active buffer with the text of a calendar.  I had a near-catastrophic
> moment where I killed what I thought was a calendar buffer,
> > but then ended up erasing my main reference file for all my org notes.
> Has anyone seen this behaviour?  And do you think it comes form org or
> calendar?
>
> I can't reproduce this with
>
> GNU Emacs 24.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.24.3) of
>  2011-04-08 on cigue, modified by Debian
>
> Org-mode version 7.5 (release_7.5.211.gb0094)
>
> I also tried with release_7.5.209.g1a687 but no luck: I created a new
> Org buffer, entered a new headling and scheduling/deadlining with C-c
> C-s and C-c C-d worked as expected.
>
>
hmm.  There's definitely something funny going on, I presume with emacs
rather than org, and (again presumably) something to do with my configs or
installed packages. The function that's failing is org-eval-in-calendar:

 debug(error (wrong-type-argument window-live-p nil))
  select-window(nil)
  org-eval-in-calendar(nil t)

If we look at the defun:

(defun org-eval-in-calendar (form &optional keepdate)
  "Eval FORM in the calendar window and return to current window.
Also, store the cursor date in variable org-ans2."
  (let ((sf (selected-frame))
    (sw (selected-window)))
    (select-window (get-buffer-window "*Calendar*" t))
    (eval form)
    (when (and (not keepdate) (calendar-cursor-to-date))
      (let* ((date (calendar-cursor-to-date))
         (time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))))
    (setq org-ans2 (format-time-string "%Y-%m-%d" time))))
    (move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer))
    (select-window sw)
    (org-select-frame-set-input-focus sf)))

-------
I think emacs is having trouble finding the buffer '*Calendar*' -- even
though it clearly exists and can be manually selected using C-x b.  I could
verify this by just eval-defun'ing this line:
(select-window (get-buffer-window "*Calendar*" t))

from the scratch buffer -- this produces the same backtrace.  However,
oddly, after experiencing the same issue about 6 times in a row, the problem
mysteriously disappeared just now, and the procedure is working fine.  I
have no idea what the issue is there -- I'll report when I find it again.
Maybe someone on the list can give me suggestions for debugging if it shows
up again?  Thanks,

Matt

Best,
>  -- David
>
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
>

[-- Attachment #2: Type: text/html, Size: 4673 bytes --]

  parent reply	other threads:[~2011-04-28 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 15:06 serious calendar integration bug Matt Price
2011-04-27 19:11 ` David Maus
     [not found]   ` <BANLkTikyRLuEFU1C=-2KOaAZ5k_is_=gUw@mail.gmail.com>
2011-04-28 12:02     ` Matt Price [this message]
2011-04-28 12:43       ` Nick Dokos
2011-04-28 17:05         ` Matt Price
2011-04-28 21:34       ` Daniel Clemente

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=BANLkTinUoKng9rjh2k6+CHN860S_JxW7jw@mail.gmail.com \
    --to=moptop99@gmail.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).