* Patch for windowing problem
@ 2009-07-16 19:32 Robert Goldman
2009-07-16 23:26 ` Bastien
0 siblings, 1 reply; 13+ messages in thread
From: Robert Goldman @ 2009-07-16 19:32 UTC (permalink / raw
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
In an earlier posting, I mentioned that I had a problem with org-mode on
aquamacs; the cursor (really input focus) was getting "trapped" in a
different frame when the *Calendar* buffer was not in the same frame as
the source of the org-schedule command (either an org-mode buffer or a
remember buffer). The attached patch to org.el fixes this problem for
me. Would some of you all mind testing it out? It just wraps current
frame save and pop around the use of the calendar (frames aren't managed
by the save-excursion and save-window-excursion that already wrap this
interaction).
Thanks,
Robert
[-- Attachment #2: git-schedule-frame.patch --]
[-- Type: text/plain, Size: 8599 bytes --]
index feaa115..be07d58 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12010,6 +12010,15 @@ So these are more for recording a certain time/date."
(defvar org-read-date-history nil)
(defvar org-read-date-final-answer nil)
+(defmacro save-frame-excursion (&rest body)
+ "Carry out some operations and then return to the currently
+selected frame."
+ (let ((frame-var (gensym "FRAME")))
+ `(let ((,frame-var (selected-frame)))
+ (unwind-protect
+ (progn ,@body)
+ (select-frame-set-input-focus ,frame-var) ))))
+
(defun org-read-date (&optional with-time to-time from-string prompt
default-time default-input)
"Read a date, possibly a time, and make things smooth for the user.
@@ -12088,77 +12097,78 @@ user."
(org-read-date-popup-calendar
(save-excursion
(save-window-excursion
- (calendar)
- (calendar-forward-day (- (time-to-days def)
- (calendar-absolute-from-gregorian
- (calendar-current-date))))
- (org-eval-in-calendar nil t)
- (let* ((old-map (current-local-map))
- (map (copy-keymap calendar-mode-map))
- (minibuffer-local-map (copy-keymap minibuffer-local-map)))
- (org-defkey map (kbd "RET") 'org-calendar-select)
- (org-defkey map (if (featurep 'xemacs) [button1] [mouse-1])
- 'org-calendar-select-mouse)
- (org-defkey map (if (featurep 'xemacs) [button2] [mouse-2])
- 'org-calendar-select-mouse)
- (org-defkey minibuffer-local-map [(meta shift left)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-backward-month 1))))
- (org-defkey minibuffer-local-map [(meta shift right)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-forward-month 1))))
- (org-defkey minibuffer-local-map [(meta shift up)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-backward-year 1))))
- (org-defkey minibuffer-local-map [(meta shift down)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-forward-year 1))))
- (org-defkey minibuffer-local-map [?\e (shift left)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-backward-month 1))))
- (org-defkey minibuffer-local-map [?\e (shift right)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-forward-month 1))))
- (org-defkey minibuffer-local-map [?\e (shift up)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-backward-year 1))))
- (org-defkey minibuffer-local-map [?\e (shift down)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-forward-year 1))))
- (org-defkey minibuffer-local-map [(shift up)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-backward-week 1))))
- (org-defkey minibuffer-local-map [(shift down)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-forward-week 1))))
- (org-defkey minibuffer-local-map [(shift left)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-backward-day 1))))
- (org-defkey minibuffer-local-map [(shift right)]
- (lambda () (interactive)
- (org-eval-in-calendar '(calendar-forward-day 1))))
- (org-defkey minibuffer-local-map ">"
- (lambda () (interactive)
- (org-eval-in-calendar '(scroll-calendar-left 1))))
- (org-defkey minibuffer-local-map "<"
- (lambda () (interactive)
- (org-eval-in-calendar '(scroll-calendar-right 1))))
- (run-hooks 'org-read-date-minibuffer-setup-hook)
- (unwind-protect
- (progn
- (use-local-map map)
- (add-hook 'post-command-hook 'org-read-date-display)
- (setq org-ans0 (read-string prompt default-input
- 'org-read-date-history nil))
- ;; org-ans0: from prompt
- ;; org-ans1: from mouse click
- ;; org-ans2: from calendar motion
- (setq ans (concat org-ans0 " " (or org-ans1 org-ans2))))
- (remove-hook 'post-command-hook 'org-read-date-display)
- (use-local-map old-map)
- (when org-read-date-overlay
- (org-delete-overlay org-read-date-overlay)
- (setq org-read-date-overlay nil)))))))
+ (save-frame-excursion
+ (calendar)
+ (calendar-forward-day (- (time-to-days def)
+ (calendar-absolute-from-gregorian
+ (calendar-current-date))))
+ (org-eval-in-calendar nil t)
+ (let* ((old-map (current-local-map))
+ (map (copy-keymap calendar-mode-map))
+ (minibuffer-local-map (copy-keymap minibuffer-local-map)))
+ (org-defkey map (kbd "RET") 'org-calendar-select)
+ (org-defkey map (if (featurep 'xemacs) [button1] [mouse-1])
+ 'org-calendar-select-mouse)
+ (org-defkey map (if (featurep 'xemacs) [button2] [mouse-2])
+ 'org-calendar-select-mouse)
+ (org-defkey minibuffer-local-map [(meta shift left)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-backward-month 1))))
+ (org-defkey minibuffer-local-map [(meta shift right)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-forward-month 1))))
+ (org-defkey minibuffer-local-map [(meta shift up)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-backward-year 1))))
+ (org-defkey minibuffer-local-map [(meta shift down)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-forward-year 1))))
+ (org-defkey minibuffer-local-map [?\e (shift left)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-backward-month 1))))
+ (org-defkey minibuffer-local-map [?\e (shift right)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-forward-month 1))))
+ (org-defkey minibuffer-local-map [?\e (shift up)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-backward-year 1))))
+ (org-defkey minibuffer-local-map [?\e (shift down)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-forward-year 1))))
+ (org-defkey minibuffer-local-map [(shift up)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-backward-week 1))))
+ (org-defkey minibuffer-local-map [(shift down)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-forward-week 1))))
+ (org-defkey minibuffer-local-map [(shift left)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-backward-day 1))))
+ (org-defkey minibuffer-local-map [(shift right)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-forward-day 1))))
+ (org-defkey minibuffer-local-map ">"
+ (lambda () (interactive)
+ (org-eval-in-calendar '(scroll-calendar-left 1))))
+ (org-defkey minibuffer-local-map "<"
+ (lambda () (interactive)
+ (org-eval-in-calendar '(scroll-calendar-right 1))))
+ (run-hooks 'org-read-date-minibuffer-setup-hook)
+ (unwind-protect
+ (progn
+ (use-local-map map)
+ (add-hook 'post-command-hook 'org-read-date-display)
+ (setq org-ans0 (read-string prompt default-input
+ 'org-read-date-history nil))
+ ;; org-ans0: from prompt
+ ;; org-ans1: from mouse click
+ ;; org-ans2: from calendar motion
+ (setq ans (concat org-ans0 " " (or org-ans1 org-ans2))))
+ (remove-hook 'post-command-hook 'org-read-date-display)
+ (use-local-map old-map)
+ (when org-read-date-overlay
+ (org-delete-overlay org-read-date-overlay)
+ (setq org-read-date-overlay nil))))))))
(t ; Naked prompt only
(unwind-protect
[-- Attachment #3: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-16 19:32 Patch for windowing problem Robert Goldman
@ 2009-07-16 23:26 ` Bastien
2009-07-17 0:36 ` Robert Goldman
0 siblings, 1 reply; 13+ messages in thread
From: Bastien @ 2009-07-16 23:26 UTC (permalink / raw
To: Robert Goldman; +Cc: emacs-orgmode
Yes, would be nice if the Aquamacs crowd could test this!
Thanks Robert for the patch.
Robert Goldman <rpgoldman@sift.info> writes:
> In an earlier posting, I mentioned that I had a problem with org-mode on
> aquamacs; the cursor (really input focus) was getting "trapped" in a
> different frame when the *Calendar* buffer was not in the same frame as
> the source of the org-schedule command (either an org-mode buffer or a
> remember buffer). The attached patch to org.el fixes this problem for
> me. Would some of you all mind testing it out? It just wraps current
> frame save and pop around the use of the calendar (frames aren't managed
> by the save-excursion and save-window-excursion that already wrap this
> interaction).
>
> Thanks,
> Robert
> index feaa115..be07d58 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -12010,6 +12010,15 @@ So these are more for recording a certain time/date."
> (defvar org-read-date-history nil)
> (defvar org-read-date-final-answer nil)
>
> +(defmacro save-frame-excursion (&rest body)
> + "Carry out some operations and then return to the currently
> +selected frame."
> + (let ((frame-var (gensym "FRAME")))
> + `(let ((,frame-var (selected-frame)))
> + (unwind-protect
> + (progn ,@body)
> + (select-frame-set-input-focus ,frame-var) ))))
> +
> (defun org-read-date (&optional with-time to-time from-string prompt
> default-time default-input)
> "Read a date, possibly a time, and make things smooth for the user.
> @@ -12088,77 +12097,78 @@ user."
> (org-read-date-popup-calendar
> (save-excursion
> (save-window-excursion
> - (calendar)
> - (calendar-forward-day (- (time-to-days def)
> - (calendar-absolute-from-gregorian
> - (calendar-current-date))))
> - (org-eval-in-calendar nil t)
> - (let* ((old-map (current-local-map))
> - (map (copy-keymap calendar-mode-map))
> - (minibuffer-local-map (copy-keymap minibuffer-local-map)))
> - (org-defkey map (kbd "RET") 'org-calendar-select)
> - (org-defkey map (if (featurep 'xemacs) [button1] [mouse-1])
> - 'org-calendar-select-mouse)
> - (org-defkey map (if (featurep 'xemacs) [button2] [mouse-2])
> - 'org-calendar-select-mouse)
> - (org-defkey minibuffer-local-map [(meta shift left)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-backward-month 1))))
> - (org-defkey minibuffer-local-map [(meta shift right)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-forward-month 1))))
> - (org-defkey minibuffer-local-map [(meta shift up)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-backward-year 1))))
> - (org-defkey minibuffer-local-map [(meta shift down)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-forward-year 1))))
> - (org-defkey minibuffer-local-map [?\e (shift left)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-backward-month 1))))
> - (org-defkey minibuffer-local-map [?\e (shift right)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-forward-month 1))))
> - (org-defkey minibuffer-local-map [?\e (shift up)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-backward-year 1))))
> - (org-defkey minibuffer-local-map [?\e (shift down)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-forward-year 1))))
> - (org-defkey minibuffer-local-map [(shift up)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-backward-week 1))))
> - (org-defkey minibuffer-local-map [(shift down)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-forward-week 1))))
> - (org-defkey minibuffer-local-map [(shift left)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-backward-day 1))))
> - (org-defkey minibuffer-local-map [(shift right)]
> - (lambda () (interactive)
> - (org-eval-in-calendar '(calendar-forward-day 1))))
> - (org-defkey minibuffer-local-map ">"
> - (lambda () (interactive)
> - (org-eval-in-calendar '(scroll-calendar-left 1))))
> - (org-defkey minibuffer-local-map "<"
> - (lambda () (interactive)
> - (org-eval-in-calendar '(scroll-calendar-right 1))))
> - (run-hooks 'org-read-date-minibuffer-setup-hook)
> - (unwind-protect
> - (progn
> - (use-local-map map)
> - (add-hook 'post-command-hook 'org-read-date-display)
> - (setq org-ans0 (read-string prompt default-input
> - 'org-read-date-history nil))
> - ;; org-ans0: from prompt
> - ;; org-ans1: from mouse click
> - ;; org-ans2: from calendar motion
> - (setq ans (concat org-ans0 " " (or org-ans1 org-ans2))))
> - (remove-hook 'post-command-hook 'org-read-date-display)
> - (use-local-map old-map)
> - (when org-read-date-overlay
> - (org-delete-overlay org-read-date-overlay)
> - (setq org-read-date-overlay nil)))))))
> + (save-frame-excursion
> + (calendar)
> + (calendar-forward-day (- (time-to-days def)
> + (calendar-absolute-from-gregorian
> + (calendar-current-date))))
> + (org-eval-in-calendar nil t)
> + (let* ((old-map (current-local-map))
> + (map (copy-keymap calendar-mode-map))
> + (minibuffer-local-map (copy-keymap minibuffer-local-map)))
> + (org-defkey map (kbd "RET") 'org-calendar-select)
> + (org-defkey map (if (featurep 'xemacs) [button1] [mouse-1])
> + 'org-calendar-select-mouse)
> + (org-defkey map (if (featurep 'xemacs) [button2] [mouse-2])
> + 'org-calendar-select-mouse)
> + (org-defkey minibuffer-local-map [(meta shift left)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-backward-month 1))))
> + (org-defkey minibuffer-local-map [(meta shift right)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-forward-month 1))))
> + (org-defkey minibuffer-local-map [(meta shift up)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-backward-year 1))))
> + (org-defkey minibuffer-local-map [(meta shift down)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-forward-year 1))))
> + (org-defkey minibuffer-local-map [?\e (shift left)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-backward-month 1))))
> + (org-defkey minibuffer-local-map [?\e (shift right)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-forward-month 1))))
> + (org-defkey minibuffer-local-map [?\e (shift up)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-backward-year 1))))
> + (org-defkey minibuffer-local-map [?\e (shift down)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-forward-year 1))))
> + (org-defkey minibuffer-local-map [(shift up)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-backward-week 1))))
> + (org-defkey minibuffer-local-map [(shift down)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-forward-week 1))))
> + (org-defkey minibuffer-local-map [(shift left)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-backward-day 1))))
> + (org-defkey minibuffer-local-map [(shift right)]
> + (lambda () (interactive)
> + (org-eval-in-calendar '(calendar-forward-day 1))))
> + (org-defkey minibuffer-local-map ">"
> + (lambda () (interactive)
> + (org-eval-in-calendar '(scroll-calendar-left 1))))
> + (org-defkey minibuffer-local-map "<"
> + (lambda () (interactive)
> + (org-eval-in-calendar '(scroll-calendar-right 1))))
> + (run-hooks 'org-read-date-minibuffer-setup-hook)
> + (unwind-protect
> + (progn
> + (use-local-map map)
> + (add-hook 'post-command-hook 'org-read-date-display)
> + (setq org-ans0 (read-string prompt default-input
> + 'org-read-date-history nil))
> + ;; org-ans0: from prompt
> + ;; org-ans1: from mouse click
> + ;; org-ans2: from calendar motion
> + (setq ans (concat org-ans0 " " (or org-ans1 org-ans2))))
> + (remove-hook 'post-command-hook 'org-read-date-display)
> + (use-local-map old-map)
> + (when org-read-date-overlay
> + (org-delete-overlay org-read-date-overlay)
> + (setq org-read-date-overlay nil))))))))
>
> (t ; Naked prompt only
> (unwind-protect
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
--
Bastien
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-16 23:26 ` Bastien
@ 2009-07-17 0:36 ` Robert Goldman
2009-07-17 7:54 ` Bastien
0 siblings, 1 reply; 13+ messages in thread
From: Robert Goldman @ 2009-07-17 0:36 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode
Bastien wrote:
> Yes, would be nice if the Aquamacs crowd could test this!
>
> Thanks Robert for the patch.
Actually, let me clarify -- it's even more important for the
NON-Aquamacs crowd to test this. I am pretty confident it does The
Right Thing on Aquamacs, but aquamacs uses frames much more heavily than
normal emacs. And I don't use org-mode on normal emacs right now. So
it's there that we could look for me getting the frame management more
wrong.
I should also say, though, that if you're a big frame user on normal
emacs, this should also be a help to you, not just to aquamacs users.
best,
Robert
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-17 0:36 ` Robert Goldman
@ 2009-07-17 7:54 ` Bastien
2009-07-17 12:50 ` Robert Goldman
0 siblings, 1 reply; 13+ messages in thread
From: Bastien @ 2009-07-17 7:54 UTC (permalink / raw
To: Robert Goldman; +Cc: emacs-orgmode
Robert Goldman <rpgoldman@sift.info> writes:
> Bastien wrote:
>> Yes, would be nice if the Aquamacs crowd could test this!
>>
>> Thanks Robert for the patch.
>
> Actually, let me clarify -- it's even more important for the
> NON-Aquamacs crowd to test this. I am pretty confident it does The
> Right Thing on Aquamacs, but aquamacs uses frames much more heavily than
> normal emacs. And I don't use org-mode on normal emacs right now. So
> it's there that we could look for me getting the frame management more
> wrong.
>
> I should also say, though, that if you're a big frame user on normal
> emacs, this should also be a help to you, not just to aquamacs users.
I'm using a single frame so I can't really test it.
Please frame-people have a look at this patch. In any case, not a
critical issue, I let Carsten take care of it when he's back.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-17 7:54 ` Bastien
@ 2009-07-17 12:50 ` Robert Goldman
2009-07-18 8:53 ` Bastien
0 siblings, 1 reply; 13+ messages in thread
From: Robert Goldman @ 2009-07-17 12:50 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode
Bastien wrote:
> Robert Goldman <rpgoldman@sift.info> writes:
>
>> Bastien wrote:
>>> Yes, would be nice if the Aquamacs crowd could test this!
>>>
>>> Thanks Robert for the patch.
>> Actually, let me clarify -- it's even more important for the
>> NON-Aquamacs crowd to test this. I am pretty confident it does The
>> Right Thing on Aquamacs, but aquamacs uses frames much more heavily than
>> normal emacs. And I don't use org-mode on normal emacs right now. So
>> it's there that we could look for me getting the frame management more
>> wrong.
>>
>> I should also say, though, that if you're a big frame user on normal
>> emacs, this should also be a help to you, not just to aquamacs users.
>
> I'm using a single frame so I can't really test it.
Well you can, at least a little. I can't see any way in which my
save-and-restore frame focus tweak would affect you --- but it's always
possible to be wrong about this.
If you are inclined, you should be able to run with this patch, and it
should do /absolutely nothing/. That would be a good test, too. If you
plug it in, and you use only a single frame, org-mode should not change
at all for you. If it does, you have performed the valuable service of
finding that I have made a big bug!
Best,
Robert
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-17 12:50 ` Robert Goldman
@ 2009-07-18 8:53 ` Bastien
2009-07-20 19:30 ` Robert Goldman
0 siblings, 1 reply; 13+ messages in thread
From: Bastien @ 2009-07-18 8:53 UTC (permalink / raw
To: Robert Goldman; +Cc: emacs-orgmode
Hi Robert,
Robert Goldman <rpgoldman@sift.info> writes:
> If you are inclined, you should be able to run with this patch, and it
> should do /absolutely nothing/. That would be a good test, too. If you
> plug it in, and you use only a single frame, org-mode should not change
> at all for you. If it does, you have performed the valuable service of
> finding that I have made a big bug!
I've been trying to use frames with Org and Org-remember. I can't
reproduce the bug you are reporting, so maybe it's an Aquamacs bug?
Does anyone using frames in GNU Emacs can reproduce Robert's bug?
--
Bastien
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-18 8:53 ` Bastien
@ 2009-07-20 19:30 ` Robert Goldman
2009-07-20 20:05 ` Bastien
0 siblings, 1 reply; 13+ messages in thread
From: Robert Goldman @ 2009-07-20 19:30 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode
Bastien wrote:
> Hi Robert,
>
> Robert Goldman <rpgoldman@sift.info> writes:
>
>> If you are inclined, you should be able to run with this patch, and it
>> should do /absolutely nothing/. That would be a good test, too. If you
>> plug it in, and you use only a single frame, org-mode should not change
>> at all for you. If it does, you have performed the valuable service of
>> finding that I have made a big bug!
>
> I've been trying to use frames with Org and Org-remember. I can't
> reproduce the bug you are reporting, so maybe it's an Aquamacs bug?
>
> Does anyone using frames in GNU Emacs can reproduce Robert's bug?
>
I will see if I can set up a test case, involving creating some frames,
that might display this problem on vanilla Emacs. I'm afraid it's not a
very high priority for me, since it will involve getting Org working on
a different machine.
However, I'm inclined to suggest that, if this is NOT a problem on
vanilla emacs, and my patch does not /damage/ operations on vanilla
emacs while making life easier on aquamacs, we can safely push it.
best,
r
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-20 19:30 ` Robert Goldman
@ 2009-07-20 20:05 ` Bastien
2009-07-20 22:20 ` Robert Goldman
0 siblings, 1 reply; 13+ messages in thread
From: Bastien @ 2009-07-20 20:05 UTC (permalink / raw
To: Robert Goldman; +Cc: emacs-orgmode
Robert Goldman <rpgoldman@sift.info> writes:
> I will see if I can set up a test case, involving creating some frames,
> that might display this problem on vanilla Emacs. I'm afraid it's not a
> very high priority for me, since it will involve getting Org working on
> a different machine.
Thanks for this. I will also try to reproduce the problem on vanilla
Emacs -- btw, can you suggest a simple recipe on how to reproduce it
with emacs -Q (and relevant frame config, of course)?
> However, I'm inclined to suggest that, if this is NOT a problem on
> vanilla emacs, and my patch does not /damage/ operations on vanilla
> emacs while making life easier on aquamacs, we can safely push it.
If this is a bug in Aquamacs, we shouldn't fix it in Emacs, even if
the workaround doesn't break anything -- by using such a workaround
we just remove incentives for Aquamacs people to fix the bug.
Anyway, perhaps it's an Emacs + Org problem, so let's test and see!
PS: Remember I'm just a temporary maintainer, so I'm just double-careful
about not introducing unnecessary changes...
--
Bastien
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-20 20:05 ` Bastien
@ 2009-07-20 22:20 ` Robert Goldman
2009-07-21 7:32 ` Bastien
0 siblings, 1 reply; 13+ messages in thread
From: Robert Goldman @ 2009-07-20 22:20 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode
Bastien wrote:
> Robert Goldman <rpgoldman@sift.info> writes:
>
>> I will see if I can set up a test case, involving creating some frames,
>> that might display this problem on vanilla Emacs. I'm afraid it's not a
>> very high priority for me, since it will involve getting Org working on
>> a different machine.
>
> Thanks for this. I will also try to reproduce the problem on vanilla
> Emacs -- btw, can you suggest a simple recipe on how to reproduce it
> with emacs -Q (and relevant frame config, of course)?
>
>> However, I'm inclined to suggest that, if this is NOT a problem on
>> vanilla emacs, and my patch does not /damage/ operations on vanilla
>> emacs while making life easier on aquamacs, we can safely push it.
>
> If this is a bug in Aquamacs, we shouldn't fix it in Emacs, even if
> the workaround doesn't break anything -- by using such a workaround
> we just remove incentives for Aquamacs people to fix the bug.
>
> Anyway, perhaps it's an Emacs + Org problem, so let's test and see!
For the record, I don't believe that this is an Aquamacs bug per se.
The Aquamacs aspect of the problem is that Aquamacs is frame-happy, and
tends to pop up a lot more frames than a vanilla emacs. That means that
behaviors occur that you wouldn't see with a vanilla emacs. I'm not
suggesting that Aquamacs is doing anything wrong by putting the Calendar
buffer in another frame, so by handling that case, I'm not fixing an
Aquamacs bug. I'm just guarding against a condition that we don't see
in vanilla emacs.
Unfortunately, I don't know how to replicate this on a vanilla emacs.
When I try to force *Calendar* into a different frame while inside a
call to org-schedule, I cannot. The closest I can do is to set
calendar-setup to 'two-frame, which does pop up a frame and leave my
cursor trapped in it, but it actually behaves even /worse/ than
Aquamacs, because I can't assign a date at all. On Aquamacs I get a
date, but my cursor is left in the wrong window, making me (ugh) use the
mouse to get back where I was.
Hope that helps,
r
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-20 22:20 ` Robert Goldman
@ 2009-07-21 7:32 ` Bastien
2009-07-22 4:25 ` Nick Dokos
0 siblings, 1 reply; 13+ messages in thread
From: Bastien @ 2009-07-21 7:32 UTC (permalink / raw
To: Robert Goldman; +Cc: emacs-orgmode
Hi Robert,
Robert Goldman <rpgoldman@sift.info> writes:
> The closest I can do is to set calendar-setup to 'two-frame, which
> does pop up a frame and leave my cursor trapped in it, but it actually
> behaves even /worse/ than Aquamacs, because I can't assign a date at
> all.
Yes, this is a bug - fixed. Let me know if it also fixes the other
issue you have - if not, I will investigate further.
Thanks for your patience!
--
Bastien
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-21 7:32 ` Bastien
@ 2009-07-22 4:25 ` Nick Dokos
2009-07-22 7:48 ` Bastien
0 siblings, 1 reply; 13+ messages in thread
From: Nick Dokos @ 2009-07-22 4:25 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode, Robert Goldman
Bastien <bastienguerry@googlemail.com> wrote:
> Hi Robert,
>
> Robert Goldman <rpgoldman@sift.info> writes:
>
> > The closest I can do is to set calendar-setup to 'two-frame, which
> > does pop up a frame and leave my cursor trapped in it, but it actually
> > behaves even /worse/ than Aquamacs, because I can't assign a date at
> > all.
>
> Yes, this is a bug - fixed. Let me know if it also fixes the other
> issue you have - if not, I will investigate further.
>
Hi Bastien,
AFAICT this has *not* been fixed: I might have made a mistake of course,
so if anybody else decides to test it, I for one would be grateful.
I'm pretty sure that I got the update (commit
3c031462f5b3a30b1fdd77e0c111586b8287a154) and I rebuilt org-mode and
restarted emacs (I did an org-reload, tested without success and
restarted emacs just to make sure I was getting the new bits).
I eval the following form in the *scratch* buffer:
(setq calendar-setup 'calendar-only)
to enable frames for the calendar, and then I do (org-remember), and do
C-c C-s to schedule it. The calendar frame pops up, but clicking on it
does nothing: I don't get the overlay in the minibuffer that I get when
I don't use calendar frames. The only way to change the date is using
the keyboard (+3, S-<right>, etc).
Thanks,
Nick
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-22 4:25 ` Nick Dokos
@ 2009-07-22 7:48 ` Bastien
2009-07-22 12:58 ` Robert Goldman
0 siblings, 1 reply; 13+ messages in thread
From: Bastien @ 2009-07-22 7:48 UTC (permalink / raw
To: nicholas.dokos; +Cc: emacs-orgmode, Robert Goldman
Hi Nick,
Nick Dokos <nicholas.dokos@hp.com> writes:
> AFAICT this has *not* been fixed:
Yes, you're right - the issue I fixed was just a small step forward.
Robert, I applied your patch, thanks a lot for it.
I renamed it to `org-save-frame-excursion' and I slightly modified the
docstring, hope you don't mind. I will send this to the Emacs devs, I
guess some will be interested.
Thanks all for insisting on this bug!
--
Bastien
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Patch for windowing problem
2009-07-22 7:48 ` Bastien
@ 2009-07-22 12:58 ` Robert Goldman
0 siblings, 0 replies; 13+ messages in thread
From: Robert Goldman @ 2009-07-22 12:58 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode
Bastien wrote:
> Hi Nick,
>
> Nick Dokos <nicholas.dokos@hp.com> writes:
>
>> AFAICT this has *not* been fixed:
>
> Yes, you're right - the issue I fixed was just a small step forward.
>
> Robert, I applied your patch, thanks a lot for it.
>
> I renamed it to `org-save-frame-excursion' and I slightly modified the
> docstring, hope you don't mind. I will send this to the Emacs devs, I
> guess some will be interested.
That's a much better idea. I am more a common lisp programmer than an
emacs lisp programmer, and need to remember that prepending "org-" is
the equivalent of IN-PACKAGE ;-)
Best,
R
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-07-22 12:59 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-16 19:32 Patch for windowing problem Robert Goldman
2009-07-16 23:26 ` Bastien
2009-07-17 0:36 ` Robert Goldman
2009-07-17 7:54 ` Bastien
2009-07-17 12:50 ` Robert Goldman
2009-07-18 8:53 ` Bastien
2009-07-20 19:30 ` Robert Goldman
2009-07-20 20:05 ` Bastien
2009-07-20 22:20 ` Robert Goldman
2009-07-21 7:32 ` Bastien
2009-07-22 4:25 ` Nick Dokos
2009-07-22 7:48 ` Bastien
2009-07-22 12:58 ` Robert Goldman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.