From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Nicolas P. Rougier (inria)" Newsgroups: gmane.emacs.devel Subject: Question on set-window-margins Date: Tue, 02 Jan 2024 18:58:51 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39376"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.8; emacs 29.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 02 19:15:14 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rKjII-000A10-Sg for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jan 2024 19:15:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKjHb-0001F6-2t; Tue, 02 Jan 2024 13:14:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKjHZ-0001Ed-BA for emacs-devel@gnu.org; Tue, 02 Jan 2024 13:14:29 -0500 Original-Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKjHW-0001GJ-Rh for emacs-devel@gnu.org; Tue, 02 Jan 2024 13:14:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=hUHyroAVCESqDyDfFMX7p0ZwuBYQ5DZ/+RI8hQqzJKE=; b=u/UJuRSO1YeYPjjU9SrDwi91vd/3lp8WaWgE8mZVrv+4JNuiuq0oiubN 2jSHi87REGQbyGuZr8h0Bf0WfC9TMah4mL0aeYeI1BG7mGBIB4QDUIdR9 ZlQwkRGsDSQ7nX6TOES41cQxaq0hiSQjUabrj9Wq8d+M4u4K0cZIIW3Pu Y=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=nicolas.rougier@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.04,325,1695679200"; d="scan'208";a="75667021" Original-Received: from 91-160-114-139.subs.proxad.net (HELO M-E7-NPR.local) ([91.160.114.139]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2024 19:14:23 +0100 Received-SPF: pass client-ip=192.134.164.104; envelope-from=nicolas.rougier@inria.fr; helo=mail3-relais-sop.national.inria.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314464 Archived-At: When I set margins on a window using 'set-window-margins', it=20 works as expected until I switched to another buffer and margins=20 are then reset to 0 on both sides. If I switch back to the=20 original buffer, margins stay at 0. Does that mean that margins=20 are not "attached" to the window nor to the buffer ? The name of the function suggest it is attached to window (even=20 though nothing is really specified in the documentation) but I=20 wonder if the 'set-window-margins' is actually meant to be=20 transient ? To keep margins attached to a buffer, I'm using the=20 'window-state-change-hook' and a buffer local margin definition=20 but maybe I missed a point. Nicolas --=20 Nicolas P. Rougier =E2=80=94=E2=80=94 www.labri.fr/perso/nrougier Institute of Neurodegenerative Diseases, Bordeaux