Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter for latexindent not being parsed correctly #296

Open
weiyaw opened this issue Apr 15, 2024 · 3 comments
Open

Formatter for latexindent not being parsed correctly #296

weiyaw opened this issue Apr 15, 2024 · 3 comments

Comments

@weiyaw
Copy link

weiyaw commented Apr 15, 2024

Currently the command for latexindent formatter is (latexindent . ("latexindent" "--logfile=/dev/null")). Apparently this results in an incorrect parsing of the command, as a backslash is being added before = when running the command.

$ latexindent --logfile\=/dev/null -

Can't open file: No such file or directory at /Users/kenyonn/Library/Application Support/MiKTeX/texmfs/install/scripts/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.pm line 73, <> line 1763.

Command succeeded with exit code 2.

However, adding two backslash before =, i.e. ("latexindent" "--logfile\\=/dev/null") fix the issue. I'm not sure if this issue only shows up in macOS/zsh though.

Running Emacs 29.3 on macOS 14.4.1.

@weiyaw weiyaw changed the title latexindent not parsing command properly Formatter for latexindent not being parsed correctly Apr 15, 2024
@weiyaw
Copy link
Author

weiyaw commented Apr 15, 2024

Update: I can't reproduce this issue on my other machine running Emacs 29.2 on the same macOS 14.4.1.

@raxod502
Copy link
Member

That's odd, since Emacs 29.3 is only a bug-fix release with security patches: https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29

Is it possible that there is some other environment difference between those two machines? For example, perhaps a different default shell in the environment that leads Emacs to assume different quoting rules would be correct?

@weiyaw
Copy link
Author

weiyaw commented Apr 30, 2024

That's a possibility, but unfortunately I'm relatively new to Emacs and not sure which button to push to get the right diagnostics. Is there any debugging tools that shows the shell being used?

I'm also using doomemacs: https://github.com/doomemacs/doomemacs and the work branch of this Mac port of Emacs: https://bitbucket.org/mituharu/emacs-mac/src/work/ so this could be an issue specific to this particular port of Emacs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants