GNU bug report logs - #3400
Let C-x = show info about visible and invisible text near point

Previous Next

Package: emacs;

Reported by: Werner LEMBERG <wl <at> gnu.org>

Date: Wed, 27 May 2009 09:00:04 UTC

Severity: wishlist

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #30 received at 3400 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Werner LEMBERG <wl <at> gnu.org>
To: monnier <at> IRO.UMontreal.CA
Cc: 3400 <at> debbugs.gnu.org, rudalics <at> gmx.at
Subject: Re: bug#3400: bug in add-text-properties
Date: Thu, 28 May 2009 23:48:33 +0200 (CEST)
>> Hmm.  If I have
> 
>>    12345
>>    ABCDE
> 
>> and I make `12345' + the newline after the `5' invisible and
>> intangible, I see
> 
>>   ABCDE
> 
>> in the buffer.  If the blinking cursor stays on the `A', and you
>> press `C-x =', do you *really* expect to see the properties of
>> character `1' instead of `A'?  This is completely counterintuitive
>> IMHO.
> 
> If you hit `b', the `b' will be inserted right before "12345", and it
> will not be invisible.

So what?  With `C-x =' I see `A' and get the data of `1', this is what
I consider a bug.  Actually, there is no way to retrieve information
from `A' at all.

> BTW, why are you using `intangible'?

I've just copied some code -- I haven't checked whether I can omit it.


BTW, the problem is not restricted to the beginning of the buffer.
With this input

  12345
  ABCDE
  abcde

and this lisp code

  (defun make-second-line-invisible ()
    (interactive)
    (goto-line 2)
    (setq start (line-beginning-position))
    (setq end (1+ (line-end-position))) ; handle \n
    (add-text-properties start
			 end
			 '(invisible t
			   intangible t)))

there is the same problem: After calling the function you get

  12345
  abcde

and `C-x =' (positioned on the `a') reports the info of the now
invisible character `A'.  Similarly, C-a only moves to character `b'.


    Werner



This bug report was last modified 3 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.