unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* OS X: raise-frame at reopen event
@ 2007-08-09 22:35 Seiji Zenitani
  2007-08-09 23:11 ` Randal L. Schwartz
  2007-08-10 10:18 ` YAMAMOTO Mitsuharu
  0 siblings, 2 replies; 7+ messages in thread
From: Seiji Zenitani @ 2007-08-09 22:35 UTC (permalink / raw)
  To: emacs-devel

Hi,

On Mac OS X, when the emacs window (frame) is minimized in the Dock,
nothing happens when the user click the application icon in the Dock.
I modified the following line in lisp/term/mac-win.el (1771st line; EMACS_22_BASE)

  (define-key mac-apple-event-map [core-event reopen-application] 'ignore)

to

  (define-key mac-apple-event-map [core-event reopen-application] 'raise-frame)

and then the minimized window (frame) is brought to the front
when I click the application icon in the Dock.
I think this is more reasonable behavior on Mac OS X.
How about modifying 'ignore to 'raise-frame in mac-win.el?


Seiji Zenitani
zenitani@mac.com

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

* Re: OS X: raise-frame at reopen event
  2007-08-09 22:35 OS X: raise-frame at reopen event Seiji Zenitani
@ 2007-08-09 23:11 ` Randal L. Schwartz
  2007-08-10 10:18 ` YAMAMOTO Mitsuharu
  1 sibling, 0 replies; 7+ messages in thread
From: Randal L. Schwartz @ 2007-08-09 23:11 UTC (permalink / raw)
  To: emacs-devel

>>>>> "Seiji" == Seiji Zenitani <zenitani@mac.com> writes:

Seiji> I think this is more reasonable behavior on Mac OS X.

I would agree, although I've never noticed the lack of raise-frame. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

* Re: OS X: raise-frame at reopen event
  2007-08-09 22:35 OS X: raise-frame at reopen event Seiji Zenitani
  2007-08-09 23:11 ` Randal L. Schwartz
@ 2007-08-10 10:18 ` YAMAMOTO Mitsuharu
  2007-08-10 23:07   ` Seiji Zenitani
       [not found]   ` <E2DE3E97-35A2-4EC3-8DEC-4D1D6FAAD72D@mac.com>
  1 sibling, 2 replies; 7+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-08-10 10:18 UTC (permalink / raw)
  To: Seiji Zenitani; +Cc: emacs-devel

>>>>> On Thu, 09 Aug 2007 15:35:08 -0700, Seiji Zenitani <zenitani@mac.com> said:

> How about modifying 'ignore to 'raise-frame in mac-win.el?

`raise-frame' may make an invisible frame visible.  I've installed the
following change to the trunk.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

Index: lisp/term/mac-win.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v
retrieving revision 1.91
diff -c -p -r1.91 mac-win.el
*** lisp/term/mac-win.el	26 Jul 2007 05:27:30 -0000	1.91
--- lisp/term/mac-win.el	10 Aug 2007 10:09:17 -0000
*************** in `selection-converter-alist', which se
*** 1710,1715 ****
--- 1710,1728 ----
  	      (setq modifiers (cons (car modifier-mask) modifiers)))))
      modifiers))
  
+ (defun mac-ae-reopen-application (event)
+   "Show some frame in response to the Apple event EVENT.
+ The frame to be shown is chosen from visible or iconified frames
+ if possible.  If there's no such frame, a new frame is created."
+   (interactive "e")
+   (unless (frame-visible-p (selected-frame))
+     (let ((frame (or (car (visible-frame-list))
+ 		     (car (filtered-frame-list 'frame-visible-p)))))
+       (if frame
+ 	  (select-frame frame)
+ 	(switch-to-buffer-other-frame "*scratch*"))))
+   (select-frame-set-input-focus (selected-frame)))
+ 
  (defun mac-ae-open-documents (event)
    "Open the documents specified by the Apple event EVENT."
    (interactive "e")
*************** Currently the `mailto' scheme is support
*** 1766,1774 ****
  (define-key mac-apple-event-map [core-event open-application] 0)
  
  ;; Received when a dock or application icon is clicked and Emacs is
! ;; already running.  Simply ignored.  Another idea is to make a new
! ;; frame if all frames are invisible.
! (define-key mac-apple-event-map [core-event reopen-application] 'ignore)
  
  (define-key mac-apple-event-map [core-event open-documents]
    'mac-ae-open-documents)
--- 1779,1787 ----
  (define-key mac-apple-event-map [core-event open-application] 0)
  
  ;; Received when a dock or application icon is clicked and Emacs is
! ;; already running.
! (define-key mac-apple-event-map [core-event reopen-application]
!   'mac-ae-reopen-application)
  
  (define-key mac-apple-event-map [core-event open-documents]
    'mac-ae-open-documents)

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

* Re: OS X: raise-frame at reopen event
  2007-08-10 10:18 ` YAMAMOTO Mitsuharu
@ 2007-08-10 23:07   ` Seiji Zenitani
  2007-08-11  0:18     ` YAMAMOTO Mitsuharu
       [not found]   ` <E2DE3E97-35A2-4EC3-8DEC-4D1D6FAAD72D@mac.com>
  1 sibling, 1 reply; 7+ messages in thread
From: Seiji Zenitani @ 2007-08-10 23:07 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: emacs-devel

Thank you for your quick response.
Is it possible to install the change to EMACS_22_BASE, too?
I believe the change is harmless.

Seiji Zenitani
zenitani@mac.com

 
On Friday, August 10, 2007, at 06:18AM, "YAMAMOTO Mitsuharu" <mituharu@math.s.chiba-u.ac.jp> wrote:
>>>>>> On Thu, 09 Aug 2007 15:35:08 -0700, Seiji Zenitani <zenitani@mac.com> said:
>
>> How about modifying 'ignore to 'raise-frame in mac-win.el?
>
>`raise-frame' may make an invisible frame visible.  I've installed the
>following change to the trunk.
>
>				     YAMAMOTO Mitsuharu
>				mituharu@math.s.chiba-u.ac.jp
>
>Index: lisp/term/mac-win.el
>===================================================================
>RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v
>retrieving revision 1.91
>diff -c -p -r1.91 mac-win.el
>*** lisp/term/mac-win.el	26 Jul 2007 05:27:30 -0000	1.91
>--- lisp/term/mac-win.el	10 Aug 2007 10:09:17 -0000
>*************** in `selection-converter-alist', which se
>*** 1710,1715 ****
>--- 1710,1728 ----
>  	      (setq modifiers (cons (car modifier-mask) modifiers)))))
>      modifiers))
>  
>+ (defun mac-ae-reopen-application (event)
>+   "Show some frame in response to the Apple event EVENT.
>+ The frame to be shown is chosen from visible or iconified frames
>+ if possible.  If there's no such frame, a new frame is created."
>+   (interactive "e")
>+   (unless (frame-visible-p (selected-frame))
>+     (let ((frame (or (car (visible-frame-list))
>+ 		     (car (filtered-frame-list 'frame-visible-p)))))
>+       (if frame
>+ 	  (select-frame frame)
>+ 	(switch-to-buffer-other-frame "*scratch*"))))
>+   (select-frame-set-input-focus (selected-frame)))
>+ 
>  (defun mac-ae-open-documents (event)
>    "Open the documents specified by the Apple event EVENT."
>    (interactive "e")
>*************** Currently the `mailto' scheme is support
>*** 1766,1774 ****
>  (define-key mac-apple-event-map [core-event open-application] 0)
>  
>  ;; Received when a dock or application icon is clicked and Emacs is
>! ;; already running.  Simply ignored.  Another idea is to make a new
>! ;; frame if all frames are invisible.
>! (define-key mac-apple-event-map [core-event reopen-application] 'ignore)
>  
>  (define-key mac-apple-event-map [core-event open-documents]
>    'mac-ae-open-documents)
>--- 1779,1787 ----
>  (define-key mac-apple-event-map [core-event open-application] 0)
>  
>  ;; Received when a dock or application icon is clicked and Emacs is
>! ;; already running.
>! (define-key mac-apple-event-map [core-event reopen-application]
>!   'mac-ae-reopen-application)
>  
>  (define-key mac-apple-event-map [core-event open-documents]
>    'mac-ae-open-documents)
>
>

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

* Re: OS X: raise-frame at reopen event
  2007-08-10 23:07   ` Seiji Zenitani
@ 2007-08-11  0:18     ` YAMAMOTO Mitsuharu
  0 siblings, 0 replies; 7+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-08-11  0:18 UTC (permalink / raw)
  To: zenitani; +Cc: emacs-devel

>>>>> On Fri, 10 Aug 2007 16:07:08 -0700, Seiji Zenitani <zenitani@mac.com> said:

> Is it possible to install the change to EMACS_22_BASE, too?  I
> believe the change is harmless.

Not now, at least.  It's not a bugfix or an urgent matter, and I'd
like to see if it works properly for a while.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

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

* Re: OS X: raise-frame at reopen event
       [not found]   ` <E2DE3E97-35A2-4EC3-8DEC-4D1D6FAAD72D@mac.com>
@ 2007-10-17  2:30     ` Seiji Zenitani
  2007-10-17  8:21       ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 7+ messages in thread
From: Seiji Zenitani @ 2007-10-17  2:30 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: emacs-devel

Yamamoto-san,

Two months ago, you installed the reopen-frame patch to the trunk for  
the Mac Carbon port.
Could you install it to EMACS_22_BASE, too?
I have been using the patch on the EMACS_22_BASE branch since then,  
but I have no problem yet.

Seiji Zenitani
zenitani@mac.com


On 2007/08/10, at 9:40, Seiji Zenitani wrote:

> Thank you for your quick response.
> Is it possible to apply the patch to EMACS_22_BASE, too?
> I think the below change is harmless.
>
> Seiji Zenitani
> zenitani@mac.com
>
> On 2007/08/10, at 6:18, YAMAMOTO Mitsuharu wrote:
>
>>>>>>> On Thu, 09 Aug 2007 15:35:08 -0700, Seiji Zenitani  
>>>>>>> <zenitani@mac.com> said:
>>
>>> How about modifying 'ignore to 'raise-frame in mac-win.el?
>>
>> `raise-frame' may make an invisible frame visible.  I've installed  
>> the
>> following change to the trunk.
>>
>> 				     YAMAMOTO Mitsuharu
>> 				mituharu@math.s.chiba-u.ac.jp
>>
>> Index: lisp/term/mac-win.el
>> ===================================================================
>> RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v
>> retrieving revision 1.91
>> diff -c -p -r1.91 mac-win.el
>> *** lisp/term/mac-win.el	26 Jul 2007 05:27:30 -0000	1.91
>> --- lisp/term/mac-win.el	10 Aug 2007 10:09:17 -0000
>> *************** in `selection-converter-alist', which se
>> *** 1710,1715 ****
>> --- 1710,1728 ----
>>   	      (setq modifiers (cons (car modifier-mask) modifiers)))))
>>       modifiers))
>>
>> + (defun mac-ae-reopen-application (event)
>> +   "Show some frame in response to the Apple event EVENT.
>> + The frame to be shown is chosen from visible or iconified frames
>> + if possible.  If there's no such frame, a new frame is created."
>> +   (interactive "e")
>> +   (unless (frame-visible-p (selected-frame))
>> +     (let ((frame (or (car (visible-frame-list))
>> + 		     (car (filtered-frame-list 'frame-visible-p)))))
>> +       (if frame
>> + 	  (select-frame frame)
>> + 	(switch-to-buffer-other-frame "*scratch*"))))
>> +   (select-frame-set-input-focus (selected-frame)))
>> +
>>   (defun mac-ae-open-documents (event)
>>     "Open the documents specified by the Apple event EVENT."
>>     (interactive "e")
>> *************** Currently the `mailto' scheme is support
>> *** 1766,1774 ****
>>   (define-key mac-apple-event-map [core-event open-application] 0)
>>
>>   ;; Received when a dock or application icon is clicked and Emacs is
>> ! ;; already running.  Simply ignored.  Another idea is to make a new
>> ! ;; frame if all frames are invisible.
>> ! (define-key mac-apple-event-map [core-event reopen-application]  
>> 'ignore)
>>
>>   (define-key mac-apple-event-map [core-event open-documents]
>>     'mac-ae-open-documents)
>> --- 1779,1787 ----
>>   (define-key mac-apple-event-map [core-event open-application] 0)
>>
>>   ;; Received when a dock or application icon is clicked and Emacs is
>> ! ;; already running.
>> ! (define-key mac-apple-event-map [core-event reopen-application]
>> !   'mac-ae-reopen-application)
>>
>>   (define-key mac-apple-event-map [core-event open-documents]
>>     'mac-ae-open-documents)

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

* Re: OS X: raise-frame at reopen event
  2007-10-17  2:30     ` Seiji Zenitani
@ 2007-10-17  8:21       ` YAMAMOTO Mitsuharu
  0 siblings, 0 replies; 7+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-10-17  8:21 UTC (permalink / raw)
  To: Seiji Zenitani; +Cc: emacs-devel

>>>>> On Tue, 16 Oct 2007 22:30:38 -0400, Seiji Zenitani <zenitani@mac.com> said:

> Two months ago, you installed the reopen-frame patch to the trunk
> for the Mac Carbon port.  Could you install it to EMACS_22_BASE,
> too?  I have been using the patch on the EMACS_22_BASE branch since
> then, but I have no problem yet.

This change, as well as other non-bugfix changes for the Carbon port
in the trunk as of `before-merge-multi-tty-to-trunk' tag, will be
installed to the EMACS_22_BASE branch after the Emacs 22.2 release.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

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

end of thread, other threads:[~2007-10-17  8:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-09 22:35 OS X: raise-frame at reopen event Seiji Zenitani
2007-08-09 23:11 ` Randal L. Schwartz
2007-08-10 10:18 ` YAMAMOTO Mitsuharu
2007-08-10 23:07   ` Seiji Zenitani
2007-08-11  0:18     ` YAMAMOTO Mitsuharu
     [not found]   ` <E2DE3E97-35A2-4EC3-8DEC-4D1D6FAAD72D@mac.com>
2007-10-17  2:30     ` Seiji Zenitani
2007-10-17  8:21       ` YAMAMOTO Mitsuharu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).