From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3A548431FC4 for ; Tue, 22 Jan 2013 18:15:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nX94-MfnY3Kc for ; Tue, 22 Jan 2013 18:15:53 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 44FDF431FC0 for ; Tue, 22 Jan 2013 18:15:53 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 889C3100086; Wed, 23 Jan 2013 04:15:42 +0200 (EET) From: Tomi Ollila To: Austin Clements , Damien Cassou , notmuch mailing list Subject: Re: [PATCH 3/4] emacs: possibility to customize the rendering of tags In-Reply-To: <87mww0da71.fsf@awakening.csail.mit.edu> References: <1358525039-13569-1-git-send-email-damien.cassou@gmail.com> <1358525039-13569-4-git-send-email-damien.cassou@gmail.com> <87mww0da71.fsf@awakening.csail.mit.edu> User-Agent: Notmuch/0.15+11~ge1e719d (http://notmuchmail.org) Emacs/24.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2013 02:15:54 -0000 On Wed, Jan 23 2013, Austin Clements wrote: > On Fri, 18 Jan 2013, Damien Cassou wrote: > >> + `(("unread" >> + (:propertize "unread" face >> + (:Foreground "red"))) >> + ("flagged" >> + (:propertize "flagged" display >> + (image :type svg :file >> + ,(expand-file-name >> + "resources/star.svg" >> + (file-name-directory >> + (or >> + (locate-library "notmuch-tagger") >> + (buffer-file-name)))) > > Interesting. Is this a standard way to locate resources? (I've never > had need to.) > > Since there are other icons here as well, perhaps the resources > directory should be bound to a global variable so it's easy to construct > other standard notmuch icon names? You capture this in a function in > patch 4, but that function doesn't obviously accomplish anything a > simple variable wouldn't. I was thinking this too. M-x apropos RET -path RET (apropos "-path") outputs (at least) 2 symbols that are relevant here: image-load-path Variable: List of locations in which to search for image files. Properties: standard-value custom-type custom-requests variable-documentation and image-load-path-for-library Function: Return a suitable search path for images used by LIBRARY. (if the second were used I'd suggest to use 'notmuch' instead of 'notmuch-tagger' -- just to support me who just installs notmuch.elc which is done by concatenating all notmuch .el files together to one notmuch.el file which is then byte-compiled :D) > Another possibility is that these icons could be included directly in > the Elisp source, probably as simplified SVGs (your SVGs look like they > could be cut down to 3 or 4 lines of XML easily) or as XPMs. Besides > skirting issues with resource location, this would make it trivial to > alter their colors based on user preferences. I also had the same 2 things in mind, simplify SVGs and possibly include that directly in the source... Tomi