unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 16e705b: Make sure elided long buffer names have ellipses added (Bug#24972)
       [not found] ` <20161122074808.974112201C5@vcs.savannah.gnu.org>
@ 2016-11-22 13:17   ` Stefan Monnier
  2016-11-23 17:01     ` Mark Oteiza
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2016-11-22 13:17 UTC (permalink / raw)
  To: emacs-devel; +Cc: Mark Oteiza

> -		`(truncate-string-to-width
> -		  ,strvar strlen nil nil
> -		  ,ellipsis))
> +		`(concat
> +		  (truncate-string-to-width
> +                   ,strvar (- strlen (string-width ,ellipsis)) nil ?.)
> +                  ,ellipsis))

Hmm... why was this needed?


        Stefan "maybe it should be fixed in truncate-string-to-width instead"



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Emacs-diffs] master 16e705b: Make sure elided long buffer names have ellipses added (Bug#24972)
  2016-11-22 13:17   ` [Emacs-diffs] master 16e705b: Make sure elided long buffer names have ellipses added (Bug#24972) Stefan Monnier
@ 2016-11-23 17:01     ` Mark Oteiza
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Oteiza @ 2016-11-23 17:01 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 22/11/16 at 08:17am, Stefan Monnier wrote:
> > -		`(truncate-string-to-width
> > -		  ,strvar strlen nil nil
> > -		  ,ellipsis))
> > +		`(concat
> > +		  (truncate-string-to-width
> > +                   ,strvar (- strlen (string-width ,ellipsis)) nil ?.)
> > +                  ,ellipsis))
> 
> Hmm... why was this needed?
> 
> 
>         Stefan "maybe it should be fixed in truncate-string-to-width instead"

Your guess would probably be better than mine.  Perhaps I needed to
/add/ the length of the ellipsis to strlen in the removed code?  I was
quite ready to rip my hair out trying to make sense of all that ibuffer
machinery.  Horribly untestable the way it's written as well.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-23 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20161122074808.5832.60015@vcs.savannah.gnu.org>
     [not found] ` <20161122074808.974112201C5@vcs.savannah.gnu.org>
2016-11-22 13:17   ` [Emacs-diffs] master 16e705b: Make sure elided long buffer names have ellipses added (Bug#24972) Stefan Monnier
2016-11-23 17:01     ` Mark Oteiza

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).