jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: new version of recent.sl


On 11.04.05, Dave Kuhlman wrote:
> On Thu, Apr 07, 2005 at 03:10:36PM +0200, G. Milde wrote:
> > I finished a new version of the "Recent Files" mode recent.sl.
> > 
> > Besides a code cleanup and restructuring it provides a synchronization of
> > the recent files list among several jed sessions. 
... 
> When I set Recent_Files_Synchronize_Cache to 1 (in my .jedrc) and
> then from the command line, I type "jed" with no file-name
> arguments, I get the following error message:
> 
>     "Error encountered while executing restore_session"
... 
> 
> I believe that problem has something to do with the following
> lines near the bottom of recent.sl:
> 
>     !if (Recent_Files_Synchronize_Cache)
>       recent_files_cache = load_cache();
> 
> I commented out the "if" statement so that "load_cache()" is
> always called, and now it seems to be working.  I'm guessing,
> however, that this is not the correct fix.

Thanks for the bugreport. The fix is correct, as it doesnot break anything.

The following patch saves one filereading in the case
 Recent_Files_Synchronize_Cache == 1 and Resore_Last_Session == 0

Besides this, it deletes the .jedrecent file when clearing the cache.

Günter


--- recent-3.2pre.sl	2005-04-12 14:05:36.000000000 +0200
+++ recent.sl	2005-04-12 14:13:37.000000000 +0200
@@ -450,6 +450,8 @@
 static define clear_cache()
 {
    recent_files_cache = "";
+   if (Recent_Files_Synchronize_Cache)
+     () = delete_file(recent_cachefile_name[Recent_Use_Local_Cache]);
 }
 
 
@@ -516,10 +518,9 @@
 % ---------------------------------------------
 
 % Load the filerecords list
-!if (Recent_Files_Synchronize_Cache)
+if (Restore_Last_Session or not(Recent_Files_Synchronize_Cache))
   recent_files_cache = load_cache();
 
-
 % Hooks
 
 % update the cache_file when loading and saving a buffer



-- 
G.Milde web.de

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]