all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Daniel Sausner <daniel.sausner@posteo.de>
Cc: 52003@debbugs.gnu.org
Subject: bug#52003: Unexpected advising behavior due to recursive implementation
Date: Sun, 21 Nov 2021 12:08:39 +0100	[thread overview]
Message-ID: <FE6F11E7-E6B6-4929-94D4-2A937DCC9F76@acm.org> (raw)
In-Reply-To: <b48e92fa-fe77-c733-d99c-46ffdc4f2408@posteo.de>

21 nov. 2021 kl. 10.32 skrev Daniel Sausner <daniel.sausner@posteo.de>:

> I see. I somehow assumed that functions at that level would aim to be compliant to the max.

Yes but what would that mean? The best we can do is to promise that a function F, when called in a manner consistent with the documentation, behaves accordingly. We cannot guarantee the absence of calls to F, can we?

But unless I'm mistaken, that's what you are unhappy about: `forward-sexp` may call itself when you call it. A lot of other code calls that function as part of their implementation. Don't they cause trouble, or is it just the recursive call?

> Well, I'd say that in that case the non-interactive performance outweighs this particular corner case of advising these core functions, which I came to understand is a hot iron.

The cost of that extra function call is probably going to be lost in the noise. I'm not looking for excuses to avoid work here but would like to know what problem rearranging the code would actually solve. 

> Therefore I'd say this bug report can be closed from my point of view. I guess I still have to use advising as I currently see no other feasible way out, but I can make it sensitive to `interactive` as well.

What are you trying to do? Can't you define a mode-specific forward-sexp-function?






  reply	other threads:[~2021-11-21 11:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-20 16:13 bug#52003: Unexpected advising behavior due to recursive implementation Daniel Sausner
2021-11-20 19:16 ` Mattias Engdegård
2021-11-21  9:32   ` Daniel Sausner
2021-11-21 11:08     ` Mattias Engdegård [this message]
2021-11-21 17:29       ` Daniel Sausner
2021-11-22  9:20         ` Mattias Engdegård

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

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

  git send-email \
    --in-reply-to=FE6F11E7-E6B6-4929-94D4-2A937DCC9F76@acm.org \
    --to=mattiase@acm.org \
    --cc=52003@debbugs.gnu.org \
    --cc=daniel.sausner@posteo.de \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.