# Emacs Muse based publishing

DevFeed: [Emacs Muse based publishing](<https://devfeed.tech/articles/emacs-muse-based-publishing-34352.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2009/10/emacs-muse-based-publishing/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2009-10-06T15:23:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [rsync](<https://devfeed.tech/topics/rsync.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [command-line](<https://devfeed.tech/tags/command-line.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [muse](<https://devfeed.tech/tags/muse.md>), [rsync](<https://devfeed.tech/tags/rsync.md>)

## AI overview

An Emacs Muse publishing workflow uses an interactive Emacs command to publish a blog with rsync, including optional synchronization of static CSS, image, and PDF directories.

## Source excerpt

As you might have noticed, this little blog of mine is not compromising much and entirely maintained from Emacs. Until today, I had to resort to term to upload my publications, though, as I've been too lazy to hack up the tools integration for simply doing a single rsync command line. That was one time to many: (defvar dim:muse-rsync-options "-avz" "rsync options") (defvar dim:muse-rsync-source "~/dev/muse/out" "local path from where to rsync, with no ending /") (defvar dim:muse-rsync-target "dim@tapoueh.org:/home/www/tapoueh.org/blog.tapoueh.org" "Remote URL to use as rsync target, with no ending /") (defvar dim:muse-rsync-extra-subdirs '("../css" "../images" "../pdf") "static subdirs to rsync too, path from dim:muse-rsync-source, no ending /") (defun dim:muse-project-rsync (&optional static) "publish tapoueh.org using rsync" (interactive "P") (let* ((rsync-command (format "rsync %s %s %s" dim:muse-rsync-options (concat dim:muse-rsync-source "/") (concat dim:muse-rsync-target "/")))) (with-current-buffer (get-buffer-create "*muse-rsync*") (erase-buffer) (insert (concat rsync-command "\n")) (message "%s" rsync-command) (insert (shell-command-to-string rsync-command)) (insert "\n") (when static (dolist (subdir dim:muse-rsync-extra-subdirs) (let ((cmd (format "rsync %s %s %s" dim:muse-rsync-options (concat dim:muse-rsync-source "/" subdir) dim:muse-rsync-target))) (insert (concat cmd "\n")) (message "%s" cmd) (insert (shell-command-to-string cmd)) (insert "\n"))))))) (define-key muse-mode-map (kbd "C-c R") 'dim:muse-project-rsync) So now to publish this blog, it's just a C-c R away! :)