From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: way to discriminate between Emacs.app or terminal launch of Emacs in init.el Date: Mon, 17 Aug 2015 17:18:51 -0700 (PDT) Message-ID: References: <17805043-1393-49a5-ad64-2010da9b1473@googlegroups.com> <87614dbk78.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1439859520 10460 80.91.229.3 (18 Aug 2015 00:58:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Aug 2015 00:58:40 +0000 (UTC) To: "Pascal J. Bourguignon" , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 18 02:58:27 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 1ZRVEO-0007q2-UJ for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Aug 2015 02:58:25 +0200 Original-Received: from localhost ([::1]:35233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRUci-0006Tw-Lp for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Aug 2015 20:19:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRUcI-0006RI-66 for help-gnu-emacs@gnu.org; Mon, 17 Aug 2015 20:19:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRUcE-00014K-Ur for help-gnu-emacs@gnu.org; Mon, 17 Aug 2015 20:19:02 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:22180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRUcE-00013x-Of for help-gnu-emacs@gnu.org; Mon, 17 Aug 2015 20:18:58 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t7I0IrnI014424 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Aug 2015 00:18:55 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t7I0IqmG006434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 18 Aug 2015 00:18:53 GMT Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t7I0Iq0Z023418; Tue, 18 Aug 2015 00:18:52 GMT In-Reply-To: <87614dbk78.fsf@kuiper.lan.informatimago.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 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:106653 Archived-At: > > I am quite happy using Emacs in a terminal, and am often > > inconvenienced using Emacs.app for all my emacs needs, despite > > netsperts who proclaim that I am gimping myself.=20 >=20 > You can use window-system > It'll be nil in the terminal, and ns for Emacs.app. > Other values are possible. I think this is what's recommended, but I can't tell you why `display-graphic-p' is supposed to be better here. ;-) (if (fboundp 'display-graphic-p) (display-graphic-p) window-system)