From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31067: 27.0.50; After-string hidden by subsequent invisible text Date: Thu, 05 Apr 2018 12:49:20 +0300 Message-ID: <8360562db3.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1522921691 29874 195.159.176.226 (5 Apr 2018 09:48:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Apr 2018 09:48:11 +0000 (UTC) Cc: 31067@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 05 11:48:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f41V0-0007fx-Ua for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Apr 2018 11:48:07 +0200 Original-Received: from localhost ([::1]:44374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f41X6-0005fg-50 for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Apr 2018 05:50:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f41Wv-0005f4-W1 for bug-gnu-emacs@gnu.org; Thu, 05 Apr 2018 05:50:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f41Ws-0003rf-SU for bug-gnu-emacs@gnu.org; Thu, 05 Apr 2018 05:50:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59250) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f41Ws-0003rb-N6 for bug-gnu-emacs@gnu.org; Thu, 05 Apr 2018 05:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f41Ws-00045S-D8 for bug-gnu-emacs@gnu.org; Thu, 05 Apr 2018 05:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Apr 2018 09:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31067 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31067-submit@debbugs.gnu.org id=B31067.152292175915658 (code B ref 31067); Thu, 05 Apr 2018 09:50:02 +0000 Original-Received: (at 31067) by debbugs.gnu.org; 5 Apr 2018 09:49:19 +0000 Original-Received: from localhost ([127.0.0.1]:38914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f41WB-00044U-2Y for submit@debbugs.gnu.org; Thu, 05 Apr 2018 05:49:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f41W8-00044G-Qv for 31067@debbugs.gnu.org; Thu, 05 Apr 2018 05:49:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f41W0-0003Eb-GZ for 31067@debbugs.gnu.org; Thu, 05 Apr 2018 05:49:11 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f41W0-0003EM-DJ; Thu, 05 Apr 2018 05:49:08 -0400 Original-Received: from [176.228.60.248] (port=2809 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f41Vy-0007dR-Vk; Thu, 05 Apr 2018 05:49:07 -0400 In-reply-to: (message from Stefan Monnier on Wed, 04 Apr 2018 22:28:59 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:144916 Archived-At: > From: Stefan Monnier > Date: Wed, 04 Apr 2018 22:28:59 -0400 > > (defun foo () > (interactive) > (with-current-buffer "*scratch*" > (add-to-invisibility-spec '(foo . t)) > (let ((beg (point))) > (insert "text") > (let ((ol1 (make-overlay beg (point)))) > (overlay-put ol1 'after-string "!after!") > (overlay-put ol1 'evaporate t))) > (let ((beg (point))) > (insert "\nhidden") > (let ((ol1 (make-overlay beg (point)))) > (overlay-put ol1 'invisible 'foo) > (overlay-put ol1 'evaporate t))))) > > and then try it with `M-x foo`. > The result for me is to display "text...", whereas I would have expected > "text!after!...". > > I.e. the after-string which I placed over "text" gets hidden by > `invisible` property of the overlay placed on the immediately following > "\nhidden". > > I know these kinds of interactions are pretty delicate and often > somewhat arbitrary (several behaviors are valid and we just have to pick > one), but I think in this case it is clearly an error. Would you expect the after-string to be shown in the variant below? (defun foo () (interactive) (with-current-buffer "*scratch*" (add-to-invisibility-spec '(foo . t)) (let ((beg (point)) end) (insert "hidden") (setq end (point)) (insert "text") (let ((ol1 (make-overlay beg end))) (overlay-put ol1 'after-string "!after!") (overlay-put ol1 'evaporate t)) (let ((ol2 (make-overlay (1+ beg) (point)))) (overlay-put ol2 'invisible 'foo) (overlay-put ol2 'evaporate t))))) IOW, the question is what should happen when the end-point of the overlay with after-string is in invisible text?