From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/18072 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.gnus.user Subject: Re: Trigger spell checking before sending Date: Sat, 13 Feb 2016 05:42:20 +0100 Message-ID: <87mvr5ql03.fsf@debian.uxu> References: <874mde27a9.fsf@posteo.net> <874mdeddos.fsf@debian.uxu> <87vb5uvxbd.fsf@pietrop-debian64RfL.eng.citrite.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1455338575 24848 80.91.229.3 (13 Feb 2016 04:42:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Feb 2016 04:42:55 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Sat Feb 13 05:42:46 2016 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aUS2b-0003tt-F3 for gegu-info-gnus-english@m.gmane.org; Sat, 13 Feb 2016 05:42:41 +0100 Original-Received: from localhost ([::1]:39073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUS2X-00038Y-H6 for gegu-info-gnus-english@m.gmane.org; Fri, 12 Feb 2016 23:42:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUS2V-00038H-GP for info-gnus-english@gnu.org; Fri, 12 Feb 2016 23:42:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUS2S-0008O9-1T for info-gnus-english@gnu.org; Fri, 12 Feb 2016 23:42:35 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:60971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUS2R-0008Nx-Pt for info-gnus-english@gnu.org; Fri, 12 Feb 2016 23:42:31 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aUS2Q-0003oz-2k for info-gnus-english@gnu.org; Sat, 13 Feb 2016 05:42:30 +0100 Original-Received: from nl106-137-227.student.uu.se ([130.243.137.227]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 13 Feb 2016 05:42:30 +0100 Original-Received: from embe8573 by nl106-137-227.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 13 Feb 2016 05:42:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: info-gnus-english@gnu.org Original-Lines: 36 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-227.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:Nl1wbOVnbi9GE5WSkMuiPi7i9OQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:18072 Archived-At: Pietro writes: > Alternatively I am thinking of writing a function > which asks the user for the language the ispell > function should check for, it does not need to > accept all the languages and for instance I would be > more than happy to have something like that : > > Mini-buffer says: [Which language ?[e : English, i: > Italian] I still don't like the idea of having this complicated a thing in a hook; on the other hand, I just realized that the code I provided isn't compatible with the hook solution, so it isn't of any help if you are set on that idea. OK, try this, only change the Swedish stuff for Italian, no? (defun message-spell-before-send (lang-char) (interactive "s(e)nglish or (s)wedish: ") (let ((lang (pcase lang-char ("e" "american-insane") ; these has to be added outside of Emacs ("s" "svenska") ))) (if lang (progn (ispell-change-dictionary lang) ; N.B. side-effect - this isn't reset (ispell-message) ) (message "Spelling not done - no support for: %s" lang-char) ))) If you don't want to spell, just hit RET. -- underground experts united http://user.it.uu.se/~embe8573