{"id":127,"date":"2011-03-17T09:18:02","date_gmt":"2011-03-17T13:18:02","guid":{"rendered":"http:\/\/fazigu.org\/blog\/?p=127"},"modified":"2011-03-17T09:34:59","modified_gmt":"2011-03-17T13:34:59","slug":"emacs-menubar-buffers-list-format","status":"publish","type":"post","link":"https:\/\/fazigu.org\/blog\/2011\/03\/17\/emacs-menubar-buffers-list-format\/","title":{"rendered":"Emacs Menubar Buffers List Format"},"content":{"rendered":"<p>And now for something completely different.\u00a0 No depression updates this time.\u00a0 A new &#8220;Hacking&#8221; category and a code tip on getting the full filenames in the menubar buffers list of Emacs.<\/p>\n<p>I use Emacs 23.1.50.1 on my desktop, mostly for the kinds of things (quick copy and pasting and scratch pads) vim&#8217;s modal model doesn&#8217;t make altogether easy.\u00a0 I&#8217;m not a vehement advocate of either editor, but of both.<\/p>\n<pre lang=\"lisp\">;; Copied from \/usr\/share\/emacs\/23.1.50\/lisp\/menu-bar.el.gz\r\n(defun menu-bar-update-buffers-1 (elt)\r\n  (let* ((buf (car elt))\r\n     (file\r\n      (and (if (eq buffers-menu-show-directories 'unless-uniquify)\r\n           (or (not (boundp 'uniquify-buffer-name-style))\r\n               (null uniquify-buffer-name-style))\r\n         buffers-menu-show-directories)\r\n           (or (buffer-file-name buf)\r\n           (buffer-local-value 'list-buffers-directory buf)))))\r\n    (cons (if buffers-menu-show-status\r\n          (let ((mod (if (buffer-modified-p buf) \"*\" \"\"))\r\n            (ro (if (buffer-local-value 'buffer-read-only buf) \"%\" \"\")))\r\n        (if file\r\n            (format \"%s  %s%s\" file mod ro )\r\n          (format \"%s  %s%s\" (cdr elt) mod ro)))\r\n        (if file\r\n        (format \"%s  --  %s\"  (cdr elt) file)\r\n          (cdr elt)))\r\n      buf)))<\/pre>\n<p>Just add that to your init.el or wherever you put your emacs customizations, and you should see the full path and filename of files in your menubar buffers list instead of the basename then the directory.<\/p>\n<p>Also gonna paste this into my flat-text <a title=\"Tips and Tricks\" href=\"http:\/\/fazigu.org\/~quinn\/kb\/tips.txt\" target=\"_blank\">coredump file<\/a>, where I&#8217;ll probably find I&#8217;ve already got some code snippet that solved it.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>And now for something completely different.\u00a0 No depression updates this time.\u00a0 A new &#8220;Hacking&#8221; category and a code tip on getting the full filenames in the menubar buffers list of Emacs. I use Emacs 23.1.50.1 on my desktop, mostly for the kinds of things (quick copy and pasting and scratch pads) vim&#8217;s modal model doesn&#8217;t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[16],"class_list":["post-127","post","type-post","status-publish","format-standard","hentry","category-hacking","tag-emacs"],"_links":{"self":[{"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":8,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"predecessor-version":[{"id":134,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions\/134"}],"wp:attachment":[{"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}