2011년 3월 30일 수요일

[Emacs] twittering-mode 스테이터스(타임라인) 모양 바꾸기

(트윗 내용에 신경쓰면 지는겁니다. -_-)

twittering-mode는 Emacs에서 트윗을 즐길 수 있어서 편하긴 한데 타임라인의 가독성이 좀 떨어지는 편이다. 특히 글 뒤에 Location 이라던지 어떤 클라이언트로 썼는지 등의 정보가 같이 붙어있어서 원하는 글만 보는데 지장(?)이 좀 있다.

그래서 수동으로 바꾸자 싶어서 소스(twittering-mode.el)를 뒤져봤다. 그러다 twittering-status-format라는 변수를 발견했다. 친절하게도 formatted-string 형식으로 구성하게 되어 있고 도움말 까지 달려있었다. 즉 유저가 원하는 데로 수정하라는 것이다.
(defvar twittering-status-format "%i %s,  %@:\n%FILL[  ]{%T // from %f%L%r%R}\n "
  "Format string for rendering statuses.
Ex. \"%i %s,  %@:\\n%FILL{  %T // from %f%L%r%R}\n \"

Items:
 %s - screen_name
 %S - name
 %i - profile_image
 %d - description
 %l - location
 %L - \" [location]\"
 %r - \" sent to user\" (use on direct_messages{,_sent})
 %r - \" in reply to user\" (use on other standard timeline)
 %R - \" (retweeted by user)\"
 %RT{...} - strings rendered only when the tweet is a retweet.
            The braced strings are rendered with the information of the
            retweet itself instead of that of the retweeted original tweet.
            For example, %s for a retweet means who posted the original
            tweet, but %RT{%s} means who retweeted it.
 %u - url
 %j - user.id
 %p - protected?
 %c - created_at (raw UTC string)
 %C{time-format-str} - created_at (formatted with time-format-str)
 %@ - X seconds ago
 %T - raw text
 %t - text filled as one paragraph
 %' - truncated
 %FACE[face-name]{...} - strings decorated with the specified face.
 %FILL[prefix]{...} - strings filled as a paragraph. The prefix is optional.
                      You can use any other specifiers in braces.
 %FOLD[prefix]{...} - strings folded within the frame width.
                      The prefix is optional. This keeps newlines and does not
                      squeeze a series of white spaces.
                      You can use any other specifiers in braces.
 %f - source
 %# - id
")

내 경우 다음과 같은 설정을 .emacs 에 추가했다.
(setq twittering-status-format "%i %s, %r%R %@:\n%FILL[  ]{%T}\n ")
reply 나 리트윗 상태를 윗쪽으로 올리고 글 공간에는 글만 표시하고 다른 것은 표시 안하게 설정한 것이다. 이렇게 하면 스크린샷 같은 모양이 나온다.

----- (추가) -----

텍스트 가로폭이 너무 넓어서 읽기가 좀 힘든 감이 있을 때를 위해 twittering-fill-column 이라는 변수도 있다. 개인적으로 60자 정도가 적당한 것 같아서 다음 설정도 추가해서 사용하고 있다.
(setq twittering-fill-column 60)

이제 전보다 쾌적하게 트위터를 즐길 수 있게 되었다. ( T_T )

댓글 7개 :

익명 :

I hardly drop remarks, but i did a few searching and wound up here
"[Emacs] twittering-mode 스테이터스(타임라인) 모양 바꾸기".

And I actually do have a couple of questions
for you if you don't mind. Is it only me or does it look like some of these comments appear like written by brain dead folks? :-P And, if you are writing on other places, I would like to keep up with anything fresh you have to post. Would you list of all of your shared sites like your twitter feed, Facebook page or linkedin profile?

my blog; The actual psychological outcomes of gynecomastiathat face men

익명 :

Heya i am for the primary time here. I came across this board and I
find It really useful & it helped me out much.
I'm hoping to provide something again and aid others like you helped me.

Look into my blog - Getting Questions Regarding Gynecomastiaclarified

익명 :

Hi there, the whole thing is going perfectly here and ofcourse every one is sharing information, that's truly excellent, keep up writing.

Feel free to visit my web site http://chestfatburner.com/

익명 :

Nice answer back in return of this matter with firm
arguments and explaining everything about that.


my homepage chestfatburner.com

익명 :

Someone necessarily help to make critically articles I'd state. This is the very first time I frequented your web page and thus far? I amazed with the analysis you made to make this actual submit incredible. Wonderful activity!

Here is my webpage: Is actually gynecomastiasurgical treatment the achievable option to suit your needs?

익명 :

You could definitely see your expertise in the article you write.

The arena hopes for more passionate writers such as you who are not afraid to mention
how they believe. At all times follow your heart.


Also visit my web page The various forms of gynecomastia

익명 :

I have been surfing online more than 4 hours today,
yet I never found any interesting article like yours.
It's pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the net will be a lot more useful than ever before.

Look into my webpage Data compresion Dress to Hide Man Boobs