From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Phillip Lord Newsgroups: gmane.emacs.help Subject: Re: Catching no generic method in EIEIO Date: Thu, 26 May 2016 16:07:34 +0100 Message-ID: <87mvncg8nd.fsf@russet.org.uk> References: <8760u2gm6c.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1464275426 4087 80.91.229.3 (26 May 2016 15:10:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 May 2016 15:10:26 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 26 17:10:16 2016 Return-path: Envelope-to: geh-help-gnu-emacs@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 1b5wvQ-0001La-Fv for geh-help-gnu-emacs@m.gmane.org; Thu, 26 May 2016 17:10:16 +0200 Original-Received: from localhost ([::1]:38862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5wvP-0003NZ-NO for geh-help-gnu-emacs@m.gmane.org; Thu, 26 May 2016 11:10:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5wtZ-0002Q0-NN for help-gnu-emacs@gnu.org; Thu, 26 May 2016 11:08:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5wtV-000171-Bs for help-gnu-emacs@gnu.org; Thu, 26 May 2016 11:08:20 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:34782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5wtV-0000pN-1B for help-gnu-emacs@gnu.org; Thu, 26 May 2016 11:08:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=NDP2UHEtOfe7FkQMCr9tItvzFJfv3gi//vwLWzEerZU=; b=tplP+OOdOAOoTJ3rmw7+i6TjZI nqGcpXzufGCV2g0oFIxaSblxac4Vbv3FhnezJsoaAI5MpaifjCkp01UP+XE9S2jsQFR3Nj9DT8knW lJojVKEBFcdtKQaTIht0MJB+HwhJmFUzgUSgf0YC2QWDCBIjKkNl6y7cEXLs6bMFEzvdc+nyUbFfq YPlPVv393GHLNuconNBI+8I2hiDdOrUk4Ijnc7bKE+CD4wvuK/bMSdb3nNPCldN3girukHUxp9Lxm W/J9MKDNIIy4mCEvUNpbscd4oB+PDE9xISidlCZfc0wJg9dcd0cTjukY2peNREy5DhaYT6qbTKadK YkEX7pgQ==; Original-Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:40817 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1b5wsp-002zqv-BW; Thu, 26 May 2016 16:07:35 +0100 In-Reply-To: (Stefan Monnier's message of "Wed, 25 May 2016 14:19:21 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 31.216.48.48 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110123 Archived-At: Stefan Monnier writes: >> The last form crashes -- I could, of course, implement this using >> defmethod on Two, but I want to this for any method. > > (defmethod ((o t)) > ...) > > should do the trick. Didn't know you could do that, but it's not what I wanted. It implements the method for all objects. Where was what I wanted was to implement all methods on one object (or class). Not that it matters now, as I have realised I was doing the wrong thing anyway, that inheritance will do what I need. > PS: Of course, I also recommend you switch to cl-generic > (i.e. use (cl-defmethod ...)). It's more featureful and much faster. I'm going to fix all that when I port everything to emacs-25. I'm just waiting till that hits the shelf. Phil