cjohansson / emacs-ssh-deploy

A deployment plugin via Tramp for Emacs.
GNU General Public License v3.0
154 stars 6 forks source link

New feature idea? dired ediff ignore files on server #62

Closed jeswcollins closed 5 years ago

jeswcollins commented 5 years ago

I like working on the server for rapid UI bug fix and new feature experiments. I've generated new files on the server. I would like to keep these there, but don't want them to show up in the SSH Deploy dired ediff buffer.

Is there a preferred way to go about implementing such a feature, if it doesn't already exist?

jeswcollins commented 5 years ago

Maybe I didn't do enough research before I asked this question. I see that I may be able to set dired-omit-mode to t, e.g. as in https://www.gnu.org/software/emacs/manual/html_node/dired-x/Omitting-Variables.html, for this feature idea.

jeswcollins commented 5 years ago

I tried the above, but my ediffs seem to not have changed.

An excerpt from my dir-locals.el

 (dired-mode . (
        (dired-omit-mode . t)
        ;;(dired-omit-files "^#\\|\\.$\\|-err")
        )

  )

Maybe I am implementing these dired variables incorrectly? I get the same ediff result with the dired-omit-files commented in or out.

Emacs does recognize my dired-omit-mode, as it asks me to confirm it and dired-omit-files.

jeswcollins commented 5 years ago

Ah I see also ssh-deploy-exclude-list

https://github.com/cjohansson/emacs-ssh-deploy/blob/d0f7294d23380766dcabdb4ed21bc6a68e496110/ssh-deploy.el#L211

Seems likely that this issue can be closed, but I will try to see if I can set this variable first

cjohansson commented 5 years ago

I'm not sure what kind of feature you want but the ssh-deploy-exclude-list will exclude files when doing recursive directory differences both from local and from remote host

jeswcollins commented 5 years ago

Should I be able to add to ssh-deploy-exclude-list from .dir-locals.el?

I tried adding

(setq list1 '("path/to/file_to_be_excluded.txt"))
(add_to_list 'ssh-deploy-exclude-list 'list1)

to .dir-locals.el, but I don't see the new string added to the variable according to C-h v ssh-deploy-exclude-list.

jeswcollins commented 5 years ago

I wasn't modifying my .dir-locals.el properly.

Reading this link on Directory Variables helped: https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#Directory-Variables

The line I added was:

(ssh-deploy-exclude-list . ("path/to/file_to_exclude_1.txt" ".git/" ".dir-locals.el"))

Will close the issue.