unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Commenting invisible text
@ 2004-09-30  9:26 Josef Urban
  2004-09-30 12:55 ` Stefan
  0 siblings, 1 reply; 8+ messages in thread
From: Josef Urban @ 2004-09-30  9:26 UTC (permalink / raw)



Hi,

running 'comment-region on a block containing some invisible lines does 
not comment the invisible lines. I get this behavior with Hide/Show and 
also with other kinds of invisible text. 

Should not this be fixed in newcomment.el? If it is a feature (why?), 
should not there be at least some customization?

Thanks,
Josef Urban

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

* Re: Commenting invisible text
  2004-09-30  9:26 Commenting invisible text Josef Urban
@ 2004-09-30 12:55 ` Stefan
  2004-09-30 13:50   ` Josef Urban
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan @ 2004-09-30 12:55 UTC (permalink / raw)
  Cc: emacs-devel

> running 'comment-region on a block containing some invisible lines does 
> not comment the invisible lines. I get this behavior with Hide/Show and 
> also with other kinds of invisible text. 

Works for me,


        Stefan

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

* Re: Commenting invisible text
  2004-09-30 12:55 ` Stefan
@ 2004-09-30 13:50   ` Josef Urban
  2004-09-30 14:56     ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Josef Urban @ 2004-09-30 13:50 UTC (permalink / raw)



> > running 'comment-region on a block containing some invisible lines does 
> > not comment the invisible lines. I get this behavior with Hide/Show and 
> > also with other kinds of invisible text. 
> 
> Works for me,

Which Emacs version do you use? I have: 
"GNU Emacs 21.3.1 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 
2004-08-03 on raven, modified by Debian",
but the bug was also reported on some earlier SuSE version.
Here is a test example:

(progn
  (find-file "foo.el") 
  (insert "a\nb\n\c\n") 
  (put-text-property (point-min) (point-max) 'invisible t)
  (comment-region (point-min) (point-max)))

the result is:
a
b
c;; 

if the fourth line is commented, it is:

;; a
;; b
;; c

Josef

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

* Re: Commenting invisible text
  2004-09-30 13:50   ` Josef Urban
@ 2004-09-30 14:56     ` Stefan Monnier
  2004-09-30 15:42       ` Josef Urban
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2004-09-30 14:56 UTC (permalink / raw)
  Cc: emacs-devel

>> > running 'comment-region on a block containing some invisible lines does 
>> > not comment the invisible lines. I get this behavior with Hide/Show and 
>> > also with other kinds of invisible text. 
>> 
>> Works for me,

> Which Emacs version do you use?

The version that I expect everyone on emacs-devel to use: Emacs-CVS.


        Stefan

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

* Re: Commenting invisible text
  2004-09-30 14:56     ` Stefan Monnier
@ 2004-09-30 15:42       ` Josef Urban
  2004-09-30 17:44         ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Josef Urban @ 2004-09-30 15:42 UTC (permalink / raw)



On Thu, 30 Sep 2004, Stefan Monnier wrote:

> >> > running 'comment-region on a block containing some invisible lines does 
> >> > not comment the invisible lines. I get this behavior with Hide/Show and 
> >> > also with other kinds of invisible text. 
> >> 
> >> Works for me,
> 
> > Which Emacs version do you use?
> 
> The version that I expect everyone on emacs-devel to use: Emacs-CVS.

Does not work for me either. Did you try the example?

Josef

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

* Re: Commenting invisible text
  2004-09-30 15:42       ` Josef Urban
@ 2004-09-30 17:44         ` Stefan Monnier
  2004-09-30 19:44           ` Josef Urban
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2004-09-30 17:44 UTC (permalink / raw)
  Cc: emacs-devel

> Does not work for me either. Did you try the example?

Which example?  I didn't see any example,


        Stefan

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

* Re: Commenting invisible text
  2004-09-30 17:44         ` Stefan Monnier
@ 2004-09-30 19:44           ` Josef Urban
  2004-09-30 19:57             ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Josef Urban @ 2004-09-30 19:44 UTC (permalink / raw)


On Thu, 30 Sep 2004, Stefan Monnier wrote:

> > Does not work for me either. Did you try the example?
> 
> Which example?  I didn't see any example,

It is in my today's e-mail to which you have replied :-).
(progn
  (find-file "foo.el")
  (insert "a\nb\n\c\n")
  (put-text-property (point-min) (point-max) 'invisible t)
  (comment-region (point-min) (point-max)))

I have now tried with the Emacs-CVS version also the original problem 
with Hide/Show, and it really works properly. This probably means that 
commenting invisible overlays already works, but not invisible text 
properties. Is it the intended behavior?

Josef

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

* Re: Commenting invisible text
  2004-09-30 19:44           ` Josef Urban
@ 2004-09-30 19:57             ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2004-09-30 19:57 UTC (permalink / raw)
  Cc: emacs-devel

>> > Does not work for me either. Did you try the example?
>> Which example?  I didn't see any example,

> It is in my today's e-mail to which you have replied :-).
> (progn
>   (find-file "foo.el")
>   (insert "a\nb\n\c\n")
>   (put-text-property (point-min) (point-max) 'invisible t)
>   (comment-region (point-min) (point-max)))

Sorry, I missed that part.  You use a non-ellipsis invisible property, so
it's a different behavior than what you get with outline-minor-mode or
hs-minor-mode.

> I have now tried with the Emacs-CVS version also the original problem 
> with Hide/Show, and it really works properly. This probably means that 
> commenting invisible overlays already works, but not invisible text 
> properties. Is it the intended behavior?

No, overlays and text-properties behave just the same in this respect.
The issue is whether the invisible text is really invisible or whether it's
replaced by an ellipsis (i.e. "...").  And yes, it's the intended behavior.


        Stefan

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

end of thread, other threads:[~2004-09-30 19:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-30  9:26 Commenting invisible text Josef Urban
2004-09-30 12:55 ` Stefan
2004-09-30 13:50   ` Josef Urban
2004-09-30 14:56     ` Stefan Monnier
2004-09-30 15:42       ` Josef Urban
2004-09-30 17:44         ` Stefan Monnier
2004-09-30 19:44           ` Josef Urban
2004-09-30 19:57             ` Stefan Monnier

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).