From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitri Paduchikh Newsgroups: gmane.emacs.devel Subject: Re: Request: Use message instead of message_with_string for user visible output? Date: Sun, 27 Oct 2013 01:47:19 +0600 Message-ID: <87ob6byfug.fsf@dpaduchikh.invalid> References: <83wql0f1ej.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1382816857 449 80.91.229.3 (26 Oct 2013 19:47:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Oct 2013 19:47:37 +0000 (UTC) Cc: "T.V. Raman" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 26 21:47:41 2013 Return-path: Envelope-to: ged-emacs-devel@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 1Va9pk-0003nG-Jd for ged-emacs-devel@m.gmane.org; Sat, 26 Oct 2013 21:47:40 +0200 Original-Received: from localhost ([::1]:35819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Va9pk-0002RP-44 for ged-emacs-devel@m.gmane.org; Sat, 26 Oct 2013 15:47:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Va9pa-0002R8-GN for emacs-devel@gnu.org; Sat, 26 Oct 2013 15:47:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Va9pS-0005eT-2i for emacs-devel@gnu.org; Sat, 26 Oct 2013 15:47:30 -0400 Original-Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:64858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Va9pR-0005eM-RR for emacs-devel@gnu.org; Sat, 26 Oct 2013 15:47:22 -0400 Original-Received: by mail-la0-f42.google.com with SMTP id ea20so4141999lab.1 for ; Sat, 26 Oct 2013 12:47:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=F0HCecvgPgZlhNoxWp7GokcPliULY5+ReQI985+SeuM=; b=SqMn8QXFzsmGXnlMdWAPzJ1tacvosfh+hE/tZJ3gXRwON1/Q7NQDnlWvNJI8vIcF4z zd9H41FyuJiV55bR/7Ts54YCE/Ylx0+11SyHzPPfdB5S2VzsX6VtPobIEUhlHaAhOqFK ccRhgKGPAdQFbjGXuIDHFybxMVk1NqyveaJc/fFW4a5EgI6wRtqQcpkzlmG4egGYsCMU Zn5vkKTDOqJMmN0VoS4rYss8WUb2Kvm4jY7hl2LWPyZCZ+kdwwtniMgBZ7rZZRGwrjqQ n0ugZZ1p9n6Bqy96/APywG6SXUJMGgeI5ZHNRKGYB0D23O/KpSd3x6cfXHDQlu7Enq33 KCAA== X-Received: by 10.152.87.79 with SMTP id v15mr5149791laz.14.1382816840409; Sat, 26 Oct 2013 12:47:20 -0700 (PDT) Original-Received: from paduch.telenet.ru ([46.48.49.226]) by mx.google.com with ESMTPSA id e4sm6980677lba.15.2013.10.26.12.47.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Oct 2013 12:47:19 -0700 (PDT) In-Reply-To: (T. V. Raman's message of "Sat, 26 Oct 2013 09:33:39 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164571 Archived-At: T.V. Raman wrote: > Some useful hooks to add: [...] > 2. A pre-insert hook on self-insert-command -- right now I cant tell > from the emacspeak end when self-insert-command bales out because > the current context is read-only. Just for the record, I have proposed on the Emacspeak list to use command-error-function for speaking read-only errors. It seems to work well with self-insert-command and other such cases. For speaking undefined keys there is a solution using a little trickery from ring-bell-function: (defun my-speak-echo-area () (let ((msg (current-message))) (if (> (length msg) 0) (dtk-speak msg)))) (setq ring-bell-function (lambda () (dtk-stop) (emacspeak-auditory-icon 'warn-user) (if (eq this-command nil) (run-with-idle-timer 0 nil 'my-speak-echo-area)))) Of course, it would be nice if some uniform solution existed. -- With best regards Dmitri Paduchikh