From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Proulx Newsgroups: gmane.emacs.help Subject: Re: How to find out if emacs is running inside GUI or terminal Date: Fri, 22 Nov 2013 12:30:25 -0700 Message-ID: <20131122193025.GA18686@hysteria.proulx.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1385148656 27135 80.91.229.3 (22 Nov 2013 19:30:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Nov 2013 19:30:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 22 20:31:01 2013 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 1VjwRR-0003Lq-4n for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Nov 2013 20:31:01 +0100 Original-Received: from localhost ([::1]:40763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjwRQ-0003vN-OB for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Nov 2013 14:31:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjwR2-0003rE-0J for help-gnu-emacs@gnu.org; Fri, 22 Nov 2013 14:30:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjwQw-0007aq-1t for help-gnu-emacs@gnu.org; Fri, 22 Nov 2013 14:30:35 -0500 Original-Received: from joseki.proulx.com ([216.17.153.58]:32919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjwQv-0007ai-Bm for help-gnu-emacs@gnu.org; Fri, 22 Nov 2013 14:30:29 -0500 Original-Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id C8A992122A for ; Fri, 22 Nov 2013 12:30:25 -0700 (MST) Original-Received: by hysteria.proulx.com (Postfix, from userid 1000) id AD4F02DC77; Fri, 22 Nov 2013 12:30:25 -0700 (MST) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 216.17.153.58 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:94573 Archived-At: Louis-Guillaume Gagnon wrote: > Is there a way to find out within emacs if it is running in a GUI or inside > a terminal (i.e. -nw switch specified on the cli) using Elisp? > > The reason is I would like to take different actions in my ~/.emacs > depending on the situation. Yes. Use 'window-system' to determine this. Example: (if window-system (setq mouse-yank-at-point t)) And to head off complaints about the example, it is only an example. I am aware of 'fboundp'. Bob