Gnus development mailing list
 help / color / mirror / Atom feed
* Re: gnus-select-frame-set-input-focus
       [not found] <t5x3bgukeh2.fsf@notch.damtp.cam.ac.uk>
@ 2006-04-03 13:54 ` Reiner Steib
  2006-04-07  2:15   ` gnus-select-frame-set-input-focus Katsumi Yamaoka
  2006-04-17 13:00   ` gnus-select-frame-set-input-focus Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 6+ messages in thread
From: Reiner Steib @ 2006-04-03 13:54 UTC (permalink / raw)
  Cc: bugs, David Reitter

On Mon, Apr 03 2006, Stephen Eglen wrote on gnus.gnus-bug:

> gnus-util.el defines gnus-select-frame-set-input-focus as a
> variant of select-frame-set-input-focus in GNU Emacs.  I just noted
> that one of the conditionals in GNU Emacs has changed from:
>
>  (eq window-system 'x)
> to:
>  (eq window-system '(x mac))
>
> Does the gnus-util.el version need updating?  I'm copying this to
> David Reitter, who alerted me to this function recently, and who knows
> more about the mac version of Emacs than me.
>
> Stephen
>
> Gnus v5.11
> GNU Emacs 22.0.50.2 (i686-pc-linux-gnu, X toolkit)
>  of 2006-03-31 on notch.damtp.cam.ac.uk

We should try to use the updated Emacs code if we can detect it.
Tests on version numbers are bad, but I can't think of a better
solution.  So how about the following patch?

--8<---------------cut here---------------start------------->8---
--- gnus-util.el	17 Mar 2006 16:00:27 +0100	7.40
+++ gnus-util.el	03 Apr 2006 15:49:16 +0200	
@@ -1406,6 +1406,8 @@
 	;; (defalias 'gnus-select-frame-set-input-focus
 	;;   'select-frame-set-input-focus)
 	;; (select-frame-set-input-focus frame))
+	((>= emacs-major-version 22)
+	 (select-frame-set-input-focus frame))
 	(t
 	 (raise-frame frame)
 	 (select-frame frame)
--8<---------------cut here---------------end--------------->8---

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



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

* Re: gnus-select-frame-set-input-focus
  2006-04-03 13:54 ` gnus-select-frame-set-input-focus Reiner Steib
@ 2006-04-07  2:15   ` Katsumi Yamaoka
  2006-04-07 14:59     ` gnus-select-frame-set-input-focus Reiner Steib
  2006-04-17 13:00   ` gnus-select-frame-set-input-focus Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 6+ messages in thread
From: Katsumi Yamaoka @ 2006-04-07  2:15 UTC (permalink / raw)
  Cc: Stephen Eglen, David Reitter

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

>>>>> In <v9slouix1u.fsf@marauder.physik.uni-ulm.de>
>>>>>	Reiner Steib wrote:

> On Mon, Apr 03 2006, Stephen Eglen wrote on gnus.gnus-bug:

>> gnus-util.el defines gnus-select-frame-set-input-focus as a
>> variant of select-frame-set-input-focus in GNU Emacs.  I just noted
>> that one of the conditionals in GNU Emacs has changed from:
>>
>>  (eq window-system 'x)
>> to:
>>  (eq window-system '(x mac))
>>
>> Does the gnus-util.el version need updating?  I'm copying this to
>> David Reitter, who alerted me to this function recently, and who knows
>> more about the mac version of Emacs than me.
>>
>> Stephen
>>
>> Gnus v5.11
>> GNU Emacs 22.0.50.2 (i686-pc-linux-gnu, X toolkit)
>>  of 2006-03-31 on notch.damtp.cam.ac.uk

> We should try to use the updated Emacs code if we can detect it.
> Tests on version numbers are bad, but I can't think of a better
> solution.  So how about the following patch?

> --- gnus-util.el	17 Mar 2006 16:00:27 +0100	7.40
> +++ gnus-util.el	03 Apr 2006 15:49:16 +0200
> @@ -1406,6 +1406,8 @@
>  	;; (defalias 'gnus-select-frame-set-input-focus
>  	;;   'select-frame-set-input-focus)
>  	;; (select-frame-set-input-focus frame))
> +	((>= emacs-major-version 22)
> +	 (select-frame-set-input-focus frame))
>  	(t
>  	 (raise-frame frame)
>  	 (select-frame frame)

When I made that function, I was using X11R4 on a certain old BSD
workstation.  Although I don't have such machines now, I remember
that there was some problem to run `select-frame-set-input-focus'
with only Emacs 21.2.  Now I have Solaris 2.6, RHL9 and Fedora
Core 4 machines and I only know that `s-f-s-i-f' doesn't focus
the mouse into a selected frame properly in Emacs 21.*.

I think your change is right.  If testing of the version is not
a good idea, how about copying of Emacs 22's definition fully?


[-- Attachment #2: Type: application/emacs-lisp, Size: 810 bytes --]

[-- Attachment #3: Type: text/plain, Size: 398 bytes --]


(The part checking the existence of `x-focus-frame' is not
necessary to No Gnus.)

I've tested it with Emacs 21.1 through 23.0.0 under the recent X
windows.  I don't have an idea to make it work with Emacs 20,
though[1].

[1] It can be solved using the external wmctl command, which
raises and focuses a frame; see the articles in:
<URL:http://news.gmane.org/group/gmane.emacs.help/thread=31943>.

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

* Re: gnus-select-frame-set-input-focus
  2006-04-07  2:15   ` gnus-select-frame-set-input-focus Katsumi Yamaoka
@ 2006-04-07 14:59     ` Reiner Steib
  2006-04-09  0:48       ` gnus-select-frame-set-input-focus Katsumi Yamaoka
  0 siblings, 1 reply; 6+ messages in thread
From: Reiner Steib @ 2006-04-07 14:59 UTC (permalink / raw)
  Cc: ding, Stephen Eglen, David Reitter

On Fri, Apr 07 2006, Katsumi Yamaoka wrote:

>>>>>>	Reiner Steib wrote:
>> --- gnus-util.el	17 Mar 2006 16:00:27 +0100	7.40
>> +++ gnus-util.el	03 Apr 2006 15:49:16 +0200
>> @@ -1406,6 +1406,8 @@
>>  	;; (defalias 'gnus-select-frame-set-input-focus
>>  	;;   'select-frame-set-input-focus)
>>  	;; (select-frame-set-input-focus frame))
>> +	((>= emacs-major-version 22)
>> +	 (select-frame-set-input-focus frame))
>>  	(t
>>  	 (raise-frame frame)
>>  	 (select-frame frame)
[...]
> I think your change is right.  If testing of the version is not
> a good idea, 

It's not a good idea in the sense that we should test for the missing
feature or broken function if possible.  

> how about copying of Emacs 22's definition fully?

Then we will (again) miss fixes in that function in newer Emacsen.
Therefore, IMHO the (>= emacs-major-version 22) clause should stay and
the full Emacs 22 definition should go into the (t ...) clause.  If
you agree, could you please install it in this way after the release
in trunk and v5-10?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



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

* Re: gnus-select-frame-set-input-focus
  2006-04-07 14:59     ` gnus-select-frame-set-input-focus Reiner Steib
@ 2006-04-09  0:48       ` Katsumi Yamaoka
  0 siblings, 0 replies; 6+ messages in thread
From: Katsumi Yamaoka @ 2006-04-09  0:48 UTC (permalink / raw)
  Cc: Stephen Eglen, David Reitter

>>>>> In <v9fykpe8jh.fsf@marauder.physik.uni-ulm.de>
>>>>>	Reiner Steib <reinersteib+gmane@imap.cc> wrote:

>> If testing of the version is not a good idea,

> It's not a good idea in the sense that we should test for the missing
> feature or broken function if possible.

That policy is good and clear.

>> how about copying of Emacs 22's definition fully?

> Then we will (again) miss fixes in that function in newer Emacsen.
> Therefore, IMHO the (>= emacs-major-version 22) clause should stay and
> the full Emacs 22 definition should go into the (t ...) clause.  If
> you agree, could you please install it in this way after the release
> in trunk and v5-10?

I agree.



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

* Re: gnus-select-frame-set-input-focus
  2006-04-03 13:54 ` gnus-select-frame-set-input-focus Reiner Steib
  2006-04-07  2:15   ` gnus-select-frame-set-input-focus Katsumi Yamaoka
@ 2006-04-17 13:00   ` Lars Magne Ingebrigtsen
  2006-04-20  1:09     ` gnus-select-frame-set-input-focus Katsumi Yamaoka
  1 sibling, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-17 13:00 UTC (permalink / raw)
  Cc: Stephen Eglen, David Reitter

Reiner Steib <reinersteib+from-uce@imap.cc> writes:

> We should try to use the updated Emacs code if we can detect it.
> Tests on version numbers are bad, but I can't think of a better
> solution.  So how about the following patch?

Ok; applied.

-- 
If you want an explanation on what you have just read, please
refer to <URL:http://quimby.gnus.org/gnus/zombie.html>.



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

* Re: gnus-select-frame-set-input-focus
  2006-04-17 13:00   ` gnus-select-frame-set-input-focus Lars Magne Ingebrigtsen
@ 2006-04-20  1:09     ` Katsumi Yamaoka
  0 siblings, 0 replies; 6+ messages in thread
From: Katsumi Yamaoka @ 2006-04-20  1:09 UTC (permalink / raw)
  Cc: ding, Stephen Eglen, David Reitter

>>>>> In <m3slocich4.fsf@quimbies.gnus.org>
>>>>>	Lars Magne Ingebrigtsen wrote:

> Reiner Steib <reinersteib+from-uce@imap.cc> writes:

>> We should try to use the updated Emacs code if we can detect it.
>> Tests on version numbers are bad, but I can't think of a better
>> solution.  So how about the following patch?

> Ok; applied.

I've made it use select-frame-set-input-focus even in XEmacs
(XEmacs 21.5 has it).

I've also made some minor fixes for XEmacs in the trunk and the
v5-10 branch.



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

end of thread, other threads:[~2006-04-20  1:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <t5x3bgukeh2.fsf@notch.damtp.cam.ac.uk>
2006-04-03 13:54 ` gnus-select-frame-set-input-focus Reiner Steib
2006-04-07  2:15   ` gnus-select-frame-set-input-focus Katsumi Yamaoka
2006-04-07 14:59     ` gnus-select-frame-set-input-focus Reiner Steib
2006-04-09  0:48       ` gnus-select-frame-set-input-focus Katsumi Yamaoka
2006-04-17 13:00   ` gnus-select-frame-set-input-focus Lars Magne Ingebrigtsen
2006-04-20  1:09     ` gnus-select-frame-set-input-focus Katsumi Yamaoka

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 NNTP newsgroup(s).