1

I would like my emacs to call dropbox status every 30 seconds and display whether Dropbox is up-to-date at the bottom of the buffer (where info such as the line-number and file name is).

How could I do this?

EDIT to add:

On my linux (with dropbox installed), the command line dropbox status returns the Dropbox status: $ dropbox status Up to date

Unfortunately it seems like this doesn't work on OSX (https://superuser.com/questions/678925/using-dropbox-from-the-command-line-on-osx).

10
  • Have not tried anything so far and not very familiar with Emacs Lisp. Was actually hoping this problem might have simple enough recipe for me to learn a little Emacs Lisp through implementing the solution (as that is my preferred learning style). However from your comments it sounds like I probably need more Emacs Lisp background before approaching this problem.
    – jackkamm
    Apr 2 '16 at 14:45
  • You should scour the internet to see if DropBox status can be achieved with a command-line from the terminal. If your research reveals that it can be done from the terminal, then revise/edit your question by posting a recipe of how to do that. If you are using OSX, then also look for an applescript. Then, the majority of readers of this forum can turn that command-line recipe or applescript into Lisp using things like start-process or do-applescript.
    – lawlist
    Apr 2 '16 at 15:58
  • I added a +1 because the original poster selected good tags for this project. The O.P. just needed a direction to go in -- i.e., find a command-line recipe or applescript that can obtain dropbox status, and from there the question should be how to turn it into Lisp and incorporate the result into the mode-line-format.
    – lawlist
    Apr 2 '16 at 16:09
  • @lawlist thank you for the upvote. I edited the question to partially address your comment. I am starting to read up a little on Emacs Lisp so in future I may add an edit with more specific Emacs Lisp question/direction.
    – jackkamm
    Apr 2 '16 at 17:54
  • When you get a chance, please evaluate: (shell-command-to-string "dropbox status") and see if it produces a result in the *Messages* buffer. And, if so, whether there is a trailing "\n" for new line -- which would need to be programmatically removed in the next step . . . . Here is what I am using to test this, because I'm on OSX not Linux -- I'm just using the command-line for getting the date when in the terminal: (replace-regexp-in-string "\n$" "" (shell-command-to-string "date")) The next step will be to . . .
    – lawlist
    Apr 2 '16 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.