From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Filipe Silva Newsgroups: gmane.emacs.help Subject: =?UTF-8?Q?Re=3A_how_to_teach_emacs_that_=27_=2B_c_=3D_=C3=A7?= Date: Wed, 5 Jul 2017 13:11:23 -0300 Message-ID: References: <87a84jbq6x.fsf@wanadoo.es> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1499271138 12682 195.159.176.226 (5 Jul 2017 16:12:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Jul 2017 16:12:18 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: =?UTF-8?Q?=C3=93scar_Fuentes?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 05 18:12:13 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSmuM-0002l1-4u for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Jul 2017 18:12:06 +0200 Original-Received: from localhost ([::1]:47013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSmuR-0001ie-Gr for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Jul 2017 12:12:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSmti-0001fh-Uc for help-gnu-emacs@gnu.org; Wed, 05 Jul 2017 12:11:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSmth-0007iF-Gf for help-gnu-emacs@gnu.org; Wed, 05 Jul 2017 12:11:26 -0400 Original-Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:33520) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dSmth-0007hr-AT for help-gnu-emacs@gnu.org; Wed, 05 Jul 2017 12:11:25 -0400 Original-Received: by mail-oi0-x22a.google.com with SMTP id p188so129052349oia.0 for ; Wed, 05 Jul 2017 09:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=I7ATsWcO+sWPng197CGk2jiqX2FNf6xTvsCyxxCAcsk=; b=qFIi6afi6aZmEbP2VYwSr797tojPXoaclPst8o7ZptZBY9OZAnmxssdwTkaAUDSno2 ofvJ/AwJwr2j20Fwv/DREkavzG6eWyfmPxN+hlHb2GzFnASlrc5uuPAVA3mjyyu65QHX fa3+ncsNe4XFv+gpvmNkYjr5a1WoPzuOgRL8/aYVYpJ3FgMc3OXUqt9fUq2Mk0jCiW+9 NnqPE2RSTLgzgKikT49+8UvMPddzPVn16Kcc9RbTs3OSShk6wCQ3ws80Ipy25RETIo0Y Vj53G8jdFbXU4zDX8Y7UzRFh0h2t6lKadNiupb+McO75hfp1PjG1xKXsxMRLilQirVjd mHxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=I7ATsWcO+sWPng197CGk2jiqX2FNf6xTvsCyxxCAcsk=; b=JcvUMH1vKAR1A5vy8YJ8kKvJXWwlxmvFRk6uqGKko73XYNbkluzjn+/vc45XaGqPaH ZeU+WzYZTVfox4QEPujWdZs34DEIj2OIb20kOoQH9Jsip0Gn8ZmLCJ3X+4Vv2Fb7NCRg yASERQrrFaYNKcheSdRZddcDvEFKxGhYIW2chLnSseN3Svml3CdTlnswK2VJjpIzMeJX uiPWpthuLdxXnxkcJz3XxHKNLQ8Jb0JTS3lx9eg9Lx2bbavxbr4or48v4IndSe+FQsGf YI+TXqpLdIheVg3BqYNTx0SAP5whVmZSWNt1hG5UD0HtJF0T+Z7Mz/Mr3KVyiHKGl2nW FWcg== X-Gm-Message-State: AKS2vOwLLOPrpV8aUbFavSaScO5yilWZP4cXjkgKW7TWTUTt3YlEP0mI 287JcLcLwB0U1B57NtO0iKTGRcJzJA== X-Received: by 10.202.62.6 with SMTP id l6mr28769592oia.118.1499271084406; Wed, 05 Jul 2017 09:11:24 -0700 (PDT) Original-Received: by 10.182.2.73 with HTTP; Wed, 5 Jul 2017 09:11:23 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22a X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113706 Archived-At: Ok, so I implemented a your LANG=3DC hack in my emacs daemon script: unamestr=3D$(uname -a) if [[ "$unamestr" =3D=3D *"Linux"* ]] && [[ $unamestr =3D=3D *"ARCH"* ]]; t= hen # fix cedila | =C3=A7 in emacs under arch linux # hack found here: http://lists.gnu.org/archive/html/help-gnu-emacs/2017-07/msg00070.html LANG=3DC fi emacs.sh --daemon; rc=3D$? if [[ ! $rc =3D 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=3D$(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 wrote: > very interesting. LANC=3DC emacs really fix the problem. What is happenin= g > here? > > maybe this is a bug. > > On Tue, Jul 4, 2017 at 10:57 PM, =C3=93scar Fuentes wrot= e: > >> Filipe Silva writes: >> >> > I've set up my keyboard layout in arch with localectl set-x11-keymap u= s >> > 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 =C3=A7 char with ' + = c =3D =C3=A7 >> 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=3D =C4=87, 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 "=C4=87" to "=C3=A7" and "=C4=86" to "=C3=87" 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/=C4=87/=C3=A7/= g' < >> > /usr/share/X11/locale/en_US.UTF-8/Compose | sed 's/=C4=86/=C3=87/g'= > Compose >> sudo mv >> > Compose /usr/share/X11/locale/en_US.UTF-8/Compose >> > - >> > >> > add two lines on /etc/environment >> > >> > GTK_IM_MODULE=3Dcedilla QT_IM_MODULE=3Dcedilla >> > - >> > >> > 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 =C4=87, despite= my >> > efforts. >> > >> > >> > So I ask you, how can I teach emacs to produce =C3=A7 and not =C4=87 i= n 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 =C3=A7 is not used). >> >> ' + c produces =C3=A7 in Emacs but =C4=87 elsewhere. >> >> BUT... >> >> if I start Emacs with -Q, then ' + c indeed produces as the other >> applications =C4=87. >> >> After looking at my customizations, tried >> >> LANG=3DC emacs -Q >> >> and now ' + c gives =C3=A7. >> >> Hope this gives you some clues. >> >> Ubuntu 17.04 here. >> >> >> >