unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* fill-paragrapch set the buffer to changed when there is none
@ 2006-07-04 22:58 Lennart Borgman
  2006-07-05 11:25 ` Mathias Dahl
  2006-07-05 17:01 ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: Lennart Borgman @ 2006-07-04 22:58 UTC (permalink / raw


If you do fill-paragraph on a paragraph that is already filled in an 
Elisp buffer there is an undo entry added and the buffer is set to 
modified. Is that correct?

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

* Re: fill-paragrapch set the buffer to changed when there is none
  2006-07-04 22:58 fill-paragrapch set the buffer to changed when there is none Lennart Borgman
@ 2006-07-05 11:25 ` Mathias Dahl
  2006-07-05 17:01 ` Richard Stallman
  1 sibling, 0 replies; 7+ messages in thread
From: Mathias Dahl @ 2006-07-05 11:25 UTC (permalink / raw
  Cc: Emacs Devel

> If you do fill-paragraph on a paragraph that is already filled in an
> Elisp buffer there is an undo entry added and the buffer is set to
> modified. Is that correct?

I don't know if it is correct or not, but I have been annoyed by this
now and then.

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

* Re: fill-paragrapch set the buffer to changed when there is none
  2006-07-04 22:58 fill-paragrapch set the buffer to changed when there is none Lennart Borgman
  2006-07-05 11:25 ` Mathias Dahl
@ 2006-07-05 17:01 ` Richard Stallman
  2006-07-05 22:47   ` Lennart Borgman
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Stallman @ 2006-07-05 17:01 UTC (permalink / raw
  Cc: emacs-devel

    If you do fill-paragraph on a paragraph that is already filled in an 
    Elisp buffer there is an undo entry added and the buffer is set to 
    modified. Is that correct?

It would be better to avoid modifying the buffer.  This has not been
implemented because it isn't trivial to do.

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

* Re: fill-paragrapch set the buffer to changed when there is none
  2006-07-05 17:01 ` Richard Stallman
@ 2006-07-05 22:47   ` Lennart Borgman
  2006-07-05 22:59     ` Paul Pogonyshev
  2006-07-07  4:14     ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: Lennart Borgman @ 2006-07-05 22:47 UTC (permalink / raw
  Cc: emacs-devel

Richard Stallman wrote:
>     If you do fill-paragraph on a paragraph that is already filled in an 
>     Elisp buffer there is an undo entry added and the buffer is set to 
>     modified. Is that correct?
>
> It would be better to avoid modifying the buffer.  This has not been
> implemented because it isn't trivial to do.
>   
Would it be possible to just set the modified flag correctly? Can the 
undo list be truncated?

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

* Re: fill-paragrapch set the buffer to changed when there is none
  2006-07-05 22:59     ` Paul Pogonyshev
@ 2006-07-05 22:54       ` Lennart Borgman
  0 siblings, 0 replies; 7+ messages in thread
From: Lennart Borgman @ 2006-07-05 22:54 UTC (permalink / raw
  Cc: rms, emacs-devel

Paul Pogonyshev wrote:
> Lennart Borgman wrote:
>   
>> Richard Stallman wrote:
>>     
>>>     If you do fill-paragraph on a paragraph that is already filled in an 
>>>     Elisp buffer there is an undo entry added and the buffer is set to 
>>>     modified. Is that correct?
>>>
>>> It would be better to avoid modifying the buffer.  This has not been
>>> implemented because it isn't trivial to do.
>>>   
>>>       
>> Would it be possible to just set the modified flag correctly? Can the 
>> undo list be truncated?
>>     
>
> Yes (at least the first part), but it is not easy to detect when a buffer
> is not modified.  If you can tell you are not modifying the buffer, you
> can as well not call `insert' and friends at all.
>
> Paul
>   
Is it not enough just to compare the contents of the filled region 
before and after filling?

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

* Re: fill-paragrapch set the buffer to changed when there is none
  2006-07-05 22:47   ` Lennart Borgman
@ 2006-07-05 22:59     ` Paul Pogonyshev
  2006-07-05 22:54       ` Lennart Borgman
  2006-07-07  4:14     ` Richard Stallman
  1 sibling, 1 reply; 7+ messages in thread
From: Paul Pogonyshev @ 2006-07-05 22:59 UTC (permalink / raw
  Cc: Lennart Borgman, rms

Lennart Borgman wrote:
> Richard Stallman wrote:
> >     If you do fill-paragraph on a paragraph that is already filled in an 
> >     Elisp buffer there is an undo entry added and the buffer is set to 
> >     modified. Is that correct?
> >
> > It would be better to avoid modifying the buffer.  This has not been
> > implemented because it isn't trivial to do.
> >   
> Would it be possible to just set the modified flag correctly? Can the 
> undo list be truncated?

Yes (at least the first part), but it is not easy to detect when a buffer
is not modified.  If you can tell you are not modifying the buffer, you
can as well not call `insert' and friends at all.

Paul

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

* Re: fill-paragrapch set the buffer to changed when there is none
  2006-07-05 22:47   ` Lennart Borgman
  2006-07-05 22:59     ` Paul Pogonyshev
@ 2006-07-07  4:14     ` Richard Stallman
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2006-07-07  4:14 UTC (permalink / raw
  Cc: emacs-devel

    Would it be possible to just set the modified flag correctly? Can the 
    undo list be truncated?

It might work to fix up the data that way, if it can determine that
the text isn't really changed.  Determining that may not be trivial,
though.

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

end of thread, other threads:[~2006-07-07  4:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-04 22:58 fill-paragrapch set the buffer to changed when there is none Lennart Borgman
2006-07-05 11:25 ` Mathias Dahl
2006-07-05 17:01 ` Richard Stallman
2006-07-05 22:47   ` Lennart Borgman
2006-07-05 22:59     ` Paul Pogonyshev
2006-07-05 22:54       ` Lennart Borgman
2006-07-07  4:14     ` Richard Stallman

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