Subject: Re: bug#32852: 25.2; No option for emacsclient to open files in specific mode

From: Stefan Kangas <[email-masked]>
Date: Thu, 3 Oct 2019 03:21:54 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Emil Marklund <[email-masked]>
>> Date: Thu, 27 Sep 2018 14:56:18 +0200
>>
>> Feature request: add option for emacsclient to open files in a specific mode
>
> emacsclient accepts the --eval option, so I'd expect you to be able to
> use that to turn on the mode you want (or more generally to run any
> Lisp code).
>
> Did you try that?

Do you mean something like this?

emacsclient -c --eval '(find-file "foo") (emacs-lisp-mode)'

If yes, then I guess it's workable.

In any case, I'm not sure why configuring auto-mode-alist shouldn't be
sufficient.  Emil, could you perhaps clarify what your use case is
here?

Best regards,
Stefan Kangas