fix(mu4e): improve mu-lock compatability with mac

On mac process args aren't defined, but comm is. Since comm also works
on Linux, we now check for that instead, accounting for a potential
capitalisation difference.
This commit is contained in:
TEC 2021-08-03 02:37:25 +08:00
parent 181f17a6f4
commit 61126c6bb4
No known key found for this signature in database
GPG key ID: 779591AFDB81F06C

View file

@ -22,7 +22,7 @@
(insert-file-contents +mu4e-lock-file)
(buffer-string))))
(process (process-attributes pid)))
(if (and process (string-match-p "emacs" (alist-get 'args process)))
(if (and process (string-match-p "[Ee]macs" (alist-get 'comm process)))
(cons pid process)
(delete-file +mu4e-lock-file) nil))))