tag:blogger.com,1999:blog-3992530807750384868.post981514934179643003..comments2015-07-30T15:47:20.597+03:00Comments on emacs-fu: customizing the mode-linedjcbnoreply@blogger.comBlogger20125tag:blogger.com,1999:blog-3992530807750384868.post-43850413387373491712013-12-06T04:58:51.943+02:002013-12-06T04:58:51.943+02:00Thank you for the format-time-string example -- I ...Thank you for the format-time-string example -- I am now going to use: `(:eval (propertize (format-time-string &quot;%A, %B %d, %Y -- %1I:%M %p&quot;)))` -- greatly appreciated.lawlisthttp://www.blogger.com/profile/12524559428194357552noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-1916330122031691982013-07-06T15:28:09.911+03:002013-07-06T15:28:09.911+03:00How do we add evil modes to this
modeline ?
Like i...How do we add evil modes to this<br />modeline ?<br />Like insert, normal, motion, emacs,<br />visual etc. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-14981534015648185532013-03-21T15:25:02.343+02:002013-03-21T15:25:02.343+02:00Answer to anonymous:
The Elisp info-page &quot;Mod...Answer to anonymous:<br />The Elisp info-page &quot;Mode Line format&quot; states:<br /><br /> 2. Put a text property on a mode line %-construct such as `%12b&#39;; then<br /> the expansion of the %-construct will have that same text property.<br /><br />So what you should do is putting a text property on the added &quot;%M&quot;. How to do that is also in the elisp manual (just C-s for it)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-69584442409638873812012-12-12T10:37:25.839+02:002012-12-12T10:37:25.839+02:00As @cb and @jpc suggested, global-mode-string has ...As @cb and @jpc suggested, global-mode-string has to be added; otherwise, things like the output of org-timer doesn&#39;t show on the mode-line. But does anyone know how to change the color of global-mode-string?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-41550733771005615772011-12-06T12:07:01.524+02:002011-12-06T12:07:01.524+02:00for anything that gets piped into the global-mode-...for anything that gets piped into the global-mode-string which includes erc tracking, emacs jabber and display-time/battery just add %M to your custom modelinejpchttp://jpc.devnull.ionoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-34736800627441307822011-09-28T01:17:17.327+03:002011-09-28T01:17:17.327+03:00To show status messages from ErcTrack use:
&#39;...To show status messages from ErcTrack use:<br /><br /> &#39;(:eval global-mode-string)cbhttp://www.blogger.com/profile/12554920601706373885noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-61648294588261415652011-09-16T17:26:14.730+03:002011-09-16T17:26:14.730+03:00@Unknown
I think you must add: %s -- print process...@Unknown<br />I think you must add: %s -- print process status.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-82026965540157165672011-09-05T22:34:59.386+03:002011-09-05T22:34:59.386+03:00Uncommenting the minor mode part shows the modes (...Uncommenting the minor mode part shows the modes (though it doesn&#39;t seem to always show the full list that the regular non customized version does) and it doesn&#39;t show &quot;notifications&quot; from things like ERC that the previous commenter asked about.<br /><br />It&#39;s things like activity from channels Etc. Any idea how to fix that?Unknownhttp://www.blogger.com/profile/12554920601706373885noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-76395212129477386292011-09-03T12:26:01.482+03:002011-09-03T12:26:01.482+03:00@Adben: zenburn@Adben: zenburndjcbhttp://www.blogger.com/profile/15938154009846040711noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-76112645013636538532011-09-02T21:11:19.318+03:002011-09-02T21:11:19.318+03:00Great stuff thank you, btw what is the theme that ...Great stuff thank you, btw what is the theme that you are using?adbenhttp://www.blogger.com/profile/12996117035267331698noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-8890954362468717652011-08-31T08:08:34.984+03:002011-08-31T08:08:34.984+03:00@Anonymous: to see the minor modes, there&#39;s a ...@Anonymous: to see the minor modes, there&#39;s a line to uncomment in the last lines of the example.djcbhttp://www.blogger.com/profile/15938154009846040711noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-51220575507463409532011-08-31T04:03:50.599+03:002011-08-31T04:03:50.599+03:00Thanks for this post, but I am missing notificatio...Thanks for this post, but I am missing notifications like the twittering or erc ones. Any idea how to add this parts?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-71468212572716863942011-08-29T01:24:39.021+03:002011-08-29T01:24:39.021+03:00Aha!
I did this:
(custom-set-faces
;;; stuff
...Aha!<br /><br />I did this:<br /><br />(custom-set-faces<br /><br />;;; stuff<br /><br /> &#39;(minibuffer-prompt ((default (:foreground &quot;red&quot;)) (nil (:foreground &quot;red&quot;))))<br />)<br /><br />and got a red prompt. Just what I needed!Greghttp://www.blogger.com/profile/04857616630819182647noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-64427233957973262732011-08-28T23:09:00.001+03:002011-08-28T23:09:00.001+03:00It looks nice, but one thing I miss: the major (an...It looks nice, but one thing I miss: the major (and minor) mode (mouseclick) Menu.<br /><br />Any suggestions how to fix it?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-43403090896324563752011-08-28T20:50:51.363+03:002011-08-28T20:50:51.363+03:00@Duncan MacGregor: actually, I find it easier to p...@Duncan MacGregor: actually, I find it easier to play with when it&#39;s a self-contained blob that I can evaluate at once.<br /><br />In, say, C, I usually have many little functions, but in elisp it seems it&#39;s more convenient to combine things.<br /><br />Anyway, I guess this is all a matter of taste.djcbhttp://www.blogger.com/profile/15938154009846040711noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-14145903585885396862011-08-28T20:27:58.706+03:002011-08-28T20:27:58.706+03:00@Greg. Those are actually pretty easy to change as...@Greg. Those are actually pretty easy to change as they&#39;re controlled by faces just like pretty much everything else. There are a few different faces to customise (echo-area, minibuffer, the various completion faces, etc.) but that&#39;s all pretty straight forward.<br /><br />I think there is room for a good article on how to use a dedicated frame for the mini-buffer, and if anybody could find a way to not only auto-raise it but place it close to the point then that would be even better.Duncan MacGregorhttp://www.blogger.com/profile/13811650146468811505noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-84101529988277493762011-08-28T07:02:38.595+03:002011-08-28T07:02:38.595+03:00As always, an excellent set of ideas and very well...As always, an excellent set of ideas and very well described.<br /><br />Someday I hope you set your sights lower. I&#39;d like to know about customizing the messages buffer at the very bottom. I find that it does not get my attention as much as I&#39;d like it to. I&#39;d like to fix up the type face, font size, and even font color if possible.Greghttp://www.blogger.com/profile/04857616630819182647noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-65345821783184267272011-08-27T01:58:50.368+03:002011-08-27T01:58:50.368+03:00I think the way you&#39;ve defined your mode-line ...I think the way you&#39;ve defined your mode-line is excellent for readability in the case of this tutorial, and makes for something much more understandable than the traditional list of #( forms and (var var) pairs for choosing a mode-line, but for actual use I&#39;d strongly recommend defining each part separately and then using those to define your final mode line.<br /><br />So my mode line definition for your example would be roughly<br /><br /> (setq mode-line-format<br /> (list<br /> my-mode-line-buffer-name<br /> my-mode-line-position<br /> my-mode-line-relative-position<br /> my-mode-line-major-mode<br /> &quot;[&quot;<br /> my-mode-line-insert-indicator<br /> my-mode-line-modified-indicator<br /> &quot;] &quot;<br /> my-mode-line-read-only-indicator<br /> my-mode-line-time<br /> &quot; --&quot;<br /> ;; i don&#39;t want to see minor-modes; but if you want, uncomment this:<br /> ;; minor-mode-alist ;; list of minor modes<br /> my-mode-line-padding ))<br /><br />With individual parts defined like so<br /><br />(setq my-mode-line-position<br /> ;; line and column<br /> (list<br /> &quot;(&quot; ;; &#39;%02&#39; to set to 2 chars at least; prevents flickering<br /> (propertize &quot;%02l&quot; &#39;face &#39;font-lock-type-face) &quot;,&quot;<br /> (propertize &quot;%02c&quot; &#39;face &#39;font-lock-type-face) <br /> &quot;) &quot; ))<br /><br />I find this makes life much easier both for the initial fiddling (do I really want those things in that order?) and when six months later I realise I actually want to add some more indicators or remove others.Duncan MacGregorhttp://www.blogger.com/profile/13811650146468811505noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-70241669590208888302011-08-26T01:10:05.612+03:002011-08-26T01:10:05.612+03:00@Tavis Rudd: you can do things also in mode-line-...@Tavis Rudd: you can do things also in mode-line-format, by filtering the results from `minor-mode-alist&#39;.djcbhttp://www.blogger.com/profile/15938154009846040711noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-61228206673137098762011-08-26T00:23:38.178+03:002011-08-26T00:23:38.178+03:00djcb, I found your previous tip about diminish.el ...djcb, I found your previous tip about diminish.el very handy for keeping the modeline manageable (http://emacs-fu.blogspot.com/2010/05/cleaning-up-mode-line.html)<br /><br />@tavisruddTavis Rudd (openid only - no blog)http://www.blogger.com/profile/02741099115279342000noreply@blogger.com