fourier / ztree

Directory tree comparison mode for Emacs
http://www.emacswiki.org/emacs/ZtreeDiff
GNU General Public License v3.0
239 stars 21 forks source link

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

Closed iperryman-xeda closed 3 years ago

iperryman-xeda commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

See issue #20

fourier commented 3 years ago

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 commented 3 years ago

Thanks for your explanations, updates, and suggestions!

Cheers ! Ian

On Sun, Feb 21, 2021 at 8:14 AM Alexey Veretennikov < notifications@github.com> wrote:

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

(setq ztree-diff-additional-options diff-switches))

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fourier/ztree/issues/76#issuecomment-782856309, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHU53KPV7QNU2X42EHZXMUTTAEBK7ANCNFSM4WNXSPZA .

-- Ian Perryman XtremeEDA Corp 613-728-5912 x210 200-25 Holland Ave, Ottawa, ON, K1Y 4R9