From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen 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 20:30:49 GMT Organization: Sonera Customer Message-ID: <873agmfssm.fsf@iki.fi> References: <1cd84fa4-dc11-4457-bee9-b7b77f589fe1@s9g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229546602 8010 80.91.229.12 (17 Dec 2008 20:43:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2008 20:43:22 +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 Dec 17 21:44:27 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 1LD3Fj-0003Wh-FI for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2008 21:44:19 +0100 Original-Received: from localhost ([127.0.0.1]:39791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LD3EX-0007KW-E5 for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2008 15:43:05 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.erje.net!feeder2.news.saunalahti.fi!feeder1.news.saunalahti.fi!nntp.inet.fi!central1.inet.fi!inet.fi!read4.inet.fi.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:LRC1Sw3dLwvlKm7JRyP35J7AkQM= Original-Lines: 20 Original-NNTP-Posting-Host: 80.220.180.181 Original-X-Complaints-To: abuse@inet.fi Original-X-Trace: read4.inet.fi 1229545849 80.220.180.181 (Wed, 17 Dec 2008 22:30:49 EET) Original-NNTP-Posting-Date: Wed, 17 Dec 2008 22:30:49 EET Original-Xref: news.stanford.edu gnu.emacs.help:165418 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:60749 Archived-At: seberino@spawar.navy.mil (2008-12-17 12:16 -0800) wrote: > 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. > Thanks, M-x set-variable You can also evaluate any code with M-: so this also works: M-: (setq variable ...) And you can enter the code to any buffer (*scratch* buffer, for example), then put the point after the closing parent of the code part you want to evaluate and press C-x C-e (eval-last-sexp). For more info: C-h r m Variables RET