How can I code a function to open the same relative file (for example, server/logfile.txt) from a project? So, this should be relative to the project I'm in.
projectile-find-file list all of them, not only the one which we're interested to open...
You can use the
projectile-project-rootfunction to expand paths relative to your projectile project's base directory, eg.or (the
when-let,if-letmacros are fromsubr-xincluded in recent emacses)