unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Filipe Silva <filipe.silva@gmail.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: how to teach emacs that ' + c = ç
Date: Wed, 5 Jul 2017 13:11:23 -0300	[thread overview]
Message-ID: <CAEwkUWPbmp_TuVmF+CdHeJC2P7XCno0ozTAewvL7bM9QvTRGOA@mail.gmail.com> (raw)
In-Reply-To: <CAEwkUWP=jVi1L4oGfcs8fpx24mVRHfpfGz53c=3XYtjD0m-_8A@mail.gmail.com>

Ok, so I implemented a your LANG=C hack in my emacs daemon script:



unamestr=$(uname -a)
if [[ "$unamestr" == *"Linux"* ]] && [[ $unamestr == *"ARCH"* ]]; then
  # fix cedila | ç  in emacs under arch linux
  # hack found here:
http://lists.gnu.org/archive/html/help-gnu-emacs/2017-07/msg00070.html
  LANG=C
fi

emacs.sh --daemon; rc=$?
if [[ ! $rc = 0 ]]; then
  echo -e "there was a ${Red}problem${Rst} starting emacs daemon: $rc"
  exit $rc
else
  echo -e "emacs daemon ${Blue}started${Rst}. success."
fi

boostrap_time=$(emacsclient.sh -e "(emacs-init-time)")
echo -e "emacs daemon boostrap time: ${Cyan}${boostrap_time}${Rst}"


And it works. But why does it works? It feels so fragile.


On Wed, Jul 5, 2017 at 12:55 PM, Filipe Silva <filipe.silva@gmail.com>
wrote:

> very interesting. LANC=C emacs really fix the problem. What is happening
> here?
>
> maybe this is a bug.
>
> On Tue, Jul 4, 2017 at 10:57 PM, Óscar Fuentes <ofv@wanadoo.es> wrote:
>
>> Filipe Silva <filipe.silva@gmail.com> writes:
>>
>> > I've set up my keyboard layout in arch with localectl set-x11-keymap us
>> > pc104 intl
>> >
>> > By default, in this layout, the ' is a dead character. It is called a
>> dead
>> > acute. In portuguese, we are used to compose the ç char with ' + c = ç
>> when
>> > using international us-keyboard layouts.
>> >
>> > I don't know why, but by default linux distros come configured so that
>> when
>> > you type this combination ' + c= ć, which is an invalid char in
>> Brazilian
>> > portuguese, and so I'm screwed.
>> >
>> > So I did this:
>> >
>> >    -
>> >
>> >    Editing the files:
>> >
>> >    sudo vim /usr/lib/gtk-3.0/3.0.0/immodules.cache sudo vim
>> >    /usr/lib/gtk-2.0/2.10.0/immodules.cache
>> >
>> >    changing the line
>> >
>> >    "cedilla" "Cedilla" "gtk20" "/usr/share/locale"
>> >    "az:ca:co:fr:gv:oc:pt:sq:tr:wa" to "cedilla" "Cedilla" "gtk20"
>> >    "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa:en"
>> >    -
>> >
>> >    replaced "ć" to "ç" and "Ć" to "Ç" on
>> >    /usr/share/X11/locale/en_US.UTF-8/Compose
>> >
>> >    sudo cp /usr/share/X11/locale/en_US.UTF-8/Compose
>> >    /usr/share/X11/locale/en_US.UTF-8/Compose.bak sed 's/ć/ç/g' <
>> >    /usr/share/X11/locale/en_US.UTF-8/Compose | sed 's/Ć/Ç/g' > Compose
>> sudo mv
>> >    Compose /usr/share/X11/locale/en_US.UTF-8/Compose
>> >    -
>> >
>> >       add two lines on /etc/environment
>> >
>> >       GTK_IM_MODULE=cedilla QT_IM_MODULE=cedilla
>> >       -
>> >
>> >       restart my computer.
>> >
>> > And all is working fine in firefox, chromium, scite, gvim or any other
>> gui
>> > tool, but no emacs. on emacs, ' + cinsist on producing ć, despite my
>> > efforts.
>> >
>> >
>> > So I ask you, how can I teach emacs to produce ç and not ć in this
>> scenario?
>> >
>> >
>> > thanks in advance.
>>
>> Curious. I have
>>
>> setxkbmap us_intl
>>
>> in my init scripts and have the opposite problem (not actually a problem
>> for me since in my languages ç is not used).
>>
>> ' + c produces ç in Emacs but ć elsewhere.
>>
>> BUT...
>>
>> if I start Emacs with -Q, then ' + c indeed produces as the other
>> applications ć.
>>
>> After looking at my customizations, tried
>>
>> LANG=C emacs -Q
>>
>> and now ' + c gives ç.
>>
>> Hope this gives you some clues.
>>
>> Ubuntu 17.04 here.
>>
>>
>>
>


  reply	other threads:[~2017-07-05 16:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05  1:25 how to teach emacs that ' + c = ç Filipe Silva
2017-07-05  1:57 ` Óscar Fuentes
2017-07-05 15:55   ` Filipe Silva
2017-07-05 16:11     ` Filipe Silva [this message]
2017-07-05 20:38     ` tomas
2017-07-05 21:26       ` Filipe Silva
2017-07-05 23:28         ` Filipe Silva
2017-07-05  6:14 ` Héctor Lahoz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEwkUWPbmp_TuVmF+CdHeJC2P7XCno0ozTAewvL7bM9QvTRGOA@mail.gmail.com \
    --to=filipe.silva@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).