unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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

* alternate image text in muse-mode?
  2009-06-12  3:18 choose file, sync to server, insert link Matt Price
@ 2009-06-12 14:15 ` Matt Price
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Price @ 2009-06-12 14:15 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, 2009-06-11 at 23:18 -0400, Matt Price wrote:
> 
> 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, 

sorry, asked for help too soon.  this works:
(defun syncmyfile (filename)
  (interactive "FFile to sync: ")
  (expand-file-name filename ) 
  (shell-command (concat "rsync -azvbP " filename " server:/var/www/path/images/"))
  (insert (concat "[[http://server/images/" (file-name-nondirectory filename) "]] ") ))

only-barely-related question:  does anyone know whether I can add an
alternate text to an image link in muse mode?  trying to comply to
accessibility standards.

thanks,
matt


-- 
Matt Price
matt.price@utoronto.ca




^ 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).