From mboxrd@z Thu Jan 1 00:00:00 1970 From: E Sabof Subject: Bug: org-time-stamp sometimes moves my cursor to another monitor ( [7.8.11] Date: Sun, 6 Jan 2013 07:27:03 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6d2755f97509a04d299a338 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrkdP-0004LP-PZ for emacs-orgmode@gnu.org; Sun, 06 Jan 2013 02:27:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TrkdM-0004Gy-Kw for emacs-orgmode@gnu.org; Sun, 06 Jan 2013 02:27:07 -0500 Received: from mail-qc0-f173.google.com ([209.85.216.173]:33448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrkdM-0004Gq-Gm for emacs-orgmode@gnu.org; Sun, 06 Jan 2013 02:27:04 -0500 Received: by mail-qc0-f173.google.com with SMTP id b12so10649449qca.32 for ; Sat, 05 Jan 2013 23:27:03 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --0016e6d2755f97509a04d299a338 Content-Type: text/plain; charset=ISO-8859-1 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. ------------------------------------------------------------------------ The culprit has proved to be the last line of this function, which I commented out in my config: (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) )) At least superficially, it would seem that with-current-buffer could be used instead Emacs : GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2012-10-20 on ubuntu Package: Org-mode version 7.8.11 --0016e6d2755f97509a04d299a338 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Remember to cover the basics, that is, what you expec= ted to happen and
what in fact did happen. =A0You don't know = how to make a good report? =A0See


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

The culprit has proved to be the las= t line of this function, which I
commented out in my config:

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

At least superficially, it would seem that with-current-bu= ffer could be
used instead

Emacs =A0: GNU Emacs 24.2.50.1 (= x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
=A0of 2012-10-20 = on ubuntu
Package: Org-mode version 7.8.11

--0016e6d2755f97509a04d299a338--