I'm supporting some elisp code that creates a temporary filename using a prefix and the user id. When I develop this, that is not enough since I will be running multiple instances concurrently.
So I'm looking for either a function to create a temporary filename which I can control to some extent, or some other component to add to the name.
I thought the second option should be straightforward so I looked at process-id
, but that requires a process. (elisp manual: Process Information)
So I looked at get-process
but that requires a name, which would also be ambiguous.
How do I get the process id for the running Emacs process?
EDIT: I solved my problem using make-temp-name
(yeah, I know I should not use it, but I don't want to change the handling of temporary files at this point).
But for my edification, is there a way to get the process id for the Emacs process?