hayamiz / twittering-mode

An Emacs major mode for Twitter
http://twmode.sourceforge.net/
545 stars 92 forks source link

Add Retweet/Favorite Counts Format String #96

Closed kuanyui closed 9 years ago

kuanyui commented 9 years ago

Format string of retweet/favorite count number is unavailable in current format string items, but I think it should be very usable if adding them. ˊ・ω・ˋ twmode-favcount

And add some color... twmode-favcount1

(setq twittering-status-format
      "%i %s,%FACE[font-lock-preprocessor-face]{%p} %FACE[font-lock-comment-face]{%@}:
%FOLD[  ]{%T %FACE[font-lock-comment-face]{// from %f%L%r%R} %FACE[font-lock-keyword-face]{%e} %FACE[font-lock-function-name-face]{%F}}
 ")
myuhe commented 9 years ago

:+1:

kuanyui commented 9 years ago

Sorry, I just found this patch will cause error when opening :(sent_)direct_message timeline buffer... I'll try to find where the problem is... :(

kuanyui commented 9 years ago

The problem fixed in latest commit. :D

twmode-favcount3

ayman commented 9 years ago

+1

cvmat commented 9 years ago

I think that it will be difficult to add a new format specifier for each new additional concept. I have added the more general format specifier %FIELD and %FIELD-IF-NONZERO on the commit af8856ca73d362cb28a4c079dfd0de970fb88da0 .

%e and %F for your patch are equivalent to %FIELD-IF-NONZERO["↺%d"]{retweet_count} and %FIELD-IF-NONZERO["✶%d"]{favorite_count}, respectively. How about it?