Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-03-17 Thread Harshula
Hi Osamu,

On Tue, 2009-03-17 at 00:15 +0900, Osamu Aoki wrote:
> As I see now, it seems to change "all_ALL" behavior.

It shouldn't be. Can you please give an example of a change in
behaviour?

cya,
#




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-03-16 Thread Osamu Aoki
On Thu, Feb 26, 2009 at 03:06:17PM +1100, Harshula wrote:
> Because "all_ALL" is confusing and needs to be deprecated.

I agree "all_ALL" is confusing.

I think "all_ALL" needs to be deprecated if we find good alternative.

But we should not change "all_ALL" behavior.  (I do not want user to
change their set-up.)

What I really should happen is completely new system with
simpler design.  Minor change is most annoying to user.

As long as new system works better, people tends to be more foregiving
with major change :-)
 
> I will send out the patch I had been working on.

It was in my spam box.  As I see now, it seems to change "all_ALL"
behavior.
 
Osamu



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-02-25 Thread Harshula
Hi Sethu,

Thanks for the updated response/clarification. I think I now understand
your concerns.

On Thu, 2009-02-26 at 07:33 +0530, கா. சேது | K. Sethu wrote:

> im-switch package itself writes into the alternatives registry file
> /var/lib/dpkg/alternatives/x-input-all_ALL for inclusion of "default",
> "none"  and "default-xim".

We can change the postinst script.

> scim, uim(actually uim-xim which depends on uim-common) , gcin are
> some others I have checked to find that they write into same registry
> file in Debian. Haven't checked the others so could be more.

e.g. scim's postinst script contains:
-
 34 ua_inst all_ALL scim  0
 35 ua_inst ja_JP   scim 50
 36 ua_inst ko_KR   scim 50
 37 ua_inst zh_CN   scim 50
 38 ua_inst zh_TW   scim 50
 39 ua_inst zh_HK   scim 50
 40 ua_inst zh_SG   scim 50
 41 ua_inst all_ALL scim-immodule 0
 42 ua_inst ja_JP   scim-immodule 0
 43 ua_inst ko_KR   scim-immodule 0
 44 ua_inst zh_CN   scim-immodule 0
 45 ua_inst zh_TW   scim-immodule 0
 46 ua_inst zh_HK   scim-immodule 0
 47 ua_inst zh_SG   scim-immodule 0
-

These postinst scripts can also be updated.

> a). So while all_ALL to be deprecated, it will not be disallowed?

Yes, as Osamu pointed out earlier, we need to read it if it exists.

> Will you be satisfied with "every" instead of "all" to avoid closely
> similar fake locale names?

The proposed quasi-locale "all" is not the only problem. As I discovered
last night we should not use "default" as a quasi-locale either. The
string "default" is used in another context as a 'type' of IM.

> b). Having the line "/etc/X11/xinit/xinput.d/all" would defeat the
> purpose of the line below it.
> 
> scim package for CJK locales and im-switch for th_TH locale set
> system-wide defaults of scim-bridge and th-xim respectively. If
> another package maintainer chooses to create registry entry for
> "x-input-all" then out-of-box readiness for those users will get
> turned off.

Are you saying we should not add functionality, in case a package
maintainer abuses it? Similarly, there's nothing stopping a package
maintainer from looping through all the locale names and setting them to
a particular IM type.

> My suggestion is to remove "/etc/X11/xinit/xinput.d/all" from the
> above. So the use of "all" would be restricted to user's own
> configuration only and not for system wide configuration.

My preference is for there to be symmetry between the user and system
quasi-locales.

> c)//3) Add a fake "default" locale that acts like a default.//
> 
> Why is it necessary ?

Because "all_ALL" is confusing and needs to be deprecated.

I will send out the patch I had been working on.

cya,
#




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-02-25 Thread கா . சேது | K . Sethu
Osamu :

>I have no idea on Ubuntu.  I am curious for gnome-language-selector Debian 
>situation.
>

For Debian distros when searching at http://packages.debian.org, I do
not see "gnome-language-selector" or the package "language-selector"
which carries it in.  It has been made only for Ubuntu it appears.

Harshula  + Osamu:
> > 3) I wonder if the packages that depend on im-switch use "all_ALL".
> >
> > Reverse Depends:
> >   uim-common,im-switch
> >   skkinput,im-switch
> >   scim-pinyin,im-switch
> >   scim,im-switch
> >   kinput2-common,im-switch
> >   imhangul,im-switch
> >   gtk-im-libthai,im-switch
> >   gcin,im-switch
> >   fcitx,im-switch
>
> I do not think they should use all_ALL to set im-switch beavior (I know
> this may not be followed as I know.)
>
> /etc/X11/xinit/xinput.d/default was meant to be the system default fall
> back.

im-switch package itself writes into the alternatives registry file
/var/lib/dpkg/alternatives/x-input-all_ALL for inclusion of "default",
"none"  and "default-xim".

scim, uim(actually uim-xim which depends on uim-common) , gcin are
some others I have checked to find that they write into same registry
file in Debian. Haven't checked the others so could be more.

Harshula:
> Then let us at a minimum,
>
> 1) Remove "all_ALL" from the documentation.
>
> 2) Add a check to im-switch which warns the user of a deprecated
>
> "all_ALL", if it exists.
>
> 3) Add a fake "default" locale that acts like a default.
>
> 4) I would prefer to use the string "all" for a fake locale that is
>
> meant to represent 'all' locales, instead of the string "override". It
>
> is clear and simple.
>
> So, I would prefer something like this
>
> 
>
> for f in"$HOME/.xinput.d/all" \
>
>   "$HOME/.xinput.d/${LNG}" \
>
>   "$HOME/.xinput.d/all_ALL" \
>
>   "$HOME/.xinput.d/default" \
>
>   "/etc/X11/xinit/xinput.d/all" \
>
>   "/etc/X11/xinit/xinput.d/${LNG}" \
>
>   "/etc/X11/xinit/xinput.d/all_ALL" \
>
>   "/etc/X11/xinit/xinput.d/default" ; do
>
> 

a). So while all_ALL to be deprecated, it will not be disallowed?

Anyway as per Osamu's point on backward compatibility it cannot be
removed from 80im-switch. So we will have "all" and "all_ALL" .

Will you be satisfied with "every" instead of "all" to avoid closely
similar fake locale names?

b). Having the line "/etc/X11/xinit/xinput.d/all" would defeat the
purpose of the line below it.

scim package for CJK locales and im-switch for th_TH locale set
system-wide defaults of scim-bridge and th-xim respectively. If
another package maintainer chooses to create registry entry for
"x-input-all" then out-of-box readiness for those users will get
turned off.

My suggestion is to remove "/etc/X11/xinit/xinput.d/all" from the
above. So the use of "all" would be restricted to user's own
configuration only and not for system wide configuration.

c)//3) Add a fake "default" locale that acts like a default.//

Why is it necessary ?

As it is now, through im-switch commands, the configuration file
"/etc/X11/xinit/xinput.d/default" can be sym-linked to by
"$HOME/.xinput.d/all", "$HOME/.xinput.d/${LNG}",
"$HOME/.xinput.d/all_ALL".  And so there is no need for the line
"$HOME/.xinput.d/default" in the above list.

So my suggestion is:

--

for f in"$HOME/.xinput.d/all" \

  "$HOME/.xinput.d/${LNG}" \

 "$HOME/.xinput.d/all_ALL" \

 "/etc/X11/xinit/xinput.d/${LNG}" \

"/etc/X11/xinit/xinput.d/all_ALL" \

"/etc/X11/xinit/xinput.d/default" ; do

-

And for the fake locale "all" an alternative name could be "every"

And among the two suggestions of "im-switch -e" and "im-switch -r"
which I made in post  #32 the second (for "re-initialising")  is not
needed with above arrangement.

~Sethu



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-02-01 Thread கா . சேது | K . Sethu
A correction to my posting #32:

[..]
> not writing to or creating anew an  alternatives registry
> file /var/lib/dpkg/alternatives/x-input-all_ALL.
[..]

It should be "xinput-all_ALL"  and not "x-input-all_ALL" .

~Sethu



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-02-01 Thread கா . சேது | K . Sethu
Note : I prepared the following response after reading Harshula's bug
first report and Osamu's reply (messages marked #5 and #10
respectively) . I haven't still read fully the next 3 messages
(#15,#22 and #27 yet)  which I saw only now.

With Harshula's proposed reversal of order (in first message), the
relevant lines in /etc/X11/Xsession.d/80im-switch would be:

for f in "$HOME/.xinput.d/all_ALL" \
"$HOME/.xinput.d/${LNG}" \
"/etc/X11/xinit/xinput.d/all_ALL" \
"/etc/X11/xinit/xinput.d/${LNG}" \
"/etc/X11/xinit/xinput.d/default" ; do

"/etc/X11/xinit/xinput.d/all_ALL"  above
"/etc/X11/xinit/xinput.d/${LNG}" - Well, that upsets the apple cart
for those users who
now have the luxury of relying on system-wide  configurations alone
for having their preferred keymap up and running out-of-box. I
am referring to system-wide defaults for locale "th_TH" provisioned by
postinst of "im-switch" package itself and for CJK locales
provisioned by postinst of "scim" package.

Un-reversing the order for only those two lines for system-wide
configurations is not a solution since that would not allow us one
common
definition for the scope of "all_ALL". Having difference in its
meaning for user's and system-wide configurations may well cause more
confusions.

An alternative I thought of is to restrict the use of all_ALL for
user's configurations only and not have for system-wide. If
"/etc/X11/xinit/xinput.d/all_ALL" is removed in above revered order
proposed by Harshula then the configuration file in the last line
("/etc/X11/xinit/xinput.d/default") will be the fall back default for
all locales. And also those th_TH and CJK locale users will
continue to have out-of-box ready defaults.

However the deprecation of all_ALL for system-wide configuration would
require the postinst of different IME packages as well as of im-switch
pacakge, not writing to or creating anew an  alternatives registry
file /var/lib/dpkg/alternatives/x-input-all_ALL. Presently postinst
of "scim" (in Debian Lenny but *not* in Ubuntu 8.xx) and "uim" (both
in Ubuntu-8.xx and Lenny) write into that file and so does postinst of
im-switch. So removing all_ALL from system-wide configurations may not
be feasible unless convention gets accepted by all parties.

Osamu wrote (in Message marked #10):


> By the way, what do you tell user if they want to remove all_ALL
> feature.  There is no easy way other than using "rm" command.  This is
> the real problem.  Maybe if we have way to remove link via im-switch
> command, people will not be confused.  Setting all_ALL while removing
> everything else will get you what you want with current order.
>
>
> I think action items are:
>  * improve documentation
>  * add new option -d which reset inputmethod link for that link, if run
>without -z ll_ZZ, then it should reset for all locales.

By "reset" I assume you mean "remove" from ~/.xinput.d/ only and not
from system-wide configuration. Because if a feature of removing from
system-wide by way of "sudo im-switch [ -z ll_LL] -d " is also
envisioned then it would mean the use of "update-alternatives
--remove-all" to remove teh relevant from registry - a futile step
because scim and / or uim packages would recreate registry entries if
installed (or reinstalled) after this step.

>
>
> Basically, -d is oposit of -a, -c, -s does.
>

Yes. "im-switch -a" removes only ~/.xinput.d/ll_CC where ll_CC is
locale of the session logged-in whereas "im-switch -d" would do a full
rm ~/.xinput.d/* - an inconsistency that needs to be avoided in my
opinion.

An alternative I could think of is to preserve the existing order of
precedences and all existing command syntax features. But Introduce
two more command features for *user's configuration* only as follows:

1. im-switch [v] -e

This is to"empty" out ~/.xinput.d/  . i.e.,  rm ~/.xinput.d/* . (May
call it "-p" meaning "purging" or anything else you consider more
appropraite).

On the execution of the command by user if there is no links or
backedups in ~/.xinput.d/ then command simply exits without any error
stae

If one or more links and/or backedups are there in ~/.xinput.d/ then,
there should be an alert that all those in ~/.xinput.d/ will be
removed  and user to confirm with "y" + "enter" or cancel with
"n"+"enter". (If only  "enter" is pressed without "y" or "n" it should
be also taken as a "n" becuase for in other im-switch commands
"enter" without a chioce means "no change".

If the user enters the same command with sudo, then the user should be
alerted that this usage is not provided for system-wide configuration
and exit.

This is feature is like reverting to  factory setting for user's
configuration - well not exactly factory setting because that would
mean "rmdir ~/.xinput.d" which step is not really necessary.

2. im-switch [v] [z  -ll_CC] -r inputmethodname

"r" for re-initalise - (may be you can think of better alternative for
"r" - like for example "i") . This is to carry out following two
c

Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-02-01 Thread Harshula
Hi Osamu,

On Sun, 2009-02-01 at 01:11 +0900, Osamu Aoki wrote:
 
> > > all_ALL is meant as fallback default as I remember.
> > 
> > Perhaps def_DEF would have been a more appropriate string?
> 
> That is still awkward.  Why not "default".

I prefer "default" too. Since "all_ALL" exists, I assumed there was some
design decision to only use the format ll_CC.

> > 1) I definitely agree we need a -d option. We should not be exposing the
> > user to rm -f ~/.xinput.d/*.
> 
> Patch welcom for squeeze.  Too late for lenny.

I'll add it to my TODO list. ;-)

> > However, we still need an all_ALL that over-rides everything else.
> 
> Changing meaning is bad idea for upgrade. If we need override, why not
> introduce "override".  Adding new alias is fine so we can introduce
> "default".

Then let us at a minimum,

1) Remove "all_ALL" from the documentation.

2) Add a check to im-switch which warns the user of a deprecated
"all_ALL", if it exists.

3) Add a fake "default" locale that acts like a default.

4) I would prefer to use the string "all" for a fake locale that is
meant to represent 'all' locales, instead of the string "override". It
is clear and simple.

So, I would prefer something like this 

for f in"$HOME/.xinput.d/all" \
   "$HOME/.xinput.d/${LNG}" \
   "$HOME/.xinput.d/all_ALL" \
   "$HOME/.xinput.d/default" \
   "/etc/X11/xinit/xinput.d/all" \
   "/etc/X11/xinit/xinput.d/${LNG}" \
   "/etc/X11/xinit/xinput.d/all_ALL" \
   "/etc/X11/xinit/xinput.d/default" ; do


> > 3) I wonder if the packages that depend on im-switch use "all_ALL".
> > 
> > Reverse Depends: 
> >   uim-common,im-switch
> >   skkinput,im-switch
> >   scim-pinyin,im-switch
> >   scim,im-switch
> >   kinput2-common,im-switch
> >   imhangul,im-switch
> >   gtk-im-libthai,im-switch
> >   gcin,im-switch
> >   fcitx,im-switch
> 
> I do not think they should use all_ALL to set im-switch beavior (I know
> this may not be followed as I know.)
> 
> /etc/X11/xinit/xinput.d/default was meant to be the system default fall
> back.

Ok.

> > 4) Is im-switch more complicated than it needs to be? Should we actually
> > take a step back and have a look at what it is trying to solve?
> 
> That is my opinion too.  I have cut down as much since I took over
> updates.  But next step is think about much simpler infrastructure with
> more flexibility for each package.  ... any volunteer to make this
> happen is welcome.  (I think use of alternative was overkill at least
> for ~/.)

I'll add this to my TODO list too. ;-)

cya,
#




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-01-31 Thread Osamu Aoki
Hi,

On Sun, Feb 01, 2009 at 02:16:54AM +1100, Harshula wrote:
> retitle 513242 im-switch: inconsistent quasi-locale behaviour
> thanks

OK.
 

 
> > all_ALL is meant as fallback default as I remember.
> 
> Perhaps def_DEF would have been a more appropriate string?

That is still awkward.  Why not "default".
 
> 
> 1) I definitely agree we need a -d option. We should not be exposing the
> user to rm -f ~/.xinput.d/*.

Patch welcom for squeeze.  Too late for lenny.
 
> 2) Perhaps introducing "def_DEF" as fallback default will make im-switch
> syntax more logical and easier to understand.
>
> However, we still need an all_ALL that over-rides everything else.

Changing meaning is bad idea for upgrade.  If we need override, why not
introduce "override".  Adding new alias is fine so we can introduce
"default".  In Debian, people take backward compatibility seriously.  I
do not want to fight with such case.

> gnome-language-selector (Ubuntu) sets scim-bridge for a particular
> locale. You want the ability to over-ride such arbitrary choices.

I have no idea on Ubuntu.  I am curious for gnome-language-selector
Debian situation.

> The code would then look like:

How about /etc/X11/Xsession.d/80im-switch having:


for f in"$HOME/.xinput.d/override" \
   "$HOME/.xinput.d/${LNG}" \
   "$HOME/.xinput.d/all_ALL" \
   "$HOME/.xinput.d/default" \
   "/etc/X11/xinit/xinput.d/override" \
   "/etc/X11/xinit/xinput.d/${LNG}" \
   "/etc/X11/xinit/xinput.d/all_ALL" \
   "/etc/X11/xinit/xinput.d/default" ; do


> 3) I wonder if the packages that depend on im-switch use "all_ALL".
> 
> Reverse Depends: 
>   uim-common,im-switch
>   skkinput,im-switch
>   scim-pinyin,im-switch
>   scim,im-switch
>   kinput2-common,im-switch
>   imhangul,im-switch
>   gtk-im-libthai,im-switch
>   gcin,im-switch
>   fcitx,im-switch

I do not think they should use all_ALL to set im-switch beavior (I know
this may not be followed as I know.)

/etc/X11/xinit/xinput.d/default was meant to be the system default fall
back.
 
> 4) Is im-switch more complicated than it needs to be? Should we actually
> take a step back and have a look at what it is trying to solve?

That is my opinion too.  I have cut down as much since I took over
updates.  But next step is think about much simpler infrastructure with
more flexibility for each package.  ... any volunteer to make this
happen is welcome.  (I think use of alternative was overkill at least
for ~/.)

Osamu




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-01-31 Thread Harshula
retitle 513242 im-switch: inconsistent quasi-locale behaviour
thanks

Hi Osamu,

On Wed, 2009-01-28 at 22:21 +0900, Osamu Aoki wrote:

> I kind of see your problem but questions are:
>  * is this feature?
>  * does this change cause side effect?



> > If im-switch is run with ll_CC set to all_ALL and run again with ll_CC
> > set to the real locale, e.g. en_AU, then the "inputmethodname" set for
> > en_AU will override the "inputmethodname" set for all_ALL.
> 
> That is what I intended this to work.
> 
> all_ALL is meant as fallback default as I remember.

Perhaps def_DEF would have been a more appropriate string?

> I think action items are:
>  * improve documentation
>  * add new option -d which reset inputmethod link for that link, if run
>without -z ll_ZZ, then it should reset for all locales.
> 
> Basically, -d is oposit of -a, -c, -s does.
> 
> What do you think?

1) I definitely agree we need a -d option. We should not be exposing the
user to rm -f ~/.xinput.d/*.

2) Perhaps introducing "def_DEF" as fallback default will make im-switch
syntax more logical and easier to understand.

However, we still need an all_ALL that over-rides everything else.
gnome-language-selector (Ubuntu) sets scim-bridge for a particular
locale. You want the ability to over-ride such arbitrary choices.

The code would then look like:

for f in"$HOME/.xinput.d/all_ALL" \
   "$HOME/.xinput.d/${LNG}" \
   "$HOME/.xinput.d/def_DEF" \
   "/etc/X11/xinit/xinput.d/all_ALL" \
   "/etc/X11/xinit/xinput.d/${LNG}" \
   "/etc/X11/xinit/xinput.d/def_DEF" \
   "/etc/X11/xinit/xinput.d/default" ; do


3) I wonder if the packages that depend on im-switch use "all_ALL".

Reverse Depends: 
  uim-common,im-switch
  skkinput,im-switch
  scim-pinyin,im-switch
  scim,im-switch
  kinput2-common,im-switch
  imhangul,im-switch
  gtk-im-libthai,im-switch
  gcin,im-switch
  fcitx,im-switch

4) Is im-switch more complicated than it needs to be? Should we actually
take a step back and have a look at what it is trying to solve?

cya,
#




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-01-28 Thread Osamu Aoki
Hi,

I kind of see your problem but questions are:
 * is this feature?
 * does this change cause side effect?

On Wed, Jan 28, 2009 at 03:16:51AM +1100, Harshula wrote:
> Package: im-switch
> Version: 1.16
> Severity: important
> Tags: patch
> 
> Hi,
> 
> K. Sethu brought this inconsistent behaviour to my attention [1].
> 
> im-switch(8):
> 
>im-switch [-v][-z ll_CC] -s inputmethodname
> 
> ...
> 
> -z ll_CC
>Set up the input method for X run under ll_CC locale (ISO 639  /
>ISO  3188).   When  setting  for all locales, use all_ALL as the 
>quasi-locale value here.

This documentation may have room to improve ...

> 
> 
> If im-switch is run with ll_CC set to all_ALL and run again with ll_CC
> set to the real locale, e.g. en_AU, then the "inputmethodname" set for
> en_AU will override the "inputmethodname" set for all_ALL.

That is what I intended this to work.

all_ALL is meant as fallback default as I remember.
 
> One would expect the inverse behaviour where the "inputmethodname" set
> for all_ALL would override the "inputmethodname" set for en_AU.

Hmmm could you suggest documentation update to reflect current
situation?

> Fixing this problem is quite straightforward. Simply, search for the
> quasi-locale, all_ALL, symlink before the real locale, en_AU:
> 
> --- 80im-switch.bak 2007-12-25 01:39:19.0 +1100
> +++ /etc/X11/Xsession.d/80im-switch 2009-01-28 02:29:39.0 +1100
> @@ -30,10 +30,10 @@
>  echo "Setting IM through im-switch for locale=$LNG."
>  
>  # Source first found configuration under $LNG locale
> -for f in"$HOME/.xinput.d/${LNG}" \
> -   "$HOME/.xinput.d/all_ALL" \
> -   "/etc/X11/xinit/xinput.d/${LNG}" \
> +for f in"$HOME/.xinput.d/all_ALL" \
> +   "$HOME/.xinput.d/${LNG}" \
> "/etc/X11/xinit/xinput.d/all_ALL" \
> +   "/etc/X11/xinit/xinput.d/${LNG}" \
> "/etc/X11/xinit/xinput.d/default" ; do
>  if [ -f "$f" -a -r "$f" ]; then
> echo "Start IM through $f linked to $(readlink -f $f)."
> 

This suites your way of expectation but it does not suites my way of
thinking.

By the way, what do you tell user if they want to remove all_ALL
feature.  There is no easy way other than using "rm" command.  This is
the real problem.  Maybe if we have way to remove link via im-switch
command, people will not be confused.  Setting all_ALL while removing
everything else will get you what you want with current order.


I think action items are:
 * improve documentation
 * add new option -d which reset inputmethod link for that link, if run
   without -z ll_ZZ, then it should reset for all locales.

Basically, -d is oposit of -a, -c, -s does.

What do you think?

Osamu

PS: I was lust using "rm" until now for this.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#513242: im-switch: inconsistent quasi-loacale behaviour

2009-01-27 Thread Harshula
Package: im-switch
Version: 1.16
Severity: important
Tags: patch

Hi,

K. Sethu brought this inconsistent behaviour to my attention [1].

im-switch(8):

   im-switch [-v][-z ll_CC] -s inputmethodname

...

-z ll_CC
   Set up the input method for X run under ll_CC locale (ISO 639  /
   ISO  3188).   When  setting  for all locales, use all_ALL as the 
   quasi-locale value here.


If im-switch is run with ll_CC set to all_ALL and run again with ll_CC
set to the real locale, e.g. en_AU, then the "inputmethodname" set for
en_AU will override the "inputmethodname" set for all_ALL.

One would expect the inverse behaviour where the "inputmethodname" set
for all_ALL would override the "inputmethodname" set for en_AU.

Fixing this problem is quite straightforward. Simply, search for the
quasi-locale, all_ALL, symlink before the real locale, en_AU:

--- 80im-switch.bak 2007-12-25 01:39:19.0 +1100
+++ /etc/X11/Xsession.d/80im-switch 2009-01-28 02:29:39.0 +1100
@@ -30,10 +30,10 @@
 echo "Setting IM through im-switch for locale=$LNG."
 
 # Source first found configuration under $LNG locale
-for f in"$HOME/.xinput.d/${LNG}" \
-   "$HOME/.xinput.d/all_ALL" \
-   "/etc/X11/xinit/xinput.d/${LNG}" \
+for f in"$HOME/.xinput.d/all_ALL" \
+   "$HOME/.xinput.d/${LNG}" \
"/etc/X11/xinit/xinput.d/all_ALL" \
+   "/etc/X11/xinit/xinput.d/${LNG}" \
"/etc/X11/xinit/xinput.d/default" ; do
 if [ -f "$f" -a -r "$f" ]; then
echo "Start IM through $f linked to $(readlink -f $f)."


cya,
#

[1]
http://sourceforge.net/mailarchive/message.php?msg_name=ce3a6c680811210331l592d40devc5da76e22945d675%40mail.gmail.com





-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org