From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: How to use display text property with after-string? Date: Fri, 21 Oct 2016 08:59:47 +0200 Message-ID: <87twc6dw64.fsf@fastmail.fm> References: <87funqtegs.fsf@mbork.pl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: blaine.gmane.org 1477060871 22416 195.159.176.226 (21 Oct 2016 14:41:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 21 Oct 2016 14:41:11 +0000 (UTC) User-Agent: mu4e 0.9.17; emacs 25.1.2 Cc: Help Gnu Emacs mailing list To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 21 16:40:59 2016 Return-path: Envelope-to: geh-help-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 1bxazx-0002OP-7j for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Oct 2016 16:40:41 +0200 Original-Received: from localhost ([::1]:32790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxazz-00022E-CZ for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Oct 2016 10:40:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxTo4-0000iO-1u for help-gnu-emacs@gnu.org; Fri, 21 Oct 2016 02:59:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxTo1-0007KW-0I for help-gnu-emacs@gnu.org; Fri, 21 Oct 2016 02:59:56 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:37879) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxTo0-0007JH-Ry for help-gnu-emacs@gnu.org; Fri, 21 Oct 2016 02:59:52 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id A038C20930; Fri, 21 Oct 2016 02:59:49 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 21 Oct 2016 02:59:49 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=N1KBl idV5wF3pCsnUozbOUF9px4=; b=c1Ao8k4C/sFbwJd10m3QVomn/3J82xGNszcYz 3Y+09+dMI2NPvuXlNXh+dEwC2lTd3AyolUSxEmYpycvYxit7ECmaMd+noFWGRc48 38bslGIcjjOSCOkWX1xJ04EFPhdqO91xufkSjxQyACcZB/yBzqw2UnVWNQszLC0M WA5hAQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=N1KBlidV5wF3pCsnUozbOUF9px4=; b=pR5La GwllqXGvYbbUmhnjN7niW4PExr08/0y48XtqNkPbJEzoc1GJ7GpRbN337JULok4T WR6jDnzDDUVW9O2vF05qDM/D4Z5uxH2uVaqdgWMLiesCfuTnW76jtRKoLd7epHW7 6tjwenud6RsVmVRhfd+j/tcGP3/ni9uz2ZcD+0= X-Sasl-enc: qw+J1K+zWjSeM4KwgspyJCxGNErOHqj25GeWRLL5oULi 1477033189 Original-Received: from IdeaPad.messagingengine.com (x4d0ac05f.dyn.telefonica.de [77.10.192.95]) by mail.messagingengine.com (Postfix) with ESMTPA id E1689F2C38; Fri, 21 Oct 2016 02:59:48 -0400 (EDT) In-reply-to: <87funqtegs.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.25 X-Mailman-Approved-At: Fri, 21 Oct 2016 10:39:20 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:111583 Archived-At: On Fri, Oct 21 2016, Marcin Borkowski wrote: > Hi all, > > I want to set the "display" text property so that some text is > displayed > after the buffer part I'm setting the property to. However, I > can't do > it. Consider an Elisp buffer with these contents: > > --8<---------------cut > here---------------start------------->8--- > ;; this is a comment > > (put-text-property 14 21 'display '(after-string " which is > cool!")) > --8<---------------cut > here---------------end--------------->8--- > > After C-x C-e with point at the end, I see this: > > --8<---------------cut > here---------------start------------->8--- > ;; this is a comment > > (put-text-property 14 21 'display '(after-string " which is > cool!")) > --8<---------------cut > here---------------end--------------->8--- > > but I expected this: > > --8<---------------cut > here---------------start------------->8--- > ;; this is a commentcomment > > (put-text-property 14 21 'display '(after-string " which is > cool!")) > --8<---------------cut > here---------------end--------------->8--- > I'm getting this (Emacs 25.1.2): ,---- | ;; this is a comment | | (put-text-property 14 21 'display '(after-string " which is cool!")) `---- But looknig through the Elisp manual, it seems that `after-string' is an overlay property, not a text property, so what you're after probably isn't supposed to work. -- Joost Kremers Life has its moments