From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Perry E. Metzger" Newsgroups: gmane.emacs.devel Subject: Re: Advice needed on modeline customization hack... Date: Sun, 16 Apr 2017 09:49:29 -0400 Message-ID: <20170416094929.51e94c82@jabberwock.cb.piermont.com> References: <20170415212800.5be89037@jabberwock.cb.piermont.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1492350609 26447 195.159.176.226 (16 Apr 2017 13:50:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Apr 2017 13:50:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 16 15:50:06 2017 Return-path: Envelope-to: ged-emacs-devel@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 1czkZ3-0006kt-Bp for ged-emacs-devel@m.gmane.org; Sun, 16 Apr 2017 15:50:05 +0200 Original-Received: from localhost ([::1]:60614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czkZ9-0000bd-81 for ged-emacs-devel@m.gmane.org; Sun, 16 Apr 2017 09:50:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czkYV-0000bM-Gt for emacs-devel@gnu.org; Sun, 16 Apr 2017 09:49:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czkYU-00076p-Jp for emacs-devel@gnu.org; Sun, 16 Apr 2017 09:49:31 -0400 Original-Received: from hacklheber.piermont.com ([2001:470:30:84:e276:63ff:fe62:3400]:51192) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1czkYU-00075w-Gb for emacs-devel@gnu.org; Sun, 16 Apr 2017 09:49:30 -0400 Original-Received: from snark.cb.piermont.com (localhost [127.0.0.1]) by hacklheber.piermont.com (Postfix) with ESMTP id C432215C; Sun, 16 Apr 2017 09:49:29 -0400 (EDT) Original-Received: from jabberwock.cb.piermont.com (jabberwock.cb.piermont.com [10.160.2.107]) by snark.cb.piermont.com (Postfix) with ESMTP id 672E82DE021; Sun, 16 Apr 2017 09:49:29 -0400 (EDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:470:30:84:e276:63ff:fe62:3400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213999 Archived-At: On Sat, 15 Apr 2017 23:11:28 -0400 Stefan Monnier wrote: > I suggest adding a function `mode-line-substitute` which traverses > the mode-line-format looking for particular elements to replace with > something else. So the user can do something like > > (mode-line-substitute "%c" "%C") Looking at what might be involved there to do this correctly (given that one would want to be able to match arbitrary mode line list elements etc. and the mode line format is nontrivial.) I think I'll make that function a back burner project and just add another knob instead. The big question for me right now is what to name the knob, believe it or not. Perry -- Perry E. Metzger perry@piermont.com