From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88778 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Newsgroups: gmane.emacs.gnus.general Subject: Re: Change input method or smtp server depending on addressee Date: Sat, 14 Sep 2019 19:38:53 +0200 Message-ID: <87d0g2kcb6.fsf@gmail.com> References: <87o90mm4x2.fsf@ericabrahamsen.net> <87blwmuh6j.fsf@dick.i-did-not-set--mail-host-address--so-tickle-me> <87mug6klq3.fsf@ericabrahamsen.net> <87mug5bpuh.fsf@ucl.ac.uk> <87y2zojwbz.fsf@ericabrahamsen.net> <871rxggj9l.fsf@gmail.com> <87d0g9q44t.fsf@ericabrahamsen.net> <87a7bdelf4.fsf@gmail.com> <87tv9lmhzt.fsf@bobnewell.net> <875zm1w8sf.fsf@gmail.com> <87d0g8khcw.fsf@ericabrahamsen.net> <87pnk7vr51.fsf@gmail.com> <87k1afiucn.fsf@ericabrahamsen.net> <87d0g4k0z5.fsf@ericabrahamsen.net> <875zlwkpme.fsf_-_@yale.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="125601"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: ding@gnus.org To: "Jorge A. Alfaro-Murillo" Original-X-From: ding-owner+M36982@lists.math.uh.edu Mon Sep 16 17:52:02 2019 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i9tII-000WXr-C9 for ding-account@gmane.org; Mon, 16 Sep 2019 17:52:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.92.2) (envelope-from ) id 1i9tHj-0004p1-Ic; Mon, 16 Sep 2019 10:51:27 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.2) (envelope-from ) id 1i9C0j-0000WR-L5 for ding@lists.math.uh.edu; Sat, 14 Sep 2019 12:39:01 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) (envelope-from ) id 1i9C0i-0006Z5-2v for ding@lists.math.uh.edu; Sat, 14 Sep 2019 12:39:01 -0500 Original-Received: from mail-wr1-f43.google.com ([209.85.221.43]) by quimby.gnus.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1i9C0e-0003S0-8a for ding@gnus.org; Sat, 14 Sep 2019 19:38:58 +0200 Original-Received: by mail-wr1-f43.google.com with SMTP id o18so3734806wrv.13 for ; Sat, 14 Sep 2019 10:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=Q2bU8tKBQj899RCfsSbE0XSoOD4iANhA5DA/fSI7KSo=; b=cxmhLGOTSF4o5NVcIdyR+eYoAoptFqm8qZEZetmMv8C1SRLtYchKOTnXOFU83HRcrS XaPckqGeZKHZrHeWopHrLsdUHverR6/YubEcOwv7NYPPUj0mCOA12rt9b/gTZgQ1baoO MAISvxsehQ+PvHfr/k1NfoQ2UtjITeOxAzwbK6589uzZISzi94FRYMahw7HiazSqnwkh 395CtoL1Xhs9VcVtKcYRFdnLzvsm6454NQNiExraz8Ckg6c0GlUva/IMhLZsn9bY7OQ7 3S5ooEHjapnQpSxPib3NobKPdNWr13y6QpTJmsG1Z1bOS5fg1Xw4MNiCdWqWlSy++zAr qduA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=Q2bU8tKBQj899RCfsSbE0XSoOD4iANhA5DA/fSI7KSo=; b=DsvfOHOwdRdlAyLUkvF4VTSOqhRiZXJyuOi0mdah/MEeC7o0uLxCaDd43MkQhylpn2 taJo9N7mMzsYXIEoVexJTMQNf1sS1fzPBe4TcXTsEAWx9jCM0fCSZqKhB+cFjnuXuA5M 0hL+6sU18SQmivroEKVIF5+9ZRfJvyvMA/v2ktOlGL5iMMlyWrc1+lYuy1VOHiLBCapw TmAaIFo2wwVsdQvD+8IxAE7q8ReyAHNDsobIscGrt5jzzuEB5nyJPBtdAh8u52Qlitcz aPjdZMZ9DeghJjgHKNaQNWm8twwpBZoDVlO6EcCnj7Dmhx/1qWxr0sRpied8+fREk+if AWrg== X-Gm-Message-State: APjAAAUI/GxaXIYZof6RxedetzbYxoJuPxgwPx8o6k4ikQazxEeEM0g+ YgvPJiH9T1qybpM2vyMyCQg= X-Google-Smtp-Source: APXvYqzuWEEv1Wulcf3dJULTF+PfEJ2nc/ftCE5N7lSjrMj5wMq5ZA0LgIXEj4joq5lj5110Wy0l3Q== X-Received: by 2002:a5d:66ce:: with SMTP id k14mr20997256wrw.258.1568482735024; Sat, 14 Sep 2019 10:38:55 -0700 (PDT) Original-Received: from localhost ([185.112.167.114]) by smtp.gmail.com with ESMTPSA id z1sm59277394wre.40.2019.09.14.10.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Sep 2019 10:38:54 -0700 (PDT) In-Reply-To: <875zlwkpme.fsf_-_@yale.edu> (Jorge A. Alfaro-Murillo's message of "Fri, 13 Sep 2019 14:39:05 -0400") List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88778 Archived-At: On Fri, 13 Sep 2019 14:39:05 -0400 Jorge A. Alfaro-Murillo wrote: > Bob Newell writes: > >> We use gnus because it's amazing and does crazy stuff ... what other >> client would allow me (just as one small example) to set my input >> method to French, German, or Hawaiian depending on the addressee, >> let alone choose my smtp server based on a similar criterion? >> (Certain people ALWAYS get email from my preciously preserved AOL >> address!) > > That sounds very useful, would you care to share more about how you do > it? I'm curious about Bob's (or anyone's) way, too. Here's how I do the input method (and the related spell checking) part (I have no need for the smtp server part) (`my-message-determine-language' below goes into `message-setup-hook'): (defun my-message-determine-language () ;; adapted from `ispell-message' (save-excursion (let ((end-of-headers (copy-marker (or (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) (re-search-forward "^$" nil t) (point-min)))) (dictionary-alist ispell-message-dictionary-alist) dict) (while dictionary-alist (goto-char (point-min)) (if (re-search-forward (caar dictionary-alist) end-of-headers t) (setq dict (cdar dictionary-alist) ispell-local-dictionary dict dictionary-alist nil) (setq dictionary-alist (cdr dictionary-alist)))) (my-message-determine-input-method dict)))) (defun my-message-determine-input-method (&optional lang) (push (setq evil-input-method (pcase (or lang ispell-local-dictionary) ("english") ("viet" "vietnamese-telex") (_ "czech"))) input-method-history)) --=20 =C5=A0t=C4=9Bp=C3=A1n