Something is missing in Far Manager? You have a great idea that should be heard? Write here.
Shmuel
Posts: 6840 Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 530 times
Post
by Shmuel » Thu 08 Aug, 2013 11:59
Latest post of the previous page:
2useven10 wrote: What about new event or flag "RunBeforeFARExit" ?
I would rather fix the existing ExitFARW, calling it when all Plugins API is available.
Shmuel
HaRT
Moderator
Posts: 10866 Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times
Post
by HaRT » Thu 08 Aug, 2013 12:06
2useven10 wrote: What about new event or flag "RunBeforeFARExit" ?
A new pre-exit event (or a flag to an existing one) would be useful, with an ability to postpone/cancel the exit in order to complete some pending operations. Within handlers of that event, all of FAR API should work as usual.
HaRT
DrKnS
Posts: 6114 Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times
Post
by DrKnS » Thu 08 Aug, 2013 12:18
2useven10 wrote: What about new event or flag "RunBeforeFARExit" ?
Better make ExtFAR run earlier, I doubt it breaks anything.
DrKnS
2useven10
Posts: 5232 Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 315 times
Post
by 2useven10 » Thu 08 Aug, 2013 13:13
So if ExitFAR fixed, something
Event {
description = "Save panel directories on Exit" ;
group = "ExitFAR" ;
action = function ( )
local panels= { A= panel. GetPanelDirectory( nil , 1 ) , P= panel. GetPanelDirectory( nil , 0 ) , L= APanel. Left}
mf. msave( "setup" , "ExitFAR" , panels)
end
}
Macro {
description = "Restore panel directories on Start" ;
area= "Shell" ; key= "auto" ; flags= "RunAfterFARStart" ;
action= function ( )
local panels= mf. mload( "setup" , "ExitFAR" )
if panels and panels. A then panel. SetPanelDirectory( nil , 1 , panels. A) end
if panels and panels. P then panel. SetPanelDirectory( nil , 0 , panels. P) end
if panels and APanel. Left ~= panels. L then Keys( "CtrlU" ) end
end
}
should work.
2useven10
Shmuel
Posts: 6840 Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 530 times
Post
by Shmuel » Thu 08 Aug, 2013 13:42
2useven10 wrote: So if ExitFAR fixed, something like that should work.
Sure.
Just note, it is not ExitFARW that should be fixed, it is the moment of unloading plugins when exiting Far.
Shmuel
Mauro72
Posts: 220 Joined: Wed 11 Aug, 2010 00:23
Location: Rosario, Argentina
Been thanked: 9 times
Post
by Mauro72 » Thu 08 Aug, 2013 16:46
The problem/error is generated by CONEMU plugin...
Running FAR without CONEMU, no error/problem!!
I remember update conemu before try your macro Shmuel.
So the problem is CONEMU!
Thanks again Shmuel for your help!
Mauro72
Shmuel
Posts: 6840 Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 530 times
Post
by Shmuel » Thu 08 Aug, 2013 16:51
Mauro72 wrote: So the problem is CONEMU!
Thanks again Shmuel for your help!
You're welcome!
You may want to report the problem to ConEmu author.
Shmuel
Mauro72
Posts: 220 Joined: Wed 11 Aug, 2010 00:23
Location: Rosario, Argentina
Been thanked: 9 times
Post
by Mauro72 » Thu 08 Aug, 2013 17:08
Go back to CONEMU version 130223 and NO PROBLEMS/ERRORS!!!
Mauro72
2useven10
Posts: 5232 Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 315 times
Post
by 2useven10 » Thu 08 Aug, 2013 17:31
DrKnS wrote: 2useven10 wrote: What about new event or flag "RunBeforeFARExit" ?
Better make ExtFAR run earlier, I doubt it breaks anything.
I've tried...
Moving ExitFarW call for all plugins is dangerous.
Arclite crashed in my test if its panel was active when exit.
If that move done for LuaMacro only - everything looks good.
2useven10
Shmuel
Posts: 6840 Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 530 times
Post
by Shmuel » Thu 08 Aug, 2013 17:41
2useven10 wrote: DrKnS wrote: Better make ExtFAR run earlier, I doubt it breaks anything.
I've tried...
Moving ExitFarW call for all plugins is dangerous.
Arclite crashed in my test if its panel was active when exit.
Don't take it personally but this thing should be done only after one learned the relevant pieces of code thoroughly. Or it should be done by one that already knows the code.
Shmuel
2useven10
Posts: 5232 Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 315 times
Post
by 2useven10 » Thu 08 Aug, 2013 17:50
Shmuel
I looking forward to view certified solution. Then I'll compare it with mine 20-minute code serfing.
2useven10
Shmuel
Posts: 6840 Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 530 times
Post
by Shmuel » Thu 08 Aug, 2013 18:04
2useven10 wrote: Shmuel
I looking forward to view certified solution. Then I'll compare it with mine 20-minute code serfing.
It is certainly doable. Just not during 20 minutes if not already familiar with this part of Far.
In fact, yesterday I was about to try implementing that, but there were (and still are) other things to do.
Shmuel
2useven10
Posts: 5232 Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 315 times
Post
by 2useven10 » Fri 12 May, 2023 17:16
I hope so...
Look at
script under link in quotes - it is more correct (event action has additional parameter).
Last edited by
HaRT on Fri 12 May, 2023 19:42, edited 1 time in total.
Reason: Added direct link to the script
2useven10