Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Why does ztree not use the already defined diff-switches and/or the ediff-diff-options ? #76

Closed
iperryman-xeda opened this issue Jan 22, 2021 · 4 comments

Comments

@iperryman-xeda
Copy link

Thank you for this excellent tool.

Just curious why zdiff does not pick up any of these other already defined options?

Its a bit annoying to have to duplicate them.

Already emacs has:

diff-command
diff-switches
ediff-diff-program
ediff-diff-options

ztree has to add to this:
ztree-diff-additional-options

So many places to keep the same options.

@fourier
Copy link
Owner

fourier commented Feb 16, 2021

Hi, thank you for kind words. Hope this tool is helpful for you.

The short answer is that ztree-diff is not a wrapper around Emacs' diff or ediff. It uses diff-command, yes, as if diff works for Emacs user ztree-diff should work as well. But command line options are different and customizable, and it is "-q" by default.
This particular option ztree-diff-additional-options was added in issue #65 , as a particular request.
Maybe I should have used diff-switches, but I find it unreasonable to fully copy some other frontend options - after all diff of files is just a part of functionality of ztree, which could be potentially reimplemented in elisp to increase portability.

@fourier
Copy link
Owner

fourier commented Feb 21, 2021

See issue #20

@fourier fourier closed this as completed Feb 21, 2021
@fourier
Copy link
Owner

fourier commented Feb 21, 2021

As a workaround I can suggest to add the following code after initializing the package:

(when (boundp 'diff-switches)
  (setq ztree-diff-additional-options diff-switches))

@iperryman-xeda
Copy link
Author

iperryman-xeda commented Feb 22, 2021 via email

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

No branches or pull requests

2 participants