From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cecil Westerhof Newsgroups: gmane.emacs.help Subject: Re: Functions that need X Date: Mon, 03 Jan 2011 15:46:39 +0100 Organization: Decebal Computing Message-ID: <8739paavu8.fsf@Compaq.site> References: <87sjxcv2ld.fsf@Compaq.site> <8739pcwake.fsf@puma.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1294069260 19430 80.91.229.12 (3 Jan 2011 15:41:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 15:41:00 +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 Jan 03 16:40:56 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 1PZmWj-00084o-8W for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jan 2011 16:40:53 +0100 Original-Received: from localhost ([127.0.0.1]:33660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZmWi-0004Sx-Fs for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jan 2011 10:40:52 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Original-Newsgroups: gnu.emacs.help X-Homepage: http://www.decebal.nl/ User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:9vqQVHcPhq2mIOlbMgeljUvZS4w= Original-Lines: 39 Original-NNTP-Posting-Host: 84.53.123.169 Original-X-Trace: 1294066000 news.xs4all.nl 41113 decebal/[::ffff:84.53.123.169]:24424 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: usenet.stanford.edu gnu.emacs.help:183904 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:78110 Archived-At: Op zaterdag 1 jan 2011 22:58 CET schreef Tim X.: >> 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) > ...) I did not know this. Combining with another tip the code now has become: (when (display-graphic-p) (set-scroll-bar-mode 'right) (tool-bar-mode -1)) > 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. I work with screen and emacs on this system. The problem is that sometimes the connection goes away. And if this happens my emacs will hang. With screen I just can continue where I left of after the connection is restored. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof