Muli Ben-Yehuda's journal

February 14, 2004

Filed under: Uncategorized — Muli Ben-Yehuda @ 12:37 AM

Rewrote ljablog.el’s main loop to be more lispish in nature. Sexy!

(defun ljablog-post () 
  "Post a ljablog entry to both livejournal and advogato."  
      '((lj-compose lj-post) 
        (advogato-start-post advogato-save-post)))) 
      (copy-region-as-kill (point-min) (point-max)) 
        (lambda (x) 
          (funcall (car x)) 
          (if ljablog-debug-do-post 
            (funcall (cadr x)))) 


  1. Psssst: if it has *curves*, it’s sexy. All that has is indentations…

    Comment by shunra — February 13, 2004 @ 3:27 PM | Reply

  2. (looks
    &nbsp&nbsp ((cool)
    &nbsp&nbsp &nbsp&nbsp (2
    &nbsp&nbsp &nbsp&nbsp &nbsp&nbsp &nbsp&nbsp (me))))

    Comment by 77azkkr — February 13, 2004 @ 4:36 PM | Reply

  3. Ani lo mevin.
    It’s quite scary actually.

    Comment by luckluster — February 17, 2004 @ 11:14 AM | Reply

    • Here’s what it looks like now:

      (defun ljablog-post ()
        "Post a ljablog entry to both livejournal and advogato."
            ((blogs (list
      	       (make-blog :compose-func 'lj-compose
      			  :pre-post-hook 'ljab-turn-lj-html-on
      			  :post-func 'lj-post
      			  :debug-really-post t)
      	       (make-blog :compose-func 'advogato-start-post
      			  :post-func 'advogato-save-post
      			  :debug-really-post t)))
             (buffer (current-buffer)))
           (lambda (blog)
             (set-buffer buffer)
             (copy-region-as-kill (point-min) (point-max))
             (funcall (blog-compose-func blog))
             (let ((hook (blog-pre-post-hook blog))
      	     (debug (blog-debug-really-post blog))
      	     (post (blog-post-func blog)))
      	 (when hook
      	   (funcall hook))
      	 (when debug
      	   (funcall post))))

      Do you want me to explain it?

      Comment by mulix — February 17, 2004 @ 11:22 AM | Reply

      • I thought it’s some kind of geeky pseudo-code joke at first.. but if it’s a real emacs maco than I’m not scared anymore. 🙂

        Comment by luckluster — February 18, 2004 @ 8:25 AM

      • It’s definitely real, I use it everytime I post here. You can see the code here:

        Comment by mulix — February 19, 2004 @ 9:40 PM

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: