unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>,
	Emanuel Berg <embe8573@student.uu.se>
Subject: Re: Gnus + emacs.stackexchange
Date: Mon, 11 May 2015 16:03:33 +0100	[thread overview]
Message-ID: <CAAdUY-+_siXm+47_cyNdnCvnaTwzFzUt6oYATFdKsWoA+GpS9g@mail.gmail.com> (raw)
In-Reply-To: <475a32e9-2edf-4aec-bcb6-5f4c693952ea@default>

2015-05-11 14:54 GMT+01:00 Drew Adams <drew.adams@oracle.com>:
>> >>> (wrong-type-argument char-or-string-p nil) in
>> >>> tabulated-list-print
>> >>
>> >> Ok, would you be willing to produce a backtrace?
>> >> (with M-x toggle-debug-on-error)
>> >
>> > This is what it says for `sx-search':
>> >
>> >     Debugger entered--Lisp error: (wrong-type-argument char-or-
>> >                                    string-p nil)
>> >       tabulated-list-print-fake-header()
>> >       tabulated-list-print(remember)
>>
>> Ok. It looks like something is setting your
>> `tabulated-list-use-header-line' variable to nil *between* the
>> buffer initialization and the list printing. So the
>> `tabulated-list--header-string' variable doesn't get set (it's
>> normally set during buffer initialization), but when it's time to
>> print, the variable is expected to be a string.
>> I think that's a bug in tabulated-list-mode (which I'll try to get
>> fixed now), but do you have any hooks or advices that may be causing
>> that?
>
> Check where you call the major (derived) mode, which calls
> `tabulated-list-mode'.  If it calls it after you have already
> inserted the header line then that line will be removed when
> `tabulated-list-mode' (calls `special-mode' which) kills all
> local variables.

Activating the mode is the first thing we do on a new buffer. All
variables are set after that.

And sx has no reference to `tabulated-list-use-header-line' or
`tabulated-list--header-string', which is why I suspect there's a hook
gone rogue somewhere. Of course, I may be wrong.

> IMO, the `tabulated-list-mode' doc is not clear about such
> things.  Put differently, the design of `tabulated-list-mode'
> seems to be a bit fragile.  You need to do things in a specific
> order, which is not well documented.
>
> Caveat: I'm no expert on `tabulated-list-mode'.  Just starting
> to wade through it myself, actually - which is why I think I
> recognize the above error.  When I understand it better I will
> perhaps file a bug report or two - doc or otherwise.

I never had huge problems with this when writing paradox or sx.el.
That said, I was following the lead of `package-menu-mode's
definition, so I can't say how clear the documentation is on its own.

But I do think it's a bug that tabulated-list just barfs if the user
changes a variable to a legal value (even if it's done at the wrong
time). So I'll be fixing that this week.



  reply	other threads:[~2015-05-11 15:03 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2080.1430445013.904.help-gnu-emacs@gnu.org>
2015-05-01  2:10 ` reddit (was: Re: ediff question ...) Emanuel Berg
2015-05-01 12:37   ` reddit Stefan Monnier
2015-05-01 17:42     ` reddit Artur Malabarba
2015-05-01 20:16       ` reddit Stefan Monnier
2015-05-02 10:10         ` reddit Artur Malabarba
     [not found]       ` <mailman.2160.1430511381.904.help-gnu-emacs@gnu.org>
2015-05-02 17:38         ` reddit Emanuel Berg
2015-05-02 17:47           ` reddit Jai Dayal
     [not found]           ` <mailman.2213.1430588900.904.help-gnu-emacs@gnu.org>
2015-05-02 18:59             ` reddit Emanuel Berg
2015-05-02 19:25               ` reddit Jai Dayal
     [not found]               ` <mailman.2217.1430594737.904.help-gnu-emacs@gnu.org>
2015-05-02 23:28                 ` reddit Emanuel Berg
     [not found]     ` <mailman.2133.1430502152.904.help-gnu-emacs@gnu.org>
2015-05-02 17:38       ` reddit Emanuel Berg
2015-05-04  6:53         ` reddit Marcin Borkowski
2015-05-03 18:04     ` reddit Sivaram Neelakantan
     [not found]     ` <mailman.2259.1430676299.904.help-gnu-emacs@gnu.org>
2015-05-03 21:31       ` Gnus + emacs.stackexchange (was: Re: reddit) Emanuel Berg
2015-05-03 21:44         ` Emanuel Berg
2015-05-05  2:32         ` Gnus + emacs.stackexchange Sivaram Neelakantan
2015-05-05  9:07           ` Artur Malabarba
     [not found]           ` <mailman.2372.1430816864.904.help-gnu-emacs@gnu.org>
2015-05-05 16:37             ` Emanuel Berg
2015-05-07  8:54               ` Artur Malabarba
     [not found]               ` <mailman.2526.1430988889.904.help-gnu-emacs@gnu.org>
2015-05-07 22:39                 ` Emanuel Berg
2015-05-07 23:21                   ` Artur Malabarba
2015-05-06  0:45             ` Emanuel Berg
2015-05-07  9:03               ` Artur Malabarba
     [not found]               ` <mailman.2528.1430989397.904.help-gnu-emacs@gnu.org>
2015-05-07 23:33                 ` Emanuel Berg
2015-05-08  9:43                   ` Artur Malabarba
     [not found]                   ` <mailman.2588.1431078198.904.help-gnu-emacs@gnu.org>
2015-05-09 21:08                     ` Emanuel Berg
2015-05-11 12:00                       ` Artur Malabarba
2015-05-11 13:54                         ` Drew Adams
2015-05-11 15:03                           ` Artur Malabarba [this message]
2015-05-11 15:47                             ` Drew Adams
2015-05-11 16:12                               ` Artur Malabarba
2015-05-11 16:12                                 ` Artur Malabarba
2015-05-11 17:11                                 ` Drew Adams
2015-05-05 17:11           ` Sharon Kimble
2015-05-06  3:12             ` Sivaram Neelakantan
2015-05-08 16:23               ` Sivaram Neelakantan
2015-05-08 20:10                 ` Jude DaShiell
2015-05-08 21:48                   ` Artur Malabarba
2015-05-09 11:38                     ` Sivaram Neelakantan
2015-05-09 20:47                 ` Artur Malabarba
2015-05-11 14:55                   ` Sivaram Neelakantan
     [not found]           ` <mailman.2403.1430845873.904.help-gnu-emacs@gnu.org>
2015-05-06  0:30             ` Emanuel Berg
2015-05-06  9:39               ` Ted Zlatanov
2015-05-06 10:22                 ` tomas
2015-05-06 19:31                 ` Emanuel Berg
2015-05-07  9:15                   ` Artur Malabarba
     [not found]                   ` <mailman.2530.1430990129.904.help-gnu-emacs@gnu.org>
2015-05-07 23:58                     ` Emanuel Berg
2015-05-08  9:50                       ` Artur Malabarba
     [not found]                       ` <mailman.2589.1431078643.904.help-gnu-emacs@gnu.org>
2015-05-09 21:29                         ` Emanuel Berg
2015-05-01 19:33   ` reddit (was: Re: ediff question ...) Robert Thorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAdUY-+_siXm+47_cyNdnCvnaTwzFzUt6oYATFdKsWoA+GpS9g@mail.gmail.com \
    --to=bruce.connor.am@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=embe8573@student.uu.se \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).