From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#14170: 24.3; linum won't create all overlays after a folding Date: Mon, 15 Apr 2013 19:00:46 -0400 Message-ID: References: <834nfbap2x.fsf@gnu.org> <83vc7p7i4g.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1366066912 30846 80.91.229.3 (15 Apr 2013 23:01:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Apr 2013 23:01:52 +0000 (UTC) Cc: 14170@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 16 01:01:56 2013 Return-path: Envelope-to: geb-bug-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 1URsPL-0004ez-4i for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Apr 2013 01:01:55 +0200 Original-Received: from localhost ([::1]:51239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URsPK-0000p8-IY for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Apr 2013 19:01:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URsPG-0000ok-A8 for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2013 19:01:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URsPE-00074V-Mw for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2013 19:01:50 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URsPE-00074P-Iy for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2013 19:01:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1URsTK-0006Vm-7u for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2013 19:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Apr 2013 23:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14170-submit@debbugs.gnu.org id=B14170.136606710424909 (code B ref 14170); Mon, 15 Apr 2013 23:06:02 +0000 Original-Received: (at 14170) by debbugs.gnu.org; 15 Apr 2013 23:05:04 +0000 Original-Received: from localhost ([127.0.0.1]:53142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1URsSN-0006Th-IK for submit@debbugs.gnu.org; Mon, 15 Apr 2013 19:05:03 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:49083) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1URsSL-0006TI-CG for 14170@debbugs.gnu.org; Mon, 15 Apr 2013 19:05:01 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r3FN0ksb004699; Mon, 15 Apr 2013 19:00:46 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 8D238B4178; Mon, 15 Apr 2013 19:00:46 -0400 (EDT) In-Reply-To: <83vc7p7i4g.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Apr 2013 09:15:27 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4550=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4550> : streams <941800> : uri <1394995> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73440 Archived-At: > +(defvar margin-side nil) I suspect you wanted to use nlinum--margin-side instead, right? > (defun nlinum--setup-window () > - (set-window-margins nil (if nlinum-mode nlinum--width) > - (cdr (window-margins)))) > + (cond ((eq bidi-paragraph-direction 'left-to-right) > + (set-window-margins nil (if nlinum-mode nlinum--width) > + (cdr (window-margins))) > + (setq-local margin-side 'left)) > + ((eq bidi-paragraph-direction 'right-to-left) > + (set-window-margins nil (car (window-margins)) > + (if nlinum-mode nlinum--width)) > + (setq-local margin-side 'right)) > + (t > + (set-window-margins nil > + (if nlinum-mode nlinum--width) > + (if nlinum-mode nlinum--width)) > + (setq-local margin-side nil)))) Hmm... since the default value of bidi-paragraph-direction is nil, that means that this will change the default behavior and put a margin in each side. Maybe we should decide nlinum--margin-side "lazily" based on the buffer's content, so if bidi-paragraph-direction is nil we only set a margin on the sides where we do display line numbers. Stefan