From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.bugs Subject: bug#21683: 25.0.50; `advice-add` doesn't work for compiled primitive functions Date: Mon, 19 Oct 2015 17:51:46 +0200 Message-ID: <874mhmrh4d.fsf@gmail.com> References: <87wpuqi5cg.fsf@gmail.com> <56240E56.3080504@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445269944 24518 80.91.229.3 (19 Oct 2015 15:52:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2015 15:52:24 +0000 (UTC) Cc: Philipp Stephani , 21683@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 19 17:52:14 2015 Return-path: Envelope-to: geb-bug-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 1ZoCjM-00073f-7t for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Oct 2015 17:52:12 +0200 Original-Received: from localhost ([::1]:40378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoCjL-0007q9-Da for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Oct 2015 11:52:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoCjF-0007pq-AG for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2015 11:52:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoCjC-0006G5-3j for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2015 11:52:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoCjC-0006Fz-0G for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2015 11:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZoCjB-0002XF-Pe for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2015 11:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vitalie Spinu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Oct 2015 15:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21683 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21683-submit@debbugs.gnu.org id=B21683.14452699119721 (code B ref 21683); Mon, 19 Oct 2015 15:52:01 +0000 Original-Received: (at 21683) by debbugs.gnu.org; 19 Oct 2015 15:51:51 +0000 Original-Received: from localhost ([127.0.0.1]:56921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoCj0-0002Wi-Jq for submit@debbugs.gnu.org; Mon, 19 Oct 2015 11:51:50 -0400 Original-Received: from mail-wi0-f175.google.com ([209.85.212.175]:37728) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoCiy-0002Wa-Ls for 21683@debbugs.gnu.org; Mon, 19 Oct 2015 11:51:49 -0400 Original-Received: by wicfv8 with SMTP id fv8so12354448wic.0 for <21683@debbugs.gnu.org>; Mon, 19 Oct 2015 08:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=YcYXRHjysywex45QP593WpKIcDX2D1M2hTrmrlBgKIA=; b=H9zDVj7b8Y6pf9M54z7doz5MAbNyh85+sE4wMgRkia5xEfMIGQuQJZplPb3Mhd4YNx wff/g2Gf91H1/1xyJmBME4pVmL8CRAnM0fSvqRaAppt7L7geKQsGN8vcZUn3sOooGJYc C87v3TBOtNs0txZx33nZzjkFdGgtQUHaVi7X0EgBUdKAa94t4Rq519OFxxLhJFeL4+2m pwqfx85aMz1ShhWYuHRVq/SBszx9fM7wlKrbo40+uhyCT1Mtgv2g1yD5krt11GHOvU47 4cU1lJKF08wt3JJcO1aYoI5sRYnMDk0tbfVf6s/1tMBV2bB0nQOXAA+jVZ+25AWpVE07 jS4A== X-Received: by 10.180.87.194 with SMTP id ba2mr21388372wib.11.1445269907946; Mon, 19 Oct 2015 08:51:47 -0700 (PDT) Original-Received: from localhost ([143.176.214.220]) by smtp.gmail.com with ESMTPSA id ld5sm40958560wjc.18.2015.10.19.08.51.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 08:51:46 -0700 (PDT) In-Reply-To: <56240E56.3080504@dancol.org> (Daniel Colascione's message of "Sun, 18 Oct 2015 14:25:42 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107762 Archived-At: >> On Sun, Oct 18 2015 14:25, Daniel Colascione wrote: > On 10/18/2015 02:16 PM, Philipp Stephani wrote: >> This is documented behavior: Well, conceptually the call is from elisp, even if it's a compiled code. What is technically happening in the compiled code shouldn't be the user's concern. I think that piece of documentation should be nuanced that advice doesn't work in compiled elisp calls. I took me 4 hours to figure out why my font-lock code was chaotically working here and not there. > I just haven't had a good reason to want to advise a primitive, but if someone > wants to do this work, I wouldn't object to it. I am trying hard to make polymode [1] functional for complex sub-modes like c-lang. For that I need to restrict `widen` and `parse-partial-sexp` in order for the sub-mode to have an illusion that a region of a buffer is a whole buffer. > If we wanted to allow advising of primitives such that we also redirect direct > calls from C, it wouldn't be that hard: That would be so great! Vitalie [1] https://github.com/vspinu/polymode/