From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: Error in post-command-hook (completion-in-region--postch): (wrong-type-argument stringp nil) Date: Fri, 24 Aug 2012 15:07:54 +0200 Message-ID: <87y5l430b9.fsf@zigzag.favinet> References: <87393cd7cu.fsf@thinkpad.tsdh.de> <87393c4oah.fsf@zigzag.favinet> <87txvsbkkm.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1345813709 28091 80.91.229.3 (24 Aug 2012 13:08:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2012 13:08:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 24 15:08:30 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T4tci-0001E6-Sv for ged-emacs-devel@m.gmane.org; Fri, 24 Aug 2012 15:08:29 +0200 Original-Received: from localhost ([::1]:56719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4tch-00010a-64 for ged-emacs-devel@m.gmane.org; Fri, 24 Aug 2012 09:08:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4tce-00010H-3j for emacs-devel@gnu.org; Fri, 24 Aug 2012 09:08:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4tcZ-0000wI-C4 for emacs-devel@gnu.org; Fri, 24 Aug 2012 09:08:24 -0400 Original-Received: from smtp209.alice.it ([82.57.200.105]:55040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4tcZ-0000ub-0T for emacs-devel@gnu.org; Fri, 24 Aug 2012 09:08:19 -0400 Original-Received: from zigzag.favinet (87.5.65.210) by smtp209.alice.it (8.6.023.02) id 500F3F9E01EB8798 for emacs-devel@gnu.org; Fri, 24 Aug 2012 15:07:57 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1T4tcK-0001H1-0K for emacs-devel@gnu.org; Fri, 24 Aug 2012 15:08:04 +0200 In-Reply-To: <87txvsbkkm.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Fri, 24 Aug 2012 13:23:05 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.105 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152803 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Tassilo Horn () Fri, 24 Aug 2012 13:23:05 +0200 > Does =E2=80=98nrepl-send-string=E2=80=99 change the current buffer? No. > The same questions could apply to any of the functions involved. Did you check the other functions? (If not, before you do, see below.) > [use =E2=80=98message=E2=80=99] Sorry, i was not clear. I would use =E2=80=98message=E2=80=99 in several p= laces, each w/ a unique format string (to avoid Emacs combining them in *Messages*), to trace the execution path. That would help answer some aux questions: Did the function finish? Did it return the form as expected? I tried that, and message always said I'm in the buffer I was supposed to be in, even though the next message was the error. To be super-safe I added (assert (eq major-mode 'clojure-mode)) before every single form of my function! Right now, I only have one clojure-mode buffer open. The original post-command-hook error still occurs, but the assertions are always true anyhow. So it doesn't seem to be caused by being in the wrong buffer... With the series-of-=E2=80=98message=E2=80=99 calls "instrumentation", i wou= ld expand the set of interesting state to check other assumptions. I see several vars that are =E2=80=98let=E2=80=99-bound in minibuffer.el that are good candida= tes. Sort of in parallel (maybe you found a bug in Emacs!), i would also try a trivial func that does no computation and returns constant, known data, likewise "instrumented", to validate the completion machinery. Did you already do that? =2D-=20 Thien-Thi Nguyen ..................................... GPG key: 4C807502 . NB: ttn at glug dot org is not me . . (and has not been since 2007 or so) . . ACCEPT NO SUBSTITUTES . ........... please send technical questions to mailing lists ........... --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlA3fK0ACgkQZwMiJEyAdQLpdgCgyl89lHhybnRh8eCzxLoyhn/k pJgAoJv4PIgTQGzzQ/9zYe/5nRuCGCjB =1nKM -----END PGP SIGNATURE----- --=-=-=--