From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package proposal: visual-path-abbrev.el Date: Tue, 05 Mar 2019 18:21:30 +0200 Message-ID: <83va0xcmwl.fsf@gnu.org> References: <87tvglpmcx.fsf@gnu.org> <83k1hhh5mb.fsf@gnu.org> <874l8k47fi.fsf@gnu.org> <83imx0f0x0.fsf@gnu.org> <87k1hg6jl3.fsf@gnu.org> <83h8ciecub.fsf@gnu.org> <8736o1iqsf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="243792"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 05 17:21:42 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 1h1Cp4-0011I2-M3 for ged-emacs-devel@m.gmane.org; Tue, 05 Mar 2019 17:21:42 +0100 Original-Received: from localhost ([127.0.0.1]:45297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1Cp2-0003mv-Vz for ged-emacs-devel@m.gmane.org; Tue, 05 Mar 2019 11:21:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1Cow-0003me-GY for emacs-devel@gnu.org; Tue, 05 Mar 2019 11:21:35 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1Cov-0000se-Io for emacs-devel@gnu.org; Tue, 05 Mar 2019 11:21:33 -0500 Original-Received: from [176.228.60.248] (port=3502 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h1Cov-0006v8-1J; Tue, 05 Mar 2019 11:21:33 -0500 In-reply-to: <8736o1iqsf.fsf@gnu.org> (message from Tassilo Horn on Tue, 05 Mar 2019 11:01:04 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:233851 Archived-At: > From: Tassilo Horn > Cc: emacs-devel@gnu.org > Date: Tue, 05 Mar 2019 11:01:04 +0100 > > > Caveat: I didn't try any of my suggestions, so I cannot be sure they > > will work, although they should, of course. (I did add the above > > caveats to the ELisp manual, so they are now documented.) > > I'm now using option 1 and set the visual-file-name-abbrev overlay > property which I'm using to know which overlays are mine to (random) > instead of just t on the current and the last file name point was one in > a post-command-hook function. > > That seems to do the trick I'm glad it worked for you. > although it's a bit sluggish when, e.g., pressing and holding C-n in > a *grep* buffer in column 1 (which is probably the worst case). > > I haven't yet debugged what's the slow part but I guess it is the new > predicate `visual-file-name-abbrev--abbrev-visually-shorter-p' which > ensures that the abbreviation is only displayed if it is visually > shorter than the normal file name, i.e., it takes into account the > current font and the replacement ellipsis. The standard one … is > twice as wide as a "normal" character on a non-terminal frame. It is, of course, best to make functions on post-command-hook as speedy as possible. But don't be surprised if you find out that is not the main reason for the sluggishness: you've just disabled a very important redisplay optimization, so you should expect some hit on the responsiveness front. These optimizations are there for a reason, even in these days of super-fast CPUs. > Other than that, do you think it's ok to add this package to ELPA? If > so, is the (C) FSF and "This file is part of GNU Emacs" correct for an > ELPA(-only) package? I'll let Stefan answer this. And I believe we have recently started asking contributors to say explicitly in email or in the file that they contribute the package to Emacs, for legal purposes. So please do. Thanks.