From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chetan Newsgroups: gmane.emacs.help Subject: Re: How change value of any variable at run time? (not just in.emacs w/ setq!) Date: Wed, 17 Dec 2008 18:46:22 -0800 Organization: Noname Inc. Message-ID: <81ocza8akh.fsf@myhost.sbcglobal.net> References: <1cd84fa4-dc11-4457-bee9-b7b77f589fe1@s9g2000prg.googlegroups.com> <873agmfssm.fsf@iki.fi> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229571653 13564 80.91.229.12 (18 Dec 2008 03:40:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Dec 2008 03:40:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 18 04:41:56 2008 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 1LD9lr-00079k-Qr for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Dec 2008 04:41:56 +0100 Original-Received: from localhost ([127.0.0.1]:56080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LD9kf-0003Zn-MB for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2008 22:40:41 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!flph200.ffdc.sbc.com!prodigy.net!flph199.ffdc.sbc.com!prodigy.com!flpi107.ffdc.sbc.com!flpi146.ffdc.sbc.com.POSTED!8e1d8614!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Emacs Gnus Cancel-Lock: sha1:JQox7Es4H7fjFXIqLjqoqiiHrN4= Original-Lines: 22 Original-NNTP-Posting-Host: 75.37.23.14 Original-X-Complaints-To: abuse@prodigy.net Original-X-Trace: flpi146.ffdc.sbc.com 1229568116 ST000 75.37.23.14 (Wed, 17 Dec 2008 21:41:56 EST) Original-NNTP-Posting-Date: Wed, 17 Dec 2008 21:41:56 EST X-UserInfo1: [[PAPDCA[S@SSVPXJJMF_W@BFJT@QDDMEPWXODMMHXMTWA]EPMTC@AWZWDXZXQ[K\FFSKCVM@F_N_DOBWVWG__LG@VVOIPLIGX\\BU_B@\P\PFX\B[APHTWAHDCKJF^NHD[YJAZMCY_CWG[SX\Y]^KC\HSZRWSWKGAY_PC[BQ[BXAS\F\\@DMTLFZFUE@\VL Original-Xref: news.stanford.edu gnu.emacs.help:165435 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:60766 Archived-At: "Drew Adams" writes: >> > How change value of any variable at run time? (not just in .emacs) >> > I can use setq in .emacs but I don't know about run time. >> >> M-x set-variable > > No. `set-variable' is only for user options. > > You can use `set-any-variable', from simple+.el to set any variable. > http://www.emacswiki.org/emacs/simple%2b.el > >> You can also evaluate any code with M-: so this also works: >> >> M-: (setq variable ...) > > Yes. > > See also `setq-default'. I just create a text in a buffer, current buffer if it is buffer local variable or in scratch buffer (setq variable ...) C-x C-e