all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* choose file, sync to server, insert link
@ 2009-06-12  3:18 Matt Price
  2009-06-12 14:15 ` alternate image text in muse-mode? Matt Price
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Price @ 2009-06-12  3:18 UTC (permalink / raw)
  To: help-gnu-emacs

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






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-12 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-12  3:18 choose file, sync to server, insert link Matt Price
2009-06-12 14:15 ` alternate image text in muse-mode? Matt Price

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.