Re: Looking at the "reload-settings" command

2022-06-08 Thread Félix
What I intend to change in my next Leo PR for this precise issue is 
two-folds: 

1- prevent saving untitled changed documents, to remove surprise of being 
presented with a sudden 'save as' dialog. (while saving all other changed 
files as before, requiring no input from the user)

2- modify the doc string from  "*Reload settings for the selected outline, 
saving it if necessary."*  to something more like: "*Reload settings for 
the selected outline, saving any modified files first."* 

Félix



On Wednesday, June 8, 2022 at 4:48:44 PM UTC-4 tbp1...@gmail.com wrote:

> " Thomas seems to think that *not* saving settings files is less 
> surprising, but I have some doubts."  No,  I think that settings files 
> *should* be saved.  Not other files, though.  I suppose the risk is that 
> you changed a setting in some other file and forgot to save it.  Then the 
> new local setting won't take effect after reloading settings, which would 
> be a surprise.
>
> But wait, I've been assuming that settings could be reloaded from 
> in-memory outlines. But that's not the case, is it?  They only get re-read 
> as the outline gets opened.  In that case, I should cancel what I said: all 
> files except an unnamed one should get saved first after all.   Or the 
> local outline settings should get re-read from the outline as it is in 
> memory, but that's probably too big a change.
>
> On Wednesday, June 8, 2022 at 2:53:42 PM UTC-4 Edward K. Ream wrote:
>
>> On Wed, Jun 8, 2022 at 12:51 PM jkn  wrote:
>>
>>> "reload settings" from where? From "settings file(s) from disk", or from 
>>> "settings file(s) on disk, perhaps overridden by any held in memory"?
>>>
>>
>> From disk, except for per-installation and per-machine settings as 
>> described here .  
>> The per-installation and per-machine settings aren't going to change, and 
>> in any event they are last-ditch defaults.
>>  
>>
>>> I would think the former.
>>>
>>
>> Yes. The point of reload-settings is to recompute all settings as 
>> necessary. There is no concept of (settings held in memory).
>>
>>> Perhaps saving files is a safety measure; I can see the command changing 
>>> things underneath you in a way that might be ... surprising
>>>
>>
>> Big sigh. What, exactly, is the least surprising option? Thomas seems to 
>> think that *not* saving settings files is less surprising, but I have 
>> some doubts.
>>
>> I agree that reload-settings should (at most) save only 
>> myLeoSettings.leo, leoSettings.leo and the presently-selected (active) .leo 
>> file.
>>
>> I'm starting to think the simplest thing that could possibly work would 
>> be to have reload-settings save *no* files. That gives the user the most 
>> "control". But dash it all, one could plausibly argue that it would be less 
>> surprising to "honor" the settings in all open files.
>>
>> Imo, this is mostly a tempest in a teapot. I don't care much either way.
>>
>> Edward
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8ceb505d-6f02-4403-9aa3-70cdb22a422cn%40googlegroups.com.


Re: Looking at the "reload-settings" command

2022-06-08 Thread tbp1...@gmail.com
" Thomas seems to think that *not* saving settings files is less 
surprising, but I have some doubts."  No,  I think that settings files 
*should* be saved.  Not other files, though.  I suppose the risk is that 
you changed a setting in some other file and forgot to save it.  Then the 
new local setting won't take effect after reloading settings, which would 
be a surprise.

But wait, I've been assuming that settings could be reloaded from in-memory 
outlines. But that's not the case, is it?  They only get re-read as the 
outline gets opened.  In that case, I should cancel what I said: all files 
except an unnamed one should get saved first after all.   Or the local 
outline settings should get re-read from the outline as it is in memory, 
but that's probably too big a change.

On Wednesday, June 8, 2022 at 2:53:42 PM UTC-4 Edward K. Ream wrote:

> On Wed, Jun 8, 2022 at 12:51 PM jkn  wrote:
>
>> "reload settings" from where? From "settings file(s) from disk", or from 
>> "settings file(s) on disk, perhaps overridden by any held in memory"?
>>
>
> From disk, except for per-installation and per-machine settings as 
> described here .  
> The per-installation and per-machine settings aren't going to change, and 
> in any event they are last-ditch defaults.
>  
>
>> I would think the former.
>>
>
> Yes. The point of reload-settings is to recompute all settings as 
> necessary. There is no concept of (settings held in memory).
>
>> Perhaps saving files is a safety measure; I can see the command changing 
>> things underneath you in a way that might be ... surprising
>>
>
> Big sigh. What, exactly, is the least surprising option? Thomas seems to 
> think that *not* saving settings files is less surprising, but I have 
> some doubts.
>
> I agree that reload-settings should (at most) save only myLeoSettings.leo, 
> leoSettings.leo and the presently-selected (active) .leo file.
>
> I'm starting to think the simplest thing that could possibly work would be 
> to have reload-settings save *no* files. That gives the user the most 
> "control". But dash it all, one could plausibly argue that it would be less 
> surprising to "honor" the settings in all open files.
>
> Imo, this is mostly a tempest in a teapot. I don't care much either way.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/7763a88d-c5a6-4235-b878-d15ff113e5dbn%40googlegroups.com.


Re: Looking at the "reload-settings" command

2022-06-08 Thread Edward K. Ream
On Wed, Jun 8, 2022 at 12:51 PM jkn  wrote:

> "reload settings" from where? From "settings file(s) from disk", or from
> "settings file(s) on disk, perhaps overridden by any held in memory"?
>

>From disk, except for per-installation and per-machine settings as
described here .  The
per-installation and per-machine settings aren't going to change, and in
any event they are last-ditch defaults.


> I would think the former.
>

Yes. The point of reload-settings is to recompute all settings as
necessary. There is no concept of (settings held in memory).

> Perhaps saving files is a safety measure; I can see the command changing
> things underneath you in a way that might be ... surprising
>

Big sigh. What, exactly, is the least surprising option? Thomas seems to
think that *not* saving settings files is less surprising, but I have some
doubts.

I agree that reload-settings should (at most) save only myLeoSettings.leo,
leoSettings.leo and the presently-selected (active) .leo file.

I'm starting to think the simplest thing that could possibly work would be
to have reload-settings save *no* files. That gives the user the most
"control". But dash it all, one could plausibly argue that it would be less
surprising to "honor" the settings in all open files.

Imo, this is mostly a tempest in a teapot. I don't care much either way.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0YS7wYrc%3DM0i%3D2sjpC_sbz%2BJqjpQ2S6S%2ByxoJbnqhHFw%40mail.gmail.com.


Re: Looking at the "reload-settings" command

2022-06-08 Thread jkn
"reload settings" from where? From "settings file(s) from disk", or from 
"settings file(s) on disk, perhaps overridden by any held in memory"?

I would think the former. Perhaps saving files is a safety measure; I can 
see the command changing things underneath you in a way that might be ... 
surprising

J^n


On Wednesday, June 8, 2022 at 5:16:29 PM UTC+1 Edward K. Ream wrote:

> On Wed, Jun 8, 2022 at 10:39 AM tbp1...@gmail.com  
> wrote:
>
>> Since reloading settings will not close Leo, I don't see any reason to 
>> save any files except for unsaved settings files.  Sometimes people leave 
>> unsaved files on purpose - in case they want to scrap their changes by 
>> closing an outline without saving - so let's not surprise those folks by 
>> saving their file unexpectedly.
>>
>
> Does not saving a file on purpose include settings files?  Perhaps the 
> reload-settings command shouldn't save *any *files!
>
> Comments, please.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f76cb8aa-a3a1-4e43-b629-9e14e7c0c882n%40googlegroups.com.


Re: Looking at the "reload-settings" command

2022-06-08 Thread Edward K. Ream
On Wed, Jun 8, 2022 at 10:39 AM tbp1...@gmail.com 
wrote:

> Since reloading settings will not close Leo, I don't see any reason to
> save any files except for unsaved settings files.  Sometimes people leave
> unsaved files on purpose - in case they want to scrap their changes by
> closing an outline without saving - so let's not surprise those folks by
> saving their file unexpectedly.
>

Does not saving a file on purpose include settings files?  Perhaps the
reload-settings command shouldn't save *any *files!

Comments, please.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS26F9aAr7Pbiruo%3D7wWnOBYsQo%2BohRWAcOTMdo3e4XHtg%40mail.gmail.com.


Re: Looking at the "reload-settings" command

2022-06-08 Thread tbp1...@gmail.com
Since reloading settings will not close Leo, I don't see any reason to save 
any files except for unsaved settings files.  Sometimes people leave 
unsaved files on purpose - in case they want to scrap their changes by 
closing an outline without saving - so let's not surprise those folks by 
saving their file unexpectedly.

On Wednesday, June 8, 2022 at 9:11:37 AM UTC-4 Edward K. Ream wrote:

> On Tue, Jun 7, 2022 at 10:58 PM Félix  wrote:
>
>> I'm looking at the reload-settings command, which has the following doc 
>> string : "*Reload settings for the selected outline, saving it if 
>> necessary."* and i'm wondering why it tries to save all unsaved opened 
>> documents instead of only the currently active one?
>
>
> The unsaved outlines could include myLeoSettings.leo (and even 
> leoSettings.leo), but yes, I suppose the code could just save those two (if 
> changed) and the currently active outline.
>
> I agree that trying to save an unnamed outline is unnecessary.
>
> Please feel free to submit a PR :-)
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/c4363571-9ba1-4df8-9c75-b04a33752f61n%40googlegroups.com.


Re: Looking at the "reload-settings" command

2022-06-08 Thread Edward K. Ream
On Tue, Jun 7, 2022 at 10:58 PM Félix  wrote:

> I'm looking at the reload-settings command, which has the following doc
> string : "*Reload settings for the selected outline, saving it if
> necessary."* and i'm wondering why it tries to save all unsaved opened
> documents instead of only the currently active one?


The unsaved outlines could include myLeoSettings.leo (and even
leoSettings.leo), but yes, I suppose the code could just save those two (if
changed) and the currently active outline.

I agree that trying to save an unnamed outline is unnecessary.

Please feel free to submit a PR :-)

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS2FzWEtDALT5PFxdBcNXD6OkUCQ1nbq1VujemMarZJvFQ%40mail.gmail.com.