Re: [another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-23 Thread Helge Hafting

John McCabe-Dansted wrote:


John If LyX locked files which were open in a still running LyX
John process, that would have saved me some confusion.

Yes, but I am sure this can cause a lot of confusion too...
   



I am not sure why this would cause confusion. You could have a dialog
box warning that Another LyX window has this file open and offer
some of the following alternatives:

* Do not open.
 


fine


* Open read only.
 


fine


* Open anyway.
 


fine, assume the user sorts it out after being warned


* Attempt to kill other LyX window.
 


How?  Killing the process is no good, that process may have
several unsaved documents open.  And it might belong
to another user anyway.

Helge Hafting


Re: bug 2313: Save should be disabled for unchanged documents

2006-03-23 Thread John McCabe-Dansted
* Open anyway.
fine, assume the user sorts it out after being warned

Letting the user Open anyway after being warned still seems a lot
better than not warning the user at all. I thought that not letting
the user open the file rw may not be popular in certain quarters...
this was the only reason I could think of that  locking could be
accused of adding confusion.

* Attempt to kill other LyX window.
How?  Killing the process is no good, that process may have
several unsaved documents open.  And it might belong
to another user anyway.

I was thinking of firefox which has a habit of leaving stale processes
around, locking the ~/.firefox directory.  Probably not really useful
for LyX.

On 3/23/06, Helge Hafting [EMAIL PROTECTED] wrote:
 John McCabe-Dansted wrote:

 John If LyX locked files which were open in a still running LyX
 John process, that would have saved me some confusion.
 
 Yes, but I am sure this can cause a lot of confusion too...
 
 
 
 I am not sure why this would cause confusion. You could have a dialog
 box warning that Another LyX window has this file open and offer
 some of the following alternatives:
 
 * Do not open.
 
 
 fine

 * Open read only.
 
 
 fine

 * Open anyway.
 
 
 fine, assume the user sorts it out after being warned

 * Attempt to kill other LyX window.
 
 
 How?  Killing the process is no good, that process may have
 several unsaved documents open.  And it might belong
 to another user anyway.

 Helge Hafting



--
John C. McCabe-Dansted
Master's Student


Re: [another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-23 Thread Jean-Marc Lasgouttes
 Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

Jean-Marc Anyway, I have an additional patch for this bug. Anyone
Jean-Marc disagrees?

Applied.

JMarc


Re: [another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-23 Thread Lars Gullik Bjønnes
Helge Hafting [EMAIL PROTECTED] writes:

| John McCabe-Dansted wrote:
| 
| John If LyX locked files which were open in a still running LyX
| John process, that would have saved me some confusion.
| 
| Yes, but I am sure this can cause a lot of confusion too...
| 
| 
| I am not sure why this would cause confusion. You could have a dialog
| box warning that Another LyX window has this file open and offer
| some of the following alternatives:
| 
| * Do not open.
| 
| fine
| 
| * Open read only.
| 
| fine
| 
| * Open anyway.
| 
| fine, assume the user sorts it out after being warned

Please have a look at how emacs does this.
(I am in favor of the 'when in doubt do as emacs' camp.)

-- 
Lgb



Re: [another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-23 Thread Jean-Marc Lasgouttes
 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

Lars Please have a look at how emacs does this. (I am in favor of the
Lars 'when in doubt do as emacs' camp.)

It uses a ~/.emacs-places file which contains a list of files and
offsets.

JMarc


Re: [another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-23 Thread Helge Hafting

John McCabe-Dansted wrote:


John> If LyX locked files which were open in a still running LyX
John> process, that would have saved me some confusion.

Yes, but I am sure this can cause a lot of confusion too...
   



I am not sure why this would cause confusion. You could have a dialog
box warning that "Another LyX window has this file open" and offer
some of the following alternatives:

* Do not open.
 


fine


* Open read only.
 


fine


* Open anyway.
 


fine, assume the user sorts it out after being warned


* Attempt to kill other LyX window.
 


How?  Killing the process is no good, that process may have
several unsaved documents open.  And it might belong
to another user anyway.

Helge Hafting


Re: bug 2313: Save should be disabled for unchanged documents

2006-03-23 Thread John McCabe-Dansted
>* Open anyway.
>fine, assume the user sorts it out after being warned

Letting the user "Open anyway" after being warned still seems a lot
better than not warning the user at all. I thought that not letting
the user open the file rw may not be popular in certain quarters...
this was the only reason I could think of that  "locking" could be
accused of "adding confusion".

>* Attempt to kill other LyX window.
>How?  Killing the process is no good, that process may have
>several unsaved documents open.  And it might belong
>to another user anyway.

I was thinking of firefox which has a habit of leaving stale processes
around, locking the ~/.firefox directory.  Probably not really useful
for LyX.

On 3/23/06, Helge Hafting <[EMAIL PROTECTED]> wrote:
> John McCabe-Dansted wrote:
>
> >>John> If LyX locked files which were open in a still running LyX
> >>John> process, that would have saved me some confusion.
> >>
> >>Yes, but I am sure this can cause a lot of confusion too...
> >>
> >>
> >
> >I am not sure why this would cause confusion. You could have a dialog
> >box warning that "Another LyX window has this file open" and offer
> >some of the following alternatives:
> >
> >* Do not open.
> >
> >
> fine
>
> >* Open read only.
> >
> >
> fine
>
> >* Open anyway.
> >
> >
> fine, assume the user sorts it out after being warned
>
> >* Attempt to kill other LyX window.
> >
> >
> How?  Killing the process is no good, that process may have
> several unsaved documents open.  And it might belong
> to another user anyway.
>
> Helge Hafting
>


--
John C. McCabe-Dansted
Master's Student


Re: [another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-23 Thread Jean-Marc Lasgouttes
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

Jean-Marc> Anyway, I have an additional patch for this bug. Anyone
Jean-Marc> disagrees?

Applied.

JMarc


Re: [another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-23 Thread Lars Gullik Bjønnes
Helge Hafting <[EMAIL PROTECTED]> writes:

| John McCabe-Dansted wrote:
| 
| >>John> If LyX locked files which were open in a still running LyX
| >>John> process, that would have saved me some confusion.
| >>
| >>Yes, but I am sure this can cause a lot of confusion too...
| >>
| >
| >I am not sure why this would cause confusion. You could have a dialog
| >box warning that "Another LyX window has this file open" and offer
| >some of the following alternatives:
| >
| >* Do not open.
| >
| fine
| 
| >* Open read only.
| >
| fine
| 
| >* Open anyway.
| >
| fine, assume the user sorts it out after being warned

Please have a look at how emacs does this.
(I am in favor of the 'when in doubt do as emacs' camp.)

-- 
Lgb



Re: [another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-23 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:

Lars> Please have a look at how emacs does this. (I am in favor of the
Lars> 'when in doubt do as emacs' camp.)

It uses a ~/.emacs-places file which contains a list of files and
offsets.

JMarc


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-21 Thread Stephan Witt

Martin Vermeer wrote:

On Fri, 2006-03-17 at 10:27 +, Angus Leeming wrote:


Martin Vermeer [EMAIL PROTECTED] writes:


you should not be able to accidentally change that file's
date stamp (yes, that's the most hateful thing about re-saving
unchanged documents -- and no way within the known laws of physics to
revert it!)


   touch -t 200602291200 myfile.lyx

? Or is that a perpetual motion machine?

Angus



It might as well be if you don't remember what the time stamp was.

Better solution would be to have your LyX docs in a version control
system. I wonder how many people have.


We have it on our site. We are using networking CVS and readonly checkouts.
I have distributed locally a patched LyX with two changes:

1. checkOut (cvs edit) has a real implementation
2. checkIn (cvs commit) displays error messages in case of occurance

With these modifications we're nearly pleased with LyX+Version Control.
One issue is left open: you have to add a file to the repository manually
(via cmdline) because of LyX using RCS as default for registrer.

Regards,

Stephan
--


Re: [another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-21 Thread John McCabe-Dansted
 John If LyX locked files which were open in a still running LyX
 John process, that would have saved me some confusion.

 Yes, but I am sure this can cause a lot of confusion too...

I am not sure why this would cause confusion. You could have a dialog
box warning that Another LyX window has this file open and offer
some of the following alternatives:

* Do not open.
* Open read only.
* Open anyway.
* Attempt to kill other LyX window.

--
John C. McCabe-Dansted
Master's Student


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-21 Thread Andre Poenitz
On Tue, Mar 21, 2006 at 10:55:15AM +0100, Stephan Witt wrote:
 Better solution would be to have your LyX docs in a version control
 system. I wonder how many people have.
 
 We have it on our site. We are using networking CVS and readonly checkouts.
 I have distributed locally a patched LyX with two changes:
 
 1. checkOut (cvs edit) has a real implementation
 2. checkIn (cvs commit) displays error messages in case of occurance
 
 With these modifications we're nearly pleased with LyX+Version Control.
 One issue is left open: you have to add a file to the repository manually
 (via cmdline) because of LyX using RCS as default for registrer.

I wonder whether the version control stuff should really be handled
within LyX.

Andre'


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-21 Thread Stephan Witt

Martin Vermeer wrote:

On Fri, 2006-03-17 at 10:27 +, Angus Leeming wrote:


Martin Vermeer <[EMAIL PROTECTED]> writes:


you should not be able to accidentally change that file's
date stamp (yes, that's the most hateful thing about re-saving
"unchanged" documents -- and no way within the known laws of physics to
revert it!)


   touch -t 200602291200 myfile.lyx

? Or is that a perpetual motion machine?

Angus



It might as well be if you don't remember what the time stamp was.

Better solution would be to have your LyX docs in a version control
system. I wonder how many people have.


We have it on our site. We are using networking CVS and readonly checkouts.
I have distributed locally a patched LyX with two changes:

1. checkOut (cvs edit) has a real implementation
2. checkIn (cvs commit) displays error messages in case of occurance

With these modifications we're nearly pleased with LyX+Version Control.
One issue is left open: you have to add a file to the repository manually
(via cmdline) because of LyX using RCS as default for registrer.

Regards,

Stephan
--


Re: [another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-21 Thread John McCabe-Dansted
> John> If LyX locked files which were open in a still running LyX
> John> process, that would have saved me some confusion.
>
> Yes, but I am sure this can cause a lot of confusion too...

I am not sure why this would cause confusion. You could have a dialog
box warning that "Another LyX window has this file open" and offer
some of the following alternatives:

* Do not open.
* Open read only.
* Open anyway.
* Attempt to kill other LyX window.

--
John C. McCabe-Dansted
Master's Student


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-21 Thread Andre Poenitz
On Tue, Mar 21, 2006 at 10:55:15AM +0100, Stephan Witt wrote:
> >Better solution would be to have your LyX docs in a version control
> >system. I wonder how many people have.
> 
> We have it on our site. We are using networking CVS and readonly checkouts.
> I have distributed locally a patched LyX with two changes:
> 
> 1. checkOut (cvs edit) has a real implementation
> 2. checkIn (cvs commit) displays error messages in case of occurance
> 
> With these modifications we're nearly pleased with LyX+Version Control.
> One issue is left open: you have to add a file to the repository manually
> (via cmdline) because of LyX using RCS as default for registrer.

I wonder whether the version control stuff should really be handled
within LyX.

Andre'


[another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-20 Thread Jean-Marc Lasgouttes
 John == John McCabe-Dansted [EMAIL PROTECTED] writes:

 Sure, the extra trouble only ever occur for power users.
John Perhaps we could have a new minibuffer command save-unchanged
John which would save the document even if it is unchanged. Such
John power users could replace save with save-unchanged in their
John .bind files etc.

It is easiest to do an explicit change when needed.

John If LyX locked files which were open in a still running LyX
John process, that would have saved me some confusion.

Yes, but I am sure this can cause a lot of confusion too...

Anyway, I have an additional patch for this bug. Anyone disagrees?

JMarc

Index: src/ChangeLog
===
--- src/ChangeLog	(revision 13424)
+++ src/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2006-03-20  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
+
+	* lyxfunc.C (getStatus): always allow saving unnamed buffers (bug
+	2313 cont'd).
+
 2006-03-16  Jürgen Spitzmüller  [EMAIL PROTECTED]
 
 	* text.C (delete): adjust cursor after backspace in change tracking
Index: src/lyxfunc.C
===
--- src/lyxfunc.C	(revision 13424)
+++ src/lyxfunc.C	(working copy)
@@ -541,7 +541,8 @@ FuncStatus LyXFunc::getStatus(FuncReques
 	}
 
 	case LFUN_MENUWRITE: {
-		enable = !view()-buffer()-isClean();
+		enable = view()-buffer()-isUnnamed() 
+			|| !view()-buffer()-isClean();
 		break;
 	}
 


[another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-20 Thread Jean-Marc Lasgouttes
> "John" == John McCabe-Dansted <[EMAIL PROTECTED]> writes:

>> Sure, the "extra trouble" only ever occur for power users.
John> Perhaps we could have a new minibuffer command save-unchanged
John> which would save the document even if it is unchanged. Such
John> power users could replace "save" with "save-unchanged" in their
John> .bind files etc.

It is easiest to do an explicit change when needed.

John> If LyX locked files which were open in a still running LyX
John> process, that would have saved me some confusion.

Yes, but I am sure this can cause a lot of confusion too...

Anyway, I have an additional patch for this bug. Anyone disagrees?

JMarc

Index: src/ChangeLog
===
--- src/ChangeLog	(revision 13424)
+++ src/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2006-03-20  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* lyxfunc.C (getStatus): always allow saving unnamed buffers (bug
+	2313 cont'd).
+
 2006-03-16  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
 
 	* text.C (delete): adjust cursor after backspace in change tracking
Index: src/lyxfunc.C
===
--- src/lyxfunc.C	(revision 13424)
+++ src/lyxfunc.C	(working copy)
@@ -541,7 +541,8 @@ FuncStatus LyXFunc::getStatus(FuncReques
 	}
 
 	case LFUN_MENUWRITE: {
-		enable = !view()->buffer()->isClean();
+		enable = view()->buffer()->isUnnamed() 
+			|| !view()->buffer()->isClean();
 		break;
 	}
 


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Helge Hafting

Martin Vermeer wrote:


On Thu, Mar 16, 2006 at 02:59:31PM +0100, Jean-Marc Lasgouttes wrote:
 


Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
 


Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:
 


Lars Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: |
Lars This patch disables Save when document is not changed. This is
Lars going | in trunk and branch this afternoon if nobody complains.

Lars Why do we need to avoid a save when the document is not changed?
Lars Why is it wrong to just overwrite the existing one?

Jean-Marc The save icon becomes disabled when saving has been done.
Jean-Marc This is nicer for the user. Several other word processors
Jean-Marc do that (but not all).

Forgot to say that I already committed it. But it can be reversed, of
course :)
   



No, I think it is nice. Many word processors even claim that the doc
has changed when you didn't do anything... I hate that.


Indeed.  Few things are more annoying than openoffice
asking me to save a shared document I only opened for reading. :-(
Lets never ever go there, our logic works.


This patch makes
every save intentional, which is a Good Thing.
 


Lyx already indicates if the document is changed or not.
I may still need to _save_ an unchanged document, because
I know I modified the .lyx file through other means:
* I copied another file over it (most common)
* I  edited that .lyx file with another lyx or a text editor (rare)

Now if lyx also detect these other means - go ahead and disable save.
But if mismatch between memory and the lyx file can't be detected
100% reliably, then please don't force us to work around broken
disabling logic. 


Breaking the (Changed) notifier isn't so bad, as long as I can
save when I know that the lack of (Changed) is wrong.



There is the easiest of workarounds: do a small edit.
spacebackspace comes to mind.
 

Works, but don't want to.  Why force people? 
And there is one extra step - make sure you don't have a selection!


Helge Hafting


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Martin Vermeer
On Fri, 2006-03-17 at 10:29 +0100, Helge Hafting wrote:
 Martin Vermeer wrote:

...

  This patch makes
 every save intentional, which is a Good Thing.
   
 
 Lyx already indicates if the document is changed or not.
 I may still need to _save_ an unchanged document, because
 I know I modified the .lyx file through other means:
 * I copied another file over it (most common)
 * I  edited that .lyx file with another lyx or a text editor (rare)
 
 Now if lyx also detect these other means - go ahead and disable save.
 But if mismatch between memory and the lyx file can't be detected
 100% reliably, then please don't force us to work around broken
 disabling logic. 
 
 Breaking the (Changed) notifier isn't so bad, as long as I can
 save when I know that the lack of (Changed) is wrong.
 
 
 There is the easiest of workarounds: do a small edit.
 spacebackspace comes to mind.
   
 
 Works, but don't want to.  Why force people? 
 And there is one extra step - make sure you don't have a selection!

OK, next proposal: a touch menu entry ;-)

- Martin



signature.asc
Description: This is a digitally signed message part


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Martin Vermeer
On Fri, 2006-03-17 at 11:51 +0200, Martin Vermeer wrote:
 On Fri, 2006-03-17 at 10:29 +0100, Helge Hafting wrote:
  Martin Vermeer wrote:
 
 ...
 
   This patch makes
  every save intentional, which is a Good Thing.

  
  Lyx already indicates if the document is changed or not.
  I may still need to _save_ an unchanged document, because
  I know I modified the .lyx file through other means:
  * I copied another file over it (most common)
  * I  edited that .lyx file with another lyx or a text editor (rare)

These are not common situations for most users. Change means: this
document in memory has changed. Not: this document in memory is now
different from the stored version on disk. I disagree with you here.

  Now if lyx also detect these other means - go ahead and disable save.
  But if mismatch between memory and the lyx file can't be detected
  100% reliably, then please don't force us to work around broken
  disabling logic. 

See above. You expect the change flag to do a job it isn't meant to.

  Breaking the (Changed) notifier isn't so bad, as long as I can
  save when I know that the lack of (Changed) is wrong.

See above.
 
  There is the easiest of workarounds: do a small edit.
  spacebackspace comes to mind.

  
  Works, but don't want to.  Why force people? 

It isn't forcing, it's protecting. When writing, clicking 'save' every
now and then becomes second nature. Now when opening a file only for
inspection, you should not be able to accidentally change that file's
date stamp (yes, that's the most hateful thing about re-saving
unchanged documents -- and no way within the known laws of physics to
revert it!)

Again, blocking save (with an easy override in the form of a Touch
menu entry) is the Right Thing.

- Martin



signature.asc
Description: This is a digitally signed message part


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Angus Leeming
Martin Vermeer [EMAIL PROTECTED] writes:
 you should not be able to accidentally change that file's
 date stamp (yes, that's the most hateful thing about re-saving
 unchanged documents -- and no way within the known laws of physics to
 revert it!)

touch -t 200602291200 myfile.lyx

? Or is that a perpetual motion machine?

Angus



Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Martin Vermeer
On Fri, 2006-03-17 at 10:27 +, Angus Leeming wrote:
 Martin Vermeer [EMAIL PROTECTED] writes:
  you should not be able to accidentally change that file's
  date stamp (yes, that's the most hateful thing about re-saving
  unchanged documents -- and no way within the known laws of physics to
  revert it!)
 
 touch -t 200602291200 myfile.lyx
 
 ? Or is that a perpetual motion machine?
 
 Angus

It might as well be if you don't remember what the time stamp was.

Better solution would be to have your LyX docs in a version control
system. I wonder how many people have.

- Martin



signature.asc
Description: This is a digitally signed message part


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Georg Baum
Martin Vermeer wrote:

 Better solution would be to have your LyX docs in a version control
 system. I wonder how many people have.

Me. And it really helps.


Georg



Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Angus Leeming
Georg Baum [EMAIL PROTECTED] writes:

 
 Martin Vermeer wrote:
 
  Better solution would be to have your LyX docs in a version control
  system. I wonder how many people have.
 
 Me. And it really helps.

Me too. And I agree :)
A.



Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Jean-Marc Lasgouttes
 Helge == Helge Hafting [EMAIL PROTECTED] writes:

Helge Lyx already indicates if the document is changed or not. I may
Helge still need to _save_ an unchanged document, because I know I
Helge modified the .lyx file through other means: * I copied another
Helge file over it (most common) * I edited that .lyx file with
Helge another lyx or a text editor (rare)

If you _know_ it, it is OK to have to use a workaround to save.

JMarc


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Helge Hafting

Martin Vermeer wrote:


On Fri, 2006-03-17 at 11:51 +0200, Martin Vermeer wrote:
 


On Fri, 2006-03-17 at 10:29 +0100, Helge Hafting wrote:
   


Martin Vermeer wrote:
 


...

   


This patch makes
every save intentional, which is a Good Thing.


   


Lyx already indicates if the document is changed or not.
I may still need to _save_ an unchanged document, because
I know I modified the .lyx file through other means:
* I copied another file over it (most common)
* I  edited that .lyx file with another lyx or a text editor (rare)
 



These are not common situations for most users. Change means: this
document in memory has changed. Not: this document in memory is now
different from the stored version on disk. I disagree with you here.
 

I know that change means changed in memory. 

 


Now if lyx also detect these other means - go ahead and disable save.
But if mismatch between memory and the lyx file can't be detected
100% reliably, then please don't force us to work around broken
disabling logic. 
 



See above. You expect the change flag to do a job it isn't meant to.
 


No, I don't need the current change indicator to detect the
weird cases. I usually know when I mess around with a file
that way.  But then I might want to save the seemingly
unchanged file - without hassle.

 


Breaking the (Changed) notifier isn't so bad, as long as I can
save when I know that the lack of (Changed) is wrong.
 



See above.

 


There is the easiest of workarounds: do a small edit.
spacebackspace comes to mind.


   

Works, but don't want to.  Why force people? 
 



It isn't forcing, it's protecting. When writing, clicking 'save' every
now and then becomes second nature. Now when opening a file only for
inspection, you should not be able to accidentally change that file's
date stamp (yes, that's the most hateful thing about re-saving
unchanged documents -- and no way within the known laws of physics to
revert it!)
 


That argument isn't good.  I save now and then while writing,
not while inspecting.  Someone used to lyx won't save very often
anyway - crashes are few and far between, and even then the
emergency file saves the day. Only developers run a risky lyx.
You are trying to protect the user against
her/himself, almost an insult :-) , and adding extra trouble as well.
Sure, the extra trouble only ever occur for power users.
That is a corner case.  But I wouldn't say habitual saving accident
while just reading is a common case either. Or is this what everybody do?


Again, blocking save (with an easy override in the form of a Touch
menu entry) is the Right Thing.


A compromise is possible.  How about allowing the save button always,
but going the emacs way of responding with no changes to save
on the status line?

Then, if I get sufficiently irritated by this, I can write a patch
that checks the timestamp on the file, and does a real save
anyway if the unchanged file's timestamp doesn't match
the timestamp on disk.  For surely the disk
timestamp changes if the file is updated by means other than lyx.

This approach seems the best of both worlds - you get to
preserve your unchanged timestamps, and I have the option
for a nonintrusive fix for my special case.  Well, if I ever
become able to compile lyx again, that is. I still get
that weird namespace error.

Helge Hafting


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Helge Hafting

Jean-Marc Lasgouttes wrote:


Helge == Helge Hafting [EMAIL PROTECTED] writes:
   



Helge Lyx already indicates if the document is changed or not. I may
Helge still need to _save_ an unchanged document, because I know I
Helge modified the .lyx file through other means: * I copied another
Helge file over it (most common) * I edited that .lyx file with
Helge another lyx or a text editor (rare)

If you _know_ it, it is OK to have to use a workaround to save.
 


You have a point there about me, but how about dummy users
that opens several instances of lyx and then stumble onto
opening the same file in two of them?

Helge Hafting


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread John McCabe-Dansted
 Sure, the extra trouble only ever occur for power users.

Perhaps we could have a new minibuffer command save-unchanged which
would save the document even if it is unchanged. Such power users
could replace save with save-unchanged in their .bind files etc.

 If you _know_ it, it is OK to have to use a workaround to save.
 
 
 You have a point there about me, but how about dummy users
 that opens several instances of lyx and then stumble onto
 opening the same file in two of them?

If LyX locked files which were open in a still running LyX process,
that would have saved me some confusion.

--
John C. McCabe-Dansted
Master's Student


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Helge Hafting

Martin Vermeer wrote:


On Thu, Mar 16, 2006 at 02:59:31PM +0100, Jean-Marc Lasgouttes wrote:
 


"Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
 


"Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
 


Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: |
Lars> This patch disables Save when document is not changed. This is
Lars> going | in trunk and branch this afternoon if nobody complains.

Lars> Why do we need to avoid a save when the document is not changed?
Lars> Why is it wrong to just overwrite the existing one?

Jean-Marc> The save icon becomes disabled when saving has been done.
Jean-Marc> This is nicer for the user. Several other word processors
Jean-Marc> do that (but not all).

Forgot to say that I already committed it. But it can be reversed, of
course :)
   



No, I think it is nice. Many word processors even claim that the doc
has changed when you didn't do anything... I hate that.


Indeed.  Few things are more annoying than openoffice
asking me to save a shared document I only opened for reading. :-(
Lets never ever go there, our logic works.


This patch makes
every save intentional, which is a Good Thing.
 


Lyx already indicates if the document is changed or not.
I may still need to _save_ an unchanged document, because
I know I modified the .lyx file through other means:
* I copied another file over it (most common)
* I  edited that .lyx file with another lyx or a text editor (rare)

Now if lyx also detect these other means - go ahead and disable save.
But if mismatch between memory and the lyx file can't be detected
100% reliably, then please don't force us to work around broken
disabling logic. 


Breaking the (Changed) notifier isn't so bad, as long as I can
save when I know that the lack of (Changed) is wrong.



There is the easiest of workarounds: do a small edit.
 comes to mind.
 

Works, but don't want to.  Why force people? 
And there is one extra step - make sure you don't have a selection!


Helge Hafting


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Martin Vermeer
On Fri, 2006-03-17 at 10:29 +0100, Helge Hafting wrote:
> Martin Vermeer wrote:

...

> > This patch makes
> >every save intentional, which is a Good Thing.
> >  
> >
> Lyx already indicates if the document is changed or not.
> I may still need to _save_ an unchanged document, because
> I know I modified the .lyx file through other means:
> * I copied another file over it (most common)
> * I  edited that .lyx file with another lyx or a text editor (rare)
> 
> Now if lyx also detect these other means - go ahead and disable save.
> But if mismatch between memory and the lyx file can't be detected
> 100% reliably, then please don't force us to work around broken
> disabling logic. 
> 
> Breaking the (Changed) notifier isn't so bad, as long as I can
> save when I know that the lack of (Changed) is wrong.
> 
> 
> >There is the easiest of workarounds: do a small edit.
> > comes to mind.
> >  
> >
> Works, but don't want to.  Why force people? 
> And there is one extra step - make sure you don't have a selection!

OK, next proposal: a "touch" menu entry ;-)

- Martin



signature.asc
Description: This is a digitally signed message part


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Martin Vermeer
On Fri, 2006-03-17 at 11:51 +0200, Martin Vermeer wrote:
> On Fri, 2006-03-17 at 10:29 +0100, Helge Hafting wrote:
> > Martin Vermeer wrote:
> 
> ...
> 
> > > This patch makes
> > >every save intentional, which is a Good Thing.
> > >  
> > >
> > Lyx already indicates if the document is changed or not.
> > I may still need to _save_ an unchanged document, because
> > I know I modified the .lyx file through other means:
> > * I copied another file over it (most common)
> > * I  edited that .lyx file with another lyx or a text editor (rare)

These are not common situations for most users. "Change" means: this
document in memory has changed. Not: this document in memory is now
different from the stored version on disk. I disagree with you here.

> > Now if lyx also detect these other means - go ahead and disable save.
> > But if mismatch between memory and the lyx file can't be detected
> > 100% reliably, then please don't force us to work around broken
> > disabling logic. 

See above. You expect the change flag to do a job it isn't meant to.

> > Breaking the (Changed) notifier isn't so bad, as long as I can
> > save when I know that the lack of (Changed) is wrong.

See above.
 
> > >There is the easiest of workarounds: do a small edit.
> > > comes to mind.
> > >  
> > >
> > Works, but don't want to.  Why force people? 

It isn't forcing, it's protecting. When writing, clicking 'save' every
now and then becomes second nature. Now when opening a file only for
inspection, you should not be able to accidentally change that file's
date stamp (yes, that's the most hateful thing about re-saving
"unchanged" documents -- and no way within the known laws of physics to
revert it!)

Again, blocking save (with an easy override in the form of a "Touch"
menu entry) is the Right Thing.

- Martin



signature.asc
Description: This is a digitally signed message part


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Angus Leeming
Martin Vermeer <[EMAIL PROTECTED]> writes:
> you should not be able to accidentally change that file's
> date stamp (yes, that's the most hateful thing about re-saving
> "unchanged" documents -- and no way within the known laws of physics to
> revert it!)

touch -t 200602291200 myfile.lyx

? Or is that a perpetual motion machine?

Angus



Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Martin Vermeer
On Fri, 2006-03-17 at 10:27 +, Angus Leeming wrote:
> Martin Vermeer <[EMAIL PROTECTED]> writes:
> > you should not be able to accidentally change that file's
> > date stamp (yes, that's the most hateful thing about re-saving
> > "unchanged" documents -- and no way within the known laws of physics to
> > revert it!)
> 
> touch -t 200602291200 myfile.lyx
> 
> ? Or is that a perpetual motion machine?
> 
> Angus

It might as well be if you don't remember what the time stamp was.

Better solution would be to have your LyX docs in a version control
system. I wonder how many people have.

- Martin



signature.asc
Description: This is a digitally signed message part


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Georg Baum
Martin Vermeer wrote:

> Better solution would be to have your LyX docs in a version control
> system. I wonder how many people have.

Me. And it really helps.


Georg



Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Angus Leeming
Georg Baum <[EMAIL PROTECTED]> writes:

> 
> Martin Vermeer wrote:
> 
> > Better solution would be to have your LyX docs in a version control
> > system. I wonder how many people have.
> 
> Me. And it really helps.

Me too. And I agree :)
A.



Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Jean-Marc Lasgouttes
> "Helge" == Helge Hafting <[EMAIL PROTECTED]> writes:

Helge> Lyx already indicates if the document is changed or not. I may
Helge> still need to _save_ an unchanged document, because I know I
Helge> modified the .lyx file through other means: * I copied another
Helge> file over it (most common) * I edited that .lyx file with
Helge> another lyx or a text editor (rare)

If you _know_ it, it is OK to have to use a workaround to save.

JMarc


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Helge Hafting

Martin Vermeer wrote:


On Fri, 2006-03-17 at 11:51 +0200, Martin Vermeer wrote:
 


On Fri, 2006-03-17 at 10:29 +0100, Helge Hafting wrote:
   


Martin Vermeer wrote:
 


...

   


This patch makes
every save intentional, which is a Good Thing.


   


Lyx already indicates if the document is changed or not.
I may still need to _save_ an unchanged document, because
I know I modified the .lyx file through other means:
* I copied another file over it (most common)
* I  edited that .lyx file with another lyx or a text editor (rare)
 



These are not common situations for most users. "Change" means: this
document in memory has changed. Not: this document in memory is now
different from the stored version on disk. I disagree with you here.
 

I know that change means "changed in memory". 

 


Now if lyx also detect these other means - go ahead and disable save.
But if mismatch between memory and the lyx file can't be detected
100% reliably, then please don't force us to work around broken
disabling logic. 
 



See above. You expect the change flag to do a job it isn't meant to.
 


No, I don't need the current change indicator to detect the
weird cases. I usually know when I mess around with a file
that way.  But then I might want to save the seemingly
unchanged file - without hassle.

 


Breaking the (Changed) notifier isn't so bad, as long as I can
save when I know that the lack of (Changed) is wrong.
 



See above.

 


There is the easiest of workarounds: do a small edit.
 comes to mind.


   

Works, but don't want to.  Why force people? 
 



It isn't forcing, it's protecting. When writing, clicking 'save' every
now and then becomes second nature. Now when opening a file only for
inspection, you should not be able to accidentally change that file's
date stamp (yes, that's the most hateful thing about re-saving
"unchanged" documents -- and no way within the known laws of physics to
revert it!)
 


That argument isn't good.  I save now and then while writing,
not while inspecting.  Someone used to lyx won't save very often
anyway - crashes are few and far between, and even then the
emergency file saves the day. Only developers run a "risky" lyx.
You are trying to protect the user against
her/himself, almost an insult :-) , and adding extra trouble as well.
Sure, the "extra trouble" only ever occur for power users.
That is a corner case.  But I wouldn't say "habitual saving accident
while just reading" is a common case either. Or is this what everybody do?


Again, blocking save (with an easy override in the form of a "Touch"
menu entry) is the Right Thing.


A compromise is possible.  How about allowing the save button always,
but going the emacs way of responding with "no changes to save"
on the status line?

Then, if I get sufficiently irritated by this, I can write a patch
that checks the timestamp on the file, and does a real save
anyway if the "unchanged" file's timestamp doesn't match
the timestamp on disk.  For surely the disk
timestamp changes if the file is updated by means other than lyx.

This approach seems the best of both worlds - you get to
preserve your unchanged timestamps, and I have the option
for a nonintrusive fix for my special case.  Well, if I ever
become able to compile lyx again, that is. I still get
that weird namespace error.

Helge Hafting


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread Helge Hafting

Jean-Marc Lasgouttes wrote:


"Helge" == Helge Hafting <[EMAIL PROTECTED]> writes:
   



Helge> Lyx already indicates if the document is changed or not. I may
Helge> still need to _save_ an unchanged document, because I know I
Helge> modified the .lyx file through other means: * I copied another
Helge> file over it (most common) * I edited that .lyx file with
Helge> another lyx or a text editor (rare)

If you _know_ it, it is OK to have to use a workaround to save.
 


You have a point there about me, but how about "dummy users"
that opens several instances of lyx and then stumble onto
opening the same file in two of them?

Helge Hafting


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-17 Thread John McCabe-Dansted
> Sure, the "extra trouble" only ever occur for power users.

Perhaps we could have a new minibuffer command save-unchanged which
would save the document even if it is unchanged. Such power users
could replace "save" with "save-unchanged" in their .bind files etc.

> >If you _know_ it, it is OK to have to use a workaround to save.
> >
> >
> You have a point there about me, but how about "dummy users"
> that opens several instances of lyx and then stumble onto
> opening the same file in two of them?

If LyX locked files which were open in a still running LyX process,
that would have saved me some confusion.

--
John C. McCabe-Dansted
Master's Student


[PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Jean-Marc Lasgouttes

This patch disables Save when document is not changed. This is going
in trunk and branch this afternoon if nobody complains.

JMarc

Index: src/ChangeLog
===
--- src/ChangeLog	(revision 13376)
+++ src/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2006-03-16  John Spray  [EMAIL PROTECTED]
+
+	* lyxfunc.C (getStatus): disable LFUN_MENUWRITE when document is
+	clean (bug 2313)
+
 2006-03-10  Jürgen Spitzmüller  [EMAIL PROTECTED]
 
 	* bufferparams.C (writeLaTeX): define \labelitemi with \def. Fixes LaTeX 
Index: src/lyxfunc.C
===
--- src/lyxfunc.C	(revision 13376)
+++ src/lyxfunc.C	(working copy)
@@ -540,6 +540,11 @@
 		break;
 	}
 
+	case LFUN_MENUWRITE: {
+		enable = !view()-buffer()-isClean();
+		break;
+	}
+
 	// this one is difficult to get right. As a half-baked
 	// solution, we consider only the first action of the sequence
 	case LFUN_SEQUENCE: {
@@ -559,7 +564,6 @@
 	case LFUN_CANCEL:
 	case LFUN_META_FAKE:
 	case LFUN_CLOSEBUFFER:
-	case LFUN_MENUWRITE:
 	case LFUN_WRITEAS:
 	case LFUN_UPDATE:
 	case LFUN_PREVIEW:


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

| This patch disables Save when document is not changed. This is going
| in trunk and branch this afternoon if nobody complains.

Why do we need to avoid a save when the document is not changed? Why
is it wrong to just overwrite the existing one?

-- 
Lgb



Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Jean-Marc Lasgouttes
 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

Lars Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: |
Lars This patch disables Save when document is not changed. This is
Lars going | in trunk and branch this afternoon if nobody complains.

Lars Why do we need to avoid a save when the document is not changed?
Lars Why is it wrong to just overwrite the existing one?

The save icon becomes disabled when saving has been done. This is
nicer for the user. Several other word processors do that (but not
all).

JMarc


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Jean-Marc Lasgouttes
 Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:
Lars Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: |
Lars This patch disables Save when document is not changed. This is
Lars going | in trunk and branch this afternoon if nobody complains.

Lars Why do we need to avoid a save when the document is not changed?
Lars Why is it wrong to just overwrite the existing one?

Jean-Marc The save icon becomes disabled when saving has been done.
Jean-Marc This is nicer for the user. Several other word processors
Jean-Marc do that (but not all).

Forgot to say that I already committed it. But it can be reversed, of
course :)

JMarc


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Martin Vermeer
On Thu, Mar 16, 2006 at 02:59:31PM +0100, Jean-Marc Lasgouttes wrote:
  Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
 
  Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:
 Lars Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: |
 Lars This patch disables Save when document is not changed. This is
 Lars going | in trunk and branch this afternoon if nobody complains.
 
 Lars Why do we need to avoid a save when the document is not changed?
 Lars Why is it wrong to just overwrite the existing one?
 
 Jean-Marc The save icon becomes disabled when saving has been done.
 Jean-Marc This is nicer for the user. Several other word processors
 Jean-Marc do that (but not all).
 
 Forgot to say that I already committed it. But it can be reversed, of
 course :)

No, I think it is nice. Many word processors even claim that the doc
has changed when you didn't do anything... I hate that. This patch makes
every save intentional, which is a Good Thing.

There is the easiest of workarounds: do a small edit.
spacebackspace comes to mind.

- Martin



pgpcS26UCzQ9L.pgp
Description: PGP signature


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Jean-Marc Lasgouttes
 Martin == Martin Vermeer [EMAIL PROTECTED] writes:

Martin No, I think it is nice. Many word processors even claim that
Martin the doc has changed when you didn't do anything... I hate
Martin that. This patch makes every save intentional, which is a Good
Martin Thing.

Something I want to do (not difficult but I need some free time) is to
make sure that after undo the state of the document is reset to clean
if it is. For this we need to add a 'clean' bool to the undo and redo
stack.

JMarc


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Lars Gullik Bjønnes
Martin Vermeer [EMAIL PROTECTED] writes:

| There is the easiest of workarounds: do a small edit.
| spacebackspace comes to mind.

And super annoying...
(but I guess we are used to it...)

-- 
Lgb



[PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Jean-Marc Lasgouttes

This patch disables Save when document is not changed. This is going
in trunk and branch this afternoon if nobody complains.

JMarc

Index: src/ChangeLog
===
--- src/ChangeLog	(revision 13376)
+++ src/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2006-03-16  John Spray  <[EMAIL PROTECTED]>
+
+	* lyxfunc.C (getStatus): disable LFUN_MENUWRITE when document is
+	clean (bug 2313)
+
 2006-03-10  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
 
 	* bufferparams.C (writeLaTeX): define \labelitemi with \def. Fixes LaTeX 
Index: src/lyxfunc.C
===
--- src/lyxfunc.C	(revision 13376)
+++ src/lyxfunc.C	(working copy)
@@ -540,6 +540,11 @@
 		break;
 	}
 
+	case LFUN_MENUWRITE: {
+		enable = !view()->buffer()->isClean();
+		break;
+	}
+
 	// this one is difficult to get right. As a half-baked
 	// solution, we consider only the first action of the sequence
 	case LFUN_SEQUENCE: {
@@ -559,7 +564,6 @@
 	case LFUN_CANCEL:
 	case LFUN_META_FAKE:
 	case LFUN_CLOSEBUFFER:
-	case LFUN_MENUWRITE:
 	case LFUN_WRITEAS:
 	case LFUN_UPDATE:
 	case LFUN_PREVIEW:


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| This patch disables Save when document is not changed. This is going
| in trunk and branch this afternoon if nobody complains.

Why do we need to avoid a save when the document is not changed? Why
is it wrong to just overwrite the existing one?

-- 
Lgb



Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:

Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: |
Lars> This patch disables Save when document is not changed. This is
Lars> going | in trunk and branch this afternoon if nobody complains.

Lars> Why do we need to avoid a save when the document is not changed?
Lars> Why is it wrong to just overwrite the existing one?

The save icon becomes disabled when saving has been done. This is
nicer for the user. Several other word processors do that (but not
all).

JMarc


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Jean-Marc Lasgouttes
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: |
Lars> This patch disables Save when document is not changed. This is
Lars> going | in trunk and branch this afternoon if nobody complains.

Lars> Why do we need to avoid a save when the document is not changed?
Lars> Why is it wrong to just overwrite the existing one?

Jean-Marc> The save icon becomes disabled when saving has been done.
Jean-Marc> This is nicer for the user. Several other word processors
Jean-Marc> do that (but not all).

Forgot to say that I already committed it. But it can be reversed, of
course :)

JMarc


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Martin Vermeer
On Thu, Mar 16, 2006 at 02:59:31PM +0100, Jean-Marc Lasgouttes wrote:
> > "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
> 
> > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: |
> Lars> This patch disables Save when document is not changed. This is
> Lars> going | in trunk and branch this afternoon if nobody complains.
> 
> Lars> Why do we need to avoid a save when the document is not changed?
> Lars> Why is it wrong to just overwrite the existing one?
> 
> Jean-Marc> The save icon becomes disabled when saving has been done.
> Jean-Marc> This is nicer for the user. Several other word processors
> Jean-Marc> do that (but not all).
> 
> Forgot to say that I already committed it. But it can be reversed, of
> course :)

No, I think it is nice. Many word processors even claim that the doc
has changed when you didn't do anything... I hate that. This patch makes
every save intentional, which is a Good Thing.

There is the easiest of workarounds: do a small edit.
 comes to mind.

- Martin



pgpcS26UCzQ9L.pgp
Description: PGP signature


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:

Martin> No, I think it is nice. Many word processors even claim that
Martin> the doc has changed when you didn't do anything... I hate
Martin> that. This patch makes every save intentional, which is a Good
Martin> Thing.

Something I want to do (not difficult but I need some free time) is to
make sure that after undo the state of the document is reset to clean
if it is. For this we need to add a 'clean' bool to the undo and redo
stack.

JMarc


Re: [PATCH] bug 2313: Save should be disabled for unchanged documents

2006-03-16 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes:

| There is the easiest of workarounds: do a small edit.
|  comes to mind.

And super annoying...
(but I guess we are used to it...)

-- 
Lgb