unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [BUG] Empty string as display property
@ 2005-05-13 15:36 Lars Hansen
  2005-05-13 16:09 ` Luc Teirlinck
  2005-05-16 22:15 ` Kim F. Storm
  0 siblings, 2 replies; 5+ messages in thread
From: Lars Hansen @ 2005-05-13 15:36 UTC (permalink / raw)


An empty string as display property has the advantage over the invisible
property that it can be made conditional. However, an empty string as
display property does not work. Try this:

(defun test ()
  (interactive)
  (select-window (display-buffer (get-buffer-create "*test*")))
  (erase-buffer)
  (insert "line 1\naaa"
          (propertize "bbb" 'display "")
          "ccc\nline 3"))

Maybe someone who knows the redisplay code would like to look at this bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] Empty string as display property
  2005-05-13 15:36 [BUG] Empty string as display property Lars Hansen
@ 2005-05-13 16:09 ` Luc Teirlinck
  2005-05-13 17:13   ` David Kastrup
  2005-05-13 17:22   ` Lars Hansen
  2005-05-16 22:15 ` Kim F. Storm
  1 sibling, 2 replies; 5+ messages in thread
From: Luc Teirlinck @ 2005-05-13 16:09 UTC (permalink / raw)
  Cc: emacs-devel

Lars Hansen wrote:

   An empty string as display property has the advantage over the invisible
   property that it can be made conditional.

That is not what the display property is for.  If you want to make
text invisible, use the invisibility property.  The display property
is already abused enough as is.   There are things like
buffer-invisibility-spec for conditional invisibility.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] Empty string as display property
  2005-05-13 16:09 ` Luc Teirlinck
@ 2005-05-13 17:13   ` David Kastrup
  2005-05-13 17:22   ` Lars Hansen
  1 sibling, 0 replies; 5+ messages in thread
From: David Kastrup @ 2005-05-13 17:13 UTC (permalink / raw)
  Cc: larsh, emacs-devel

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> Lars Hansen wrote:
>
>    An empty string as display property has the advantage over the invisible
>    property that it can be made conditional.
>
> That is not what the display property is for.  If you want to make
> text invisible, use the invisibility property.  The display property
> is already abused enough as is.

Whatever.  But this is not an additional use of the display property,
but merely a special case of existing functionality.  As such, it
should not fail, regardless whether or not other means to achieve
similar effects exist.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] Empty string as display property
  2005-05-13 16:09 ` Luc Teirlinck
  2005-05-13 17:13   ` David Kastrup
@ 2005-05-13 17:22   ` Lars Hansen
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Hansen @ 2005-05-13 17:22 UTC (permalink / raw)
  Cc: emacs-devel


>That is not what the display property is for.
>
You may argue so, but it is a bug anyway.
If empty strings are not allowed, it should be stated in the manual and
an error should be signaled. Now emacs just silently malfunctions.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] Empty string as display property
  2005-05-13 15:36 [BUG] Empty string as display property Lars Hansen
  2005-05-13 16:09 ` Luc Teirlinck
@ 2005-05-16 22:15 ` Kim F. Storm
  1 sibling, 0 replies; 5+ messages in thread
From: Kim F. Storm @ 2005-05-16 22:15 UTC (permalink / raw)
  Cc: emacs-devel

Lars Hansen <larsh@math.ku.dk> writes:

> An empty string as display property has the advantage over the invisible
> property that it can be made conditional. However, an empty string as
> display property does not work. Try this:
>
> (defun test ()
>   (interactive)
>   (select-window (display-buffer (get-buffer-create "*test*")))
>   (erase-buffer)
>   (insert "line 1\naaa"
>           (propertize "bbb" 'display "")
>           "ccc\nline 3"))
>
> Maybe someone who knows the redisplay code would like to look at this bug.

Thank you for the report.
I just installed a fix.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-05-16 22:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-13 15:36 [BUG] Empty string as display property Lars Hansen
2005-05-13 16:09 ` Luc Teirlinck
2005-05-13 17:13   ` David Kastrup
2005-05-13 17:22   ` Lars Hansen
2005-05-16 22:15 ` Kim F. Storm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).