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

dropbox.el does not work with Helm #7

Open
mgttlinger opened this issue Nov 2, 2018 · 5 comments
Open

dropbox.el does not work with Helm #7

mgttlinger opened this issue Nov 2, 2018 · 5 comments

Comments

@mgttlinger
Copy link

mgttlinger commented Nov 2, 2018

After setting up dropbox.el (configuring access-token and calling dropbox-connect) I can list contents in my dropbox using dropbox--list but trying to access files with the documented prefix /db: only results in the following error:

Error running timer: (user-error "Not a Tramp file name: \"/db:\"")

Is this a bug or a configuration issue?

@pavpanchekha
Copy link
Owner

It sounds like this is a configuration issue, though I'm not sure why. Make sure you call dropbox-connect on every startup. If that's not the issue, could you give me the contents of the file-name-handler-alist variable?

(You can do that by opening up the *scratch* buffer, typing in that variable name, and hitting C-j, or by any number of other methods.)

@mgttlinger
Copy link
Author

file-name-handler-alist is a variable defined in ‘C source code’.
Its value is
(#1=("\\`/db:" . dropbox-handler)
    ("\\(?:\\.tzst\\|\\.zst\\|\\.dz\\|\\.txz\\|\\.xz\\|\\.lzma\\|\\.lz\\|\\.g?z\\|\\.\\(?:tgz\\|svgz\\|sifz\\)\\|\\.tbz2?\\|\\.bz2\\|\\.Z\\)\\(?:~\\|\\.~[-[:alnum:]:#@^._]+\\(?:~[[:digit:]]+\\)?~\\)?\\'" . jka-compr-handler)
    ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" . epa-file-handler)
    ("\\`/\\(\\([^/|:]+:[^/|:]*|\\)*[^/|:]+\\(:[^/|:]*\\)?\\)?\\'" . tramp-completion-file-name-handler)
    ("^/\\(\\(?:\\([a-zA-Z0-9-]+\\):\\(?:\\([^/|: 	]+\\)@\\)?\\(\\(?:[a-zA-Z0-9_.%-]+\\|\\[\\(?:\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+\\)?]\\)\\(?:#[0-9]+\\)?\\)?|\\)+\\)?\\([a-zA-Z0-9-]+\\):\\(?:\\([^/|: 	]+\\)@\\)?\\(\\(?:[a-zA-Z0-9_.%-]+\\|\\[\\(?:\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+\\)?]\\)\\(?:#[0-9]+\\)?\\)?:\\(.*$\\)" . tramp-file-name-handler)
    #1#
    ("\\`/:" . file-name-non-special))

This looks alright (at least to my untrained eyes)

About the automated running of dropbox-connect: That should be the case due to my config:

(use-package dropbox
  :ensure t
  :after (request password-store)
  :custom
  (dropbox-access-token (password-store--run-show "cloud/dropbox-token"))
  (dropbox-verbose t)
  :config
  (dropbox-connect)
  :demand t)

@pavpanchekha
Copy link
Owner

Yep, that file-name-handler-alist is fine. In particular I was looking for a dropbox-handler entry, and you have one. What happens if you try to execute (directory-files "/db:")? If that also raises an error message, can you try to execute (dropbox-handle-directory-files "/db:")?

The first of these is an Emacs function which should call the second if the Dropbox file name handler is set up correctly. If the first fails and the second succeeds, something is going wrong in the handler configuration. If the first succeeds, then it seems the handler is set up correctly, and there's some bad interaction with some higher-up component (possibly due to some package you're using—we'll have to debug further). If both fail, there's some problem in dropbox.el.

@mgttlinger
Copy link
Author

mgttlinger commented Nov 5, 2018

Ok, so the problem seems to be in combination with helm-find-file the first function as well as plain old find-file managed to open my files.

Is that a bug or an incompatability that should be documented?

However revert-buffer and saving files did not perform as expected.
I'll investigate and open a separate issue for that as that seems unrelated to the original issue.

@pavpanchekha
Copy link
Owner

Hmm, OK, I will have to look into what's up with Helm. (I use Ivy.) I'll document Helm as an incompatibility for now, and perhaps look into it later.

Please file a bug for revert-buffer and saving.

@pavpanchekha pavpanchekha changed the title "/db:" prefix not working dropbox.el does not work with Helm Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants