-
Notifications
You must be signed in to change notification settings - Fork 382
Conversation
43a33dd to
0af5145
Compare
trim21
commented
Feb 11, 2026
@pinacle2000 I tested this with vscode and it works as I expect, fell free to test it with Emacs
pinacle2000
commented
Feb 11, 2026
@pinacle2000 I tested this with vscode and it works as I expect, fell free to test it with Emacs
Great! It works 😄
2024年12月25日 custom "fava-option" "use-external-editor" "true"
2026年02月11日 custom "fava-option" "external-editor-command" "emacsclientw.exe -n +${line} ${file}"
yagebu
commented
Feb 13, 2026
Can you remove the option use-external-editor if it's broken, I don't see the point of keeping it around and also rebase this PR a bit?
trim21
commented
Feb 14, 2026
Can you remove the option
use-external-editorif it's broken, I don't see the point of keeping it around and also rebase this PR a bit?
not all browser has same security limit I think?
But I don't use it so I'm ok to remove it.
Do you want me to sequash the commits?
54079f0 to
c66e44a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be a link but a button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will have a different outlook if we use button here, the button and link has differnt style. I don't want to fix it. and using link here won't cause any trouble I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This validation should already happen when the option is set and lead to an error there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really, if the command need more template than ${file} and ${line}, it will failed at api call time but it won't failed when parsing the options
trim21
commented
Feb 24, 2026
@yagebu would you mind take a look?
yagebu
commented
Mar 1, 2026
I thought some more about this and am pretty certain that adding this as a fava-option is not a good idea. This makes it way to simple to have a RCE. I think this needs to be configured at a higher layer (similar to e.g. incognito mode).
I thought some more about this and am pretty certain that adding this as a fava-option is not a good idea. This makes it way to simple to have a RCE. I think this needs to be configured at a higher layer (similar to e.g. incognito mode).
do you want a flag like --unsafe or --private or some else to enable this unsafe feature?
yagebu
commented
Mar 1, 2026
do you want a flag like --unsafe or --private or some else to enable this unsafe feature?
No, that's not going to happen, this just needs to be configured elsewhere (was thinking of using configuration in pyproject.toml)
trim21
commented
Mar 1, 2026
do you want a flag like --unsafe or --private or some else to enable this unsafe feature?
No, that's not going to happen, this just needs to be configured elsewhere (was thinking of using configuration in pyproject.toml)
tool.fava.trusted = true would be a good idea
yagebu
commented
Mar 1, 2026
tool.fava.trusted = true would be a good idea
No, I'm not talking about having some unsafe configuration, but the editor command would have to be configured there
84c78c9 to
635e58a
Compare
trim21
commented
Mar 1, 2026
@yagebu done, it current read tool.fava.external-editor-command = ["code", '-r', '-g', "${file}:${line}"] from pyproject.toml
...mand # Conflicts: # tests/test_json_api.py # uv.lock
@yagebu anything block this?
Uh oh!
There was an error while loading. Please reload this page.
Latex have a feature that called "synctex", when you click the pdf, the viewer will know the source code location and execute a command and let you get forcus on your editor and your cursor jump to the lino.
This pr add a new option called "external-editor-command" and replace the new link with a command executed in fava server.
For vscode, the command would look like "code -r -g $file:$lino".
#2197 (comment)