Re: mc Digest, Vol 125, Issue 4



I need to know whether my editor is being called from mc or not.

pstree -p : shows all the processes with their ancestor/descendant
relationships, and `pgrep <editor>`, <show the ancestor of `pgrep <editor>`

This question is related to the one that I can't get an answer to:
 "which [per workspace & terminal] mc has one of its panels 'on' <path> ?"

Let's experiment:
? HowMany mc/S are now running ? = pgrep mc |wc -l ==68
Select one that's got a 'likely-lonely CurrentWorkingDir' and confirm
that no other mc has the same cwd
 lsof |grep mc |grep xlisp   |wc -l  == 1
See it's PID
 lsof |grep mc |grep xlisp ==mc     25373       root  cwd       DIR
   3,6     4096      84399 /mnt/H6/home/Debug/gforth6/xlisp/Xlsp21gDoc

<Tab>/<swap the <PID=25373>:mc's cwd & confirm
 lsof |grep 25373 | grep cwd |wc -l ==1
 lsof |grep 25373 | grep cwd ==mc    25373      root  cwd       DIR
       3,6     4096     206987 /mnt/H6/home/Debug/MousSpeed

But now, this mc still has <xlisp> in its inactive panel; but:
 lsof |grep mc |grep xlisp | grep cwd ==<nill>
that's hidden/not-available.

If an <item arrives for xlisp> we don't want to open ANOTHER mc !!
.. when one [or more] are already available.


Obviously the mc software KNOWS about all the 'inactive' panels.
~/.mc/history and filepos know where <mc has recently been>.

But HOW do you get the list of inactive-paths?

Once you've confirmed that there is at-least-one mc with xlisp,
the next task [outside of mc's scope] is to know which
workSpace,terminal 'has' it; so that you can just go-there and use
what's already available.

== TIA.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]