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 #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Werner LEMBERG <wl <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: bug in add-text-properties
Date: Wed, 27 May 2009 07:26:38 +0200 (CEST)
[Message part 1 (text/plain, inline)]
[emacs CVS build 2009-05-13]


Steps to repeat the bug:

  0. Start `emacs -Q'.

  1. Load attached file `emacs-bug.txt' with `C-x C-f'.

  2. Load attached file `emacs-bug.el' with `load-file'.

  3. Say `M-x make-first-line-invisible'.

The first line properly disappears, however, the first character in
the now visible part of the buffer (the letter `a') makes problems: It
incorrectly refers to the character at buffer position 1 (the digit
`1').  In particular, `C-u C-x =' for letter `a' shows

---

        character: 1 (49, #o61, #x31)
preferred charset: ascii (ASCII (ISO646 IRV))
       code point: 0x31
           syntax: w 	which means: word
         category: .:Base, a:ASCII, l:Latin, r:Roman
      buffer code: #x31
        file code: #x31 (encoded by coding system undecided-unix)
          display: by this font (glyph code)
    xft:-unknown-DejaVu Sans Mono-normal-normal-normal-*-21-*-*-*-m-0-iso10646-1 (#x14)

Character code properties: customize what to show
  name: DIGIT ONE
  general-category: Nd (Number, Decimal Digit)

There are text properties here:
  intangible           t
  invisible            t

---

A side effect is that `C-a' no longer moves to the beginning of the
line.


    Werner
[emacs-bug.txt (text/plain, inline)]
12345
abcde
[emacs-bug.el (text/plain, inline)]
(defun make-first-line-invisible ()
  (interactive)
  (goto-char (point-min))
  (setq start (line-beginning-position))
  (setq end (1+ (line-end-position))) ; handle \n
  (add-text-properties start
		       end
		       '(invisible t
			 intangible t)))

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.