0
@@ -88,9 +88,9 @@ You must have write-access to this directory via `scp'.")
0
(concat "<p style='font-size: 8pt; font-family: monospace;'>Generated by "
0
- " using <a href='http://p.hagelb.org'>scpaste</a> at %s "
0
- (cadr (current-time-zone)) ".</p>")
0
+ " using <a href='http://p.hagelb.org'>scpaste</a> at %s "
0
+ (cadr (current-time-zone)) ".</p>")
0
"HTML message to place at the bottom of each file.")
0
(defvar scpaste-tmp-dir "/tmp"
0
@@ -101,13 +101,13 @@ You must have write-access to this directory via `scp'.")
0
"Paste the current buffer via `scp' to `scpaste-http-destination'."
0
(interactive "MName (defaults to buffer name): ")
0
(let* ((b (htmlize-buffer))
0
- (name (url-hexify-string (if (equal "" original-name)
0
- (full-url (concat scpaste-http-destination "/" name ".html"))
0
- (scp-destination (concat scpaste-scp-destination "/" name ".html"))
0
- (scp-original-destination (concat scpaste-scp-destination "/" name))
0
- (tmp-file (concat scpaste-tmp-dir "/" name)))
0
+ (name (url-hexify-string (if (equal "" original-name)
0
+ (full-url (concat scpaste-http-destination "/" name ".html"))
0
+ (scp-destination (concat scpaste-scp-destination "/" name ".html"))
0
+ (scp-original-destination (concat scpaste-scp-destination "/" name))
0
+ (tmp-file (concat scpaste-tmp-dir "/" name)))
0
;; Save the file (while adding footer)
0
@@ -121,7 +121,7 @@ You must have write-access to this directory via `scp'.")
0
;; want to load eshell and you don't mind the popup password prompt.
0
(eshell-command (concat "scp " tmp-file " " scp-destination))
0
(eshell-command (concat "scp " (buffer-file-name (current-buffer))
0
-
" " scp-original-destination))
0
+
" " scp-original-destination))
0
(ignore-errors (kill-buffer "*EShell Command Output*"))
0
;; Notify user and put the URL on the kill ring
0
@@ -139,15 +139,15 @@ You must have write-access to this directory via `scp'.")
0
(flush-lines "^Password: $" (point-min) (point-max))
0
(flush-lines "private" (point-min) (point-max))
0
(let ((file-list (split-string (buffer-string) "\n")))
0
- (insert-file-contents "~/.emacs.d/scpaste.el") ;; TODO: find elisp's __FILE__
0
- (goto-char (point-min))
0
- (search-forward ";;; Commentary")
0
- (insert "\n;;; Pasted Files\n\n")
0
- (mapc (lambda (file) (insert (concat ";; * <" scpaste-http-destination "/" file ">\n"))) file-list)
0
- (emacs-lisp-mode) (font-lock-fontify-buffer) (rename-buffer "SCPaste")
0
+ (insert-file-contents "~/.emacs.d/scpaste.el") ;; TODO: find elisp's __FILE__
0
+ (goto-char (point-min))
0
+ (search-forward ";;; Commentary")
0
+ (insert "\n;;; Pasted Files\n\n")
0
+ (mapc (lambda (file) (insert (concat ";; * <" scpaste-http-destination "/" file ">\n"))) file-list)
0
+ (emacs-lisp-mode) (font-lock-fontify-buffer) (rename-buffer "SCPaste")
0
(ignore-errors (kill-buffer "*EShell Command Output*")))))
Comments
No one has commented yet.