From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Changing side margins in specific mode changes side margins for all buffers Date: Wed, 17 Jun 2015 02:58:44 +0200 Organization: Aioe.org NNTP Server Message-ID: <87pp4vdubf.fsf@debian.uxu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1434502524 16807 80.91.229.3 (17 Jun 2015 00:55:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Jun 2015 00:55:24 +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 Jun 17 02:55:24 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z51dS-0003qs-E6 for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Jun 2015 02:55:22 +0200 Original-Received: from localhost ([::1]:43505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z51dR-0006fq-Qk for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Jun 2015 20:55:21 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:A3ihk8HrN0Dxt5gExOboaNDcMQE= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:212711 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104995 Archived-At: Stefan Monnier writes: > (add-hook 'window-configuration-change-hook > (lambda () > (set-window-margins (car (get-buffer-window-list > (current-buffer) nil t)) > 29 29)) > 'make-it-local) > > where you see that you pass `make-it-local' as third > argument. And if you check `C-h f add-hook RET' > you'll see that the third arg is called APPEND, and > it's the *fourth* arg which is called LOCAL. So you > just need to add a nil as third argument. Aha, the HOOK is local, not the window-margins! Then what I said is incorrect. It won't do what I said (which is good). >> Works like a charm. Thank you very much! I found >> this code somewhere on stackoverflow.com. > > Could you try and find it again, so we can fix > it there? Wow, you are dedicated! Cred. Maybe we should all post our Elisp on stackoverflow just to have you correct it :) -- underground experts united http://user.it.uu.se/~embe8573