From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Functions that need X Date: Sun, 02 Jan 2011 08:58:25 +1100 Organization: Unlimited download news at news.astraweb.com Message-ID: <8739pcwake.fsf@puma.rapttech.com.au> References: <87sjxcv2ld.fsf@Compaq.site> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1293921643 22768 80.91.229.12 (1 Jan 2011 22:40:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 1 Jan 2011 22:40:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 01 23:40:38 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZA7q-0003sf-Bk for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Jan 2011 23:40:38 +0100 Original-Received: from localhost ([127.0.0.1]:35706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZA7p-0001IZ-QR for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Jan 2011 17:40:37 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!news.astraweb.com!border2.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:1mtpGXjz62UxQt0zfEylZ3gKiJE= Original-Lines: 39 Original-NNTP-Posting-Host: 9409776d.news.astraweb.com Original-X-Trace: DXC=FG; H0ambc?YaaSDeVe\e2]L?0kYOcDh@ZN7:H2`MmAUSUD6cPA?_dm]]G; 2>V^?kWSCAkl5c@Xgk^MoF@d\0 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78033 Archived-At: Cecil Westerhof writes: > I have a lot of functionality written for my Emacs. I was asked to > maintain a server for a friend. I installed Emacs there and put my > Emacs functionality there also. But some things are depending on X. > Because of this I made those depended working with X. In the start of > my .emacs I have: > (defconst +using-X+ (getenv "DISPLAY")) > Alternatively, just use the built-in variable window-system i.e. (unless (eq 'x window-system) ....) or even better, use one of the display capability predicates, such as (unless (display-graphic-p) ...) > And where I use X-functionality (not much at the moment) I have: > (unless (not +using-X+) > (set-scroll-bar-mode 'right) > (tool-bar-mode -1)) Do you actually need the above? Long time since I've used emacs in a non-graphics mode, but when I did, you didn't get things like tool-bar unless the display could support it. One of the reasons I no longer use emacs in console mode is because I do almost everything on remote systems via tramp these days and very rarely need to run a remote emacs. Tim -- tcross (at) rapttech dot com dot au