From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Philippe Vaucher Newsgroups: gmane.emacs.devel Subject: Re: tabulated-list sort icon is reversed Date: Thu, 28 Feb 2019 08:55:47 +0100 Message-ID: References: <87d0v1lsns.fsf@fastmail.fm> <532F6D74-E21C-45A2-B85B-01133DE1E8A1@scratch.space> <6e662c5b-3d04-2157-6712-aadcb6077f2b@gmail.com> <83a7j0pzbh.fsf@gnu.org> <83sgwpm92r.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000dc6d220582ef9f8b" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="233084"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 28 08:56:28 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzGYO-000yXb-4y for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2019 08:56:28 +0100 Original-Received: from localhost ([127.0.0.1]:33843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzGYM-0003G6-VC for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2019 02:56:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzGYG-0003Fn-Nz for emacs-devel@gnu.org; Thu, 28 Feb 2019 02:56:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzGYF-0004tJ-LS for emacs-devel@gnu.org; Thu, 28 Feb 2019 02:56:20 -0500 Original-Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]:36632) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzGYC-0004qB-7Z for emacs-devel@gnu.org; Thu, 28 Feb 2019 02:56:16 -0500 Original-Received: by mail-lj1-x229.google.com with SMTP id v10so16282308lji.3 for ; Wed, 27 Feb 2019 23:56:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EBSfWQMp+sqbva2WcPoNu8ONmf6KqyL5M9oINKZP3Ms=; b=MpUp4juneGpfnlwasaBll7uxwpk/vrQV6ZpmC8qRXLFwqaiX2+xeHxc7Ie8MWzGxHI xrlUeFN9Ln4GMhP1JxJfeJksrrsY4zsEH3vjtLR4H0NHi8IhGzWfg7sLlI9i7d2GBGwf F56PUPV8euQNMRUQMtHo/rL24imqjwYhoElsu7buF3wfikcwcWnNbzhI6P2sAFBCW765 /+KP9tu83HzdJzLQWYIaP8IWmwDYTVp4p1SBYP3G4T1CK8Whig5Ub8NljicMBMgk5MpM LY4EoYUi8XKLdjMd6CARadKxUEb2zbeT8bM/EfM883cJWr8trLj5nzC4H9zPra6Y1VwU akdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EBSfWQMp+sqbva2WcPoNu8ONmf6KqyL5M9oINKZP3Ms=; b=QqN3PSVc0VccHvvokXy5gDJMekSAN5oLxPlytfto+5Mo+3tuqzSzFky42OTgoCNix8 AQmYCvoyASNlAiB+ZnvHGlWIhhAixxF2aKwv7LiaAvqZuF/d5UcItkAFjAQsYFpFn8t9 WilBacEeHC8mh8neLR6x3ATmwewMwRGzQt83i1qgssqsu5GWmelg3sZ0lGtpirNUzPIb Tke+NV2USAq/iCq4lM4aeIyoUGqkQ4Fxa8x8BefekwTfpGd2S7kmWBV1b4nm+lBoA65+ oK9mxD1XMXJxbFKTmo6N08P8OHtXZs70tNx5c2lM/6slQnnQr6wq77Qz7YSC2Fz8pWva R84w== X-Gm-Message-State: APjAAAUrKLRWUO3gaB1JKF+laAB8O7Leee6ejqAn2yJgsID2J/KnToDd b6jJrMxSHwruhjlAnbnxoOcX8S0uopaMeVQkjl+AzNvppDk= X-Google-Smtp-Source: APXvYqwWVuF+IxUj8tHkaIcYf9iOq9V6SFKFmGQV4of06rVW+Ff0z4R0ZlIkdeeaq6zkkNnCfa5vUyek5j9X7rlNkjI= X-Received: by 2002:a2e:8315:: with SMTP id a21mr3897019ljh.193.1551340574361; Wed, 27 Feb 2019 23:56:14 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::229 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:233691 Archived-At: --000000000000dc6d220582ef9f8b Content-Type: multipart/alternative; boundary="000000000000dc6d1f0582ef9f89" --000000000000dc6d1f0582ef9f89 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 27, 2019 at 10:27 PM Stefan Monnier wrote: > > +(defcustom tabulated-list-sort-icon-asc " =E2=96=BC" > > +(defcustom tabulated-list-sort-icon-desc " =E2=96=B2" > > +(defcustom tabulated-list-glyphless-sort-icon-asc "v" > > +(defcustom tabulated-list-glyphless-sort-icon-desc "^" > [...] > > - (aset table 9650 (cons nil "^")) > > - (aset table 9660 (cons nil "v")) > > + (aset table 9650 (cons nil tabulated-list-glyphless-sort-icon-desc= )) > > + (aset table 9660 (cons nil tabulated-list-glyphless-sort-icon-asc)= ) > > [ 9650 and 9660 should really have been written ?=E2=96=B2 and ?=E2=96=BC= . ] > > The above code should be changed so that the table's entries that are > set correspond to the chars configured in tabulated-list-sort-icon-*sc. > Thanks, here attached is a patch doing that. I noticed a problem: I can customize the unicode char just fine, but whenever I try to customize the glyphless char and use `emacs -nw` it doesn't work, it still uses "^" or "v". My wild guess is that `glyphless-char-display` is used instead of the custom table... if anyone has an idea... Regards, Philippe --000000000000dc6d1f0582ef9f89 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On = Wed, Feb 27, 2019 at 10:27 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:=
> +(defcusto= m tabulated-list-sort-icon-asc " =E2=96=BC"
> +(defcustom tabulated-list-sort-icon-desc " =E2=96=B2"
> +(defcustom tabulated-list-glyphless-sort-icon-asc "v"
> +(defcustom tabulated-list-glyphless-sort-icon-desc "^"
[...]
> -=C2=A0 =C2=A0 (aset table 9650 (cons nil "^"))
> -=C2=A0 =C2=A0 (aset table 9660 (cons nil "v"))
> +=C2=A0 =C2=A0 (aset table 9650 (cons nil tabulated-list-glyphless-sor= t-icon-desc))
> +=C2=A0 =C2=A0 (aset table 9660 (cons nil tabulated-list-glyphless-sor= t-icon-asc))

[ 9650 and 9660 should really have been written ?=E2=96=B2 and ?=E2=96=BC.= =C2=A0 ]

The above code should be changed so that the table's entries that are set correspond to the chars configured in tabulated-list-sort-icon-*sc.
=

Thanks, here attached is a patch doing tha= t.

I noticed a problem: I can customize the unicod= e char just fine, but whenever I try to customize the glyphless char and us= e `emacs -nw` it doesn't work, it still uses "^"=C2=A0 or &qu= ot;v". My wild guess is that `glyphless-char-display` is used instead = of the custom table... if anyone has an idea...

Re= gards,
Philippe
--000000000000dc6d1f0582ef9f89-- --000000000000dc6d220582ef9f8b Content-Type: text/x-patch; charset="UTF-8"; name="0001-Allow-customization-of-sort-indicators-in-tabulated-.patch" Content-Disposition: attachment; filename="0001-Allow-customization-of-sort-indicators-in-tabulated-.patch" Content-Transfer-Encoding: base64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