[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
choose file, sync to server, insert link
From: |
Matt Price |
Subject: |
choose file, sync to server, insert link |
Date: |
Thu, 11 Jun 2009 23:18:41 -0400 |
hi,
i'm using blog.el to post to my wordpress blog. I love it, except when
I want to add a picture to my post. Usually it'll be a picture I've
just taken, so my tedious process is:
- copy the file onto my laptop (usually do this in nautilus, as i need
to look at the files. can i do this with dired instead?)
- transfer the file to my server
("rsync -azvbp ~/file.jpeg myserver:/var/www/domain.com/images/")
- type in the unfortunately longish link name in muse markup
("[[http://www.domain.com/images/file.jpeg]]", and that doesn't even
provide alternate text for the image)
I would like, instead, to have a function in emacs that takes care of
most of this, but I'm not getting very far, as I remain extremely
ignorant in elisp. so i would imagine something like:
(defun syncmyfile (filename)
(interactive "File to sync: ")
(find-file-noselect(filename)) ;; except that really i just want to search
the filesystem
;; for the filename, not visit the file
(shell-command (concat ("rsync -azvbP ", '(filename), "dest:/some/dir/path/"))
(insert (concat ("[[http://www.domain.com/images/"), '(filename), "]]") )
two kinds of problems here:
- basic ignorance of lisp syntax, or maybe not ignorance so much as
incapacity to understand;
- don't really understand how to get a file-chooser -- i'm sure this is
a simple function call, but i can't locate the source for
find-file-noselect, which is the only command I know off the top of my
head that cets a completion buffer with choices from the filesystem.
anyway. If anyone can help me with this, i'd be very grateful. thanks
as always,
matt
- choose file, sync to server, insert link,
Matt Price <=