emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New package proposal: visual-path-abbrev.el


From: Eli Zaretskii
Subject: Re: [ELPA] New package proposal: visual-path-abbrev.el
Date: Sat, 02 Mar 2019 13:34:36 +0200

> From: Tassilo Horn <address@hidden>
> Date: Sat, 02 Mar 2019 12:05:50 +0100
> 
> I've just written a small minor mode which abbreviates file paths
> visually by using overlays.  When point enters such an overlay, the path
> is shown normally again.

The GNU Coding Style conventions frown on using "path" for anything
but PATH-style directory lists.  I think you mean "file names" here.

> - Sometimes when scrolling fast and then stopping, only parts of the
>   visible buffer portion got the overlays applied.  You can try
>   triggering that problem by enabling the mode in a *grep* buffer and
>   then scrolling a long way.

Your code seems to update the overlays in a function called from
post-command-hook, but post-command-hook runs before redisplay updates
the window due to last command.  So you are using stale window-start
and window-end values, and if the last command scrolls some file names
into the view, those file names might not have overlays on them.

I think the preferred method is to use jit-lock-register to register
your function; see e.g. glasses.el for how this can be done.

> - When lines are wrapped around and line-move-visual is t, the mode can
>   make the line short enough so that it doesn't wrap anymore.  But
>   still next-line moves point to where it would belong if the mode were
>   not active, i.e., point jumps to somewhere on the same line.

That sounds like a bug, so a minimal recipe to reproduce this (in a
bug report, please ;-) would be appreciated.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]