From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: How to make EMMS display only play/pause/stop info in the modeline? Date: Fri, 16 Jun 2017 15:22:15 +0200 Message-ID: <86injwcbjs.fsf@zoho.com> References: <87bmpokst8.fsf@jane> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1497619384 11708 195.159.176.226 (16 Jun 2017 13:23:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Jun 2017 13:23:04 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 16 15:23:00 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLrDF-0002gO-0X for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Jun 2017 15:22:57 +0200 Original-Received: from localhost ([::1]:58874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLrDK-0004KC-4q for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Jun 2017 09:23:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLrCp-0004K7-7l for help-gnu-emacs@gnu.org; Fri, 16 Jun 2017 09:22:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLrCj-0006aY-EK for help-gnu-emacs@gnu.org; Fri, 16 Jun 2017 09:22:31 -0400 Original-Received: from [195.159.176.226] (port=48144 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLrCj-0006aC-7g for help-gnu-emacs@gnu.org; Fri, 16 Jun 2017 09:22:25 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dLrCb-0000fN-CY for help-gnu-emacs@gnu.org; Fri, 16 Jun 2017 15:22:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 57 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:gve0vLEs/ZDT9o2as0Rsb2prFR8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113488 Archived-At: Marcin Borkowski wrote: > so I finally got to the place wen I want to > declutter my modeline. A big part of it is > EMMS' artist/song info. I really do not need > that (especially that I control EMMS from > a hydra which displays that anyway), but some > short indication whether EMMS is > playing/paused/stopped would be nice. Is that > possible without surgery on EMMS' > source code? EMMS should have a format string to do that. If it doesn't, some surgery is perhaps called for. But you can set it up any way you like. Here is an example. Looks really messy but the result is a very clean mode line. I think I have the most minimalistic one possible save for disabling the mode line altogether. Here is a dump: http://user.it.uu.se/~embe8573/pics/mode-line-example.png (setq-default mode-line-format `(" " (:eval (when (eq major-mode 'Buffer-menu-mode) (format-time-string " %H:%M"))) (:eval (unless (or buffer-read-only (member major-mode '( erc-mode inferior-emacs-lisp-mode message-mode shell-mode ))) mode-line-modified)) " " (:eval (cl-case major-mode ('Buffer-menu-mode "") ('message-mode (buffer-name)) ('w3m-mode (format "%s . %s" w3m-current-title w3m-current-url)) (t (cond (dired-directory dired-directory) (buffer-file-name (abbreviate-file-name buffer-file-name)) (t mode-line-buffer-identification) )))) " " (show-modes mode-line-modes) (line-number-mode "[%l] ") (column-number-mode "{%c} ") )) All code: http://user.it.uu.se/~embe8573/conf/emacs-init/mode-line.el -- underground experts united http://user.it.uu.se/~embe8573