From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: linum.el: problem (bug ?) fix and improvement Date: Thu, 12 May 2011 16:43:55 -0300 Message-ID: References: <83d3jnhm2r.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1305229450 9272 80.91.229.12 (12 May 2011 19:44:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 May 2011 19:44:10 +0000 (UTC) Cc: t_tuneyosi@hotmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 12 21:44:05 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QKbno-0001D1-N0 for ged-emacs-devel@m.gmane.org; Thu, 12 May 2011 21:44:04 +0200 Original-Received: from localhost ([::1]:38829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKbno-0001Jx-AK for ged-emacs-devel@m.gmane.org; Thu, 12 May 2011 15:44:04 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKbnl-0001Jf-BL for emacs-devel@gnu.org; Thu, 12 May 2011 15:44:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKbnk-0004uS-9P for emacs-devel@gnu.org; Thu, 12 May 2011 15:44:01 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:58216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKbnk-0004uO-5W for emacs-devel@gnu.org; Thu, 12 May 2011 15:44:00 -0400 Original-Received: from [190.195.81.133] (port=58492 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QKbnj-0008Dl-Jp; Thu, 12 May 2011 15:43:59 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 01FD866152; Thu, 12 May 2011 16:43:55 -0300 (ART) In-Reply-To: <83d3jnhm2r.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 12 May 2011 20:21:00 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:139336 Archived-At: >> What we'd like here is for the redisplay to ignore the margin property >> placed on invisible text. > Are you sure? Only part of a line could be invisible, in which case > it won't be easy to explain why we drop the before-string on the > floor. I would be uneasy to make such radical changes on behalf of a > single use case. Good point, but that's easy to fix: put the overlay over the whole line of text rather than one the empty string at its beginning. >> This boils down to making Emacs ignore >> `before-string' properties placed at the beginning of invisible text. >> I don't think it's always right to ignore them, tho. > There's explicit code to do it the way we do now: > /* If there are before-strings at the start of invisible > text, and the text is invisible because of a text > property, arrange to show before-strings because 20.x did > it that way. (If the text is invisible because of an > overlay property instead of a text property, this is > already handled in the overlay code.) */ > if (NILP (overlay) > && get_overlay_strings (it, it->stop_charpos)) > { > handled = HANDLED_RECOMPUTE_PROPS; it-> stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p; > } > Just undoing this would be regression from Emacs 20.x. I know. That's why I mention that maybe we should pay attention to the stickiness so as to allow the Elisp code to choose which behavior is desired. Stefan