From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: .emacs - minor mode behavior Date: Tue, 13 Feb 2007 20:24:58 -0700 Message-ID: References: <1171403693.631853.279610@m58g2000cwm.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1171423540 10087 80.91.229.12 (14 Feb 2007 03:25:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Feb 2007 03:25:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 14 04:25:34 2007 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.50) id 1HHAlw-0004gZ-OQ for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Feb 2007 04:25:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHAlw-00040r-25 for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Feb 2007 22:25:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HHAli-00040J-NY for help-gnu-emacs@gnu.org; Tue, 13 Feb 2007 22:25:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HHAlg-0003zQ-Vc for help-gnu-emacs@gnu.org; Tue, 13 Feb 2007 22:25:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHAlg-0003zL-Po for help-gnu-emacs@gnu.org; Tue, 13 Feb 2007 22:25:16 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HHAlg-0001dm-E1 for help-gnu-emacs@gnu.org; Tue, 13 Feb 2007 22:25:16 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HHAlZ-0003T8-FH for help-gnu-emacs@gnu.org; Wed, 14 Feb 2007 04:25:09 +0100 Original-Received: from c-24-9-156-178.hsd1.co.comcast.net ([24.9.156.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Feb 2007 04:25:09 +0100 Original-Received: from kevin.d.rodgers by c-24-9-156-178.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Feb 2007 04:25:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 65 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: c-24-9-156-178.hsd1.co.comcast.net User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) In-Reply-To: <1171403693.631853.279610@m58g2000cwm.googlegroups.com> X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:41180 Archived-At: J K wrote: > I'm just learning Emacs and have recently started working on a .emacs > file for myself. I was hoping someone could answer what I think is > probably a simple question: > > During customization of the mode line, I was able to turn on column- > number-mode with the following line in .emacs: > > (setq column-number-mode t) > > I understand that this line is setting 'column-number-mode to t > (true). I also understand that this variable is created along with > the column-number-mode function by the define-minor-mode macro in > simple.el. > > I then proceeded to attempt to add the time to the mode line with the > line: > > (setq display-time-mode t) > > This doesn't work. I have seen that you can instead call the function > with a positive argument like so: > > (display-time-mode 1) > > But I don't understand why the first method doesn't work. I think the > problem is that I don't know how emacs goes from variables being set > to t/nil to actually drawing the screen, but I was hoping to avoid > digging that deep as I still am learning. Could someone please help > me to understand? Some minor modes are simple enough that all you need to do is set a variable to turn them on. But some are not, in which case the variable is merely an indicator of whether the mode is on or not. display-time-mode is one of the latter; see the third sentence of its doc string: ,----[ C-h v display-time-mode RET ] | display-time-mode is a variable defined in `time.el'. | Its value is nil | | | Documentation: | Non-nil if Display-Time mode is enabled. | See the command `display-time-mode' for a description of this minor-mode. | Setting this variable directly does not take effect; | either customize it (see the info node `Easy Customization') | or call the function `display-time-mode'. | | You can customize this variable. | | [back] `---- > Also - I've read quite a few posts in this group, and it seems like > most folks lean toward using customize as opposed to hand > editing .emacs. Am I making things harder on myself? Perhaps. But since I had used Emacs for about 15 years before custom came along, I prefer to stick with .emacs. -- Kevin Rodgers Denver, Colorado, USA