From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Zimmerman Newsgroups: gmane.emacs.help Subject: Re: How to switch off the touchpad when Emacs window is active under Linux? Date: Mon, 24 Aug 2015 12:14:51 -0700 Message-ID: <20150824190903.3079.0B60605E@ahiker.mooo.com> References: <18033119.faXLECKoLl@linux-k2bd.site> Reply-To: help-gnu-emacs@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1440443750 32182 80.91.229.3 (24 Aug 2015 19:15:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Aug 2015 19:15:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 24 21:15:32 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1ZTxDM-0004f1-2Q for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Aug 2015 21:15:28 +0200 Original-Received: from localhost ([::1]:56206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTxDL-0000Mh-4u for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Aug 2015 15:15:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTxCv-0008S4-4M for help-gnu-emacs@gnu.org; Mon, 24 Aug 2015 15:15:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTxCu-0003rk-A7 for help-gnu-emacs@gnu.org; Mon, 24 Aug 2015 15:15:01 -0400 Original-Received: from disorder-1-pt.tunnel.tserv3.fmt2.ipv6.he.net ([2001:470:1f04:51a::2]:56491 helo=acedia.primate.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTxCu-0003oL-1w for help-gnu-emacs@gnu.org; Mon, 24 Aug 2015 15:15:00 -0400 Original-Received: from acedia.primate.net (localhost [127.0.0.1]) by acedia.primate.net (8.14.9/8.14.9/Debian-4) with ESMTP id t7OJEqDV017786 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 24 Aug 2015 12:14:52 -0700 Original-Received: (from itz@localhost) by acedia.primate.net (8.14.9/8.14.9/Submit) id t7OJEpBB017781 for help-gnu-emacs@gnu.org; Mon, 24 Aug 2015 12:14:51 -0700 X-Authentication-Warning: acedia.primate.net: itz set sender to itz@buug.org using -f Original-Received: from itz by ahiker.mooo.com with local (Exim 4.80) (envelope-from ) id 1ZTxCl-0000og-Qr for help-gnu-emacs@gnu.org; Mon, 24 Aug 2015 12:14:51 -0700 Content-Disposition: inline In-Reply-To: <18033119.faXLECKoLl@linux-k2bd.site> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:470:1f04:51a::2 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106808 Archived-At: On 2015-08-24 21:02 +0200, AW wrote: > Synclient on this notebook works, but this function doesn't: > (defun turn-off-mouse (&optional frame) > (interactive) > (let ((inhibit-message t) (default-directory "~")) > (shell-command "synclient TouchpadOff=1"))) > > (defun turn-on-mouse (&optional frame) > (interactive) > (let ((inhibit-message t) (default-directory "~")) > (shell-command "synclient TouchpadOff=0"))) > > (add-hook 'focus-in-hook #'turn-off-mouse) > (add-hook 'focus-out-hook #'turn-on-mouse) > (add-hook 'delete-frame-functions #'turn-on-mouse) The variable inhibit-message doesn't exist in my emacs (probably a recent addition), but I'm guessing that it discards any output from the subprocess. I would leave it out so you see what prevents synclient from working. Also, I don't see why changing default-directory should be necessary, either. -- Please *no* private copies of mailing list or newsgroup messages. Rule 420: All persons more than eight miles high to leave the court.