help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: [SOLVED] Re: How to detect two emacs process in Elisp code?


From: address@hidden
Subject: Re: [SOLVED] Re: How to detect two emacs process in Elisp code?
Date: Thu, 3 Sep 2020 10:50:18 +0800

Yes, it's simpler. Ahah

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


On Thu, Sep 3, 2020 at 10:47 AM Emanuel Berg via Users list for the GNU
Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> numbchild@gmail.com wrote:
>
> > Thanks for quick reply. Confirmed it solved my
> > problem. Thanks very much!
>
> Np :)
>
> But what about this?
>
> (defun how-many-emacs-2 ()
>   (let*((ps-outp (shell-command-to-string "ps -C emacs -o pid="))
>         (ps-lst (split-string ps-outp)) )
>     (length ps-lst) ))
> ;; (how-many-emacs-2) ; 1
>
> Looks better, right?
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]