unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26317: 26.0.50; Small incompatibility in ibuffer.el (ibuffer-compile-format)
@ 2017-03-30 23:07 John Mastro
  2017-03-30 23:15 ` John Mastro
  0 siblings, 1 reply; 3+ messages in thread
From: John Mastro @ 2017-03-30 23:07 UTC (permalink / raw)
  To: 26317

In commit 7e2a8b1, ibuffer.el was change to use `string-width' in a couple
places where it previously used `length'. The result is that custom columns
which can return nil, which worked in Emacs 25, will now cause an error.

To reproduce, run `emacs -Q', yank the following into *scratch*, and evaluate
it:

    (require 'ibuffer)

    (define-ibuffer-column my-column
      (:name "X")
      (and (equal (buffer-name) "*scratch*") "Y"))

    (setq ibuffer-formats '((mark modified read-only
                                  " " (name 18 18 :left :elide)
                                  " " (my-column 5 5 :left)
                                  " " filename-and-process)))

    (ibuffer)

It works in Emacs 25, but in Emacs 26 an error is signaled:

    Debugger entered--Lisp error: (wrong-type-argument stringp nil)
      string-width(nil)

I came across this because I use the `ibuffer-vc' package, which defines a
column (`vc-status') whose implementation returns nil for some buffers (by
default, non-file-visiting buffers and buffers visiting remote files).

I will follow up with a patch in a separate email (so I can include the bug
number in the commit message).

        John





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

end of thread, other threads:[~2017-03-31  0:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30 23:07 bug#26317: 26.0.50; Small incompatibility in ibuffer.el (ibuffer-compile-format) John Mastro
2017-03-30 23:15 ` John Mastro
2017-03-31  0:25   ` 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).