unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: raman <raman@google.com>
To: Richard Stallman <rms@gnu.org>
Cc: dpaduchikh@gmail.com, monnier@IRO.UMontreal.CA,
	drew.adams@oracle.com, emacs-devel@gnu.org
Subject: Re: Brittleness of called-interactively-p
Date: Fri, 17 Jul 2015 11:14:35 -0700	[thread overview]
Message-ID: <p91wpxyabxw.fsf@google.com> (raw)
In-Reply-To: <E1ZFus3-0005Ps-1o@fencepost.gnu.org> (Richard Stallman's message of "Thu, 16 Jul 2015 21:55:27 -0400")

I'd love to get rid of my implementation of ems-interactive-p:-)

The behavior I need is best illustrated by a prototypical use case.

When the user presses M-C-f, I want to speak the sexp you moved over.

So I achieve this with an advice on backward-sexp (around advice that:

A. remembers point, 
B. Lets backward-sexp do its work
C Speaks the region between point and the saved position.

Now this advice should only get called when the user presses M-C-f -- or
if it's called by some function by doing (call-interactively
#'backward-sexp )

So in my advice -- and this is consistent in all of emacspeak's advice I
do
(when (ems-interactive-p) ...)

The old interactive-p did this perfectly.

I'm happy to go back and try interactive-p again since Stefan says the
implementations are nearly equivalent between it and
called-interactive-p.

As Drew said earlier on this thread, called-interactively-p is confusing
with respect to how it should be used, and specifically for the
emacspeak use-case, it's unclear   how one calls called-interactively-p
with respect to what args to pass it.
-- 



  parent reply	other threads:[~2015-07-17 18:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-12  5:00 Brittleness of called-interactively-p Dmitri Paduchikh
2015-07-12 13:53 ` Stefan Monnier
2015-07-12 15:17   ` Dmitri Paduchikh
2015-07-12 23:26     ` Stefan Monnier
2015-07-13 15:17       ` Dmitri Paduchikh
2015-07-14 23:24         ` Stefan Monnier
2015-07-16 15:57           ` raman
2015-07-16 17:36             ` Drew Adams
2015-07-16 17:58               ` T.V Raman
2015-07-17  1:55                 ` Richard Stallman
2015-07-17  4:52                   ` Dmitri Paduchikh
2015-07-17 13:36                     ` Dmitri Paduchikh
     [not found]                       ` <jwvpp3qp9dn.fsf-monnier+emacs@gnu.org>
2015-07-18  5:16                         ` Dmitri Paduchikh
2015-07-17 18:15                     ` raman
2015-07-17 18:14                   ` raman [this message]
2015-07-17 19:31                     ` Drew Adams
2015-07-17 23:25                       ` raman
2015-07-18  1:47                         ` Drew Adams
2015-07-20 12:19                       ` Andreas Röhler
2015-07-16 22:55             ` Stefan Monnier
2015-07-17 18:10               ` raman
2015-07-18  0:57                 ` Stefan Monnier
2015-07-18  4:39               ` Dmitri Paduchikh
2015-07-20 12:22                 ` Andreas Röhler
2015-07-20 22:23                 ` Stefan Monnier
2015-08-06 22:30         ` Stefan Monnier
2015-08-06 22:33         ` Stefan Monnier
2015-08-07 13:35           ` Dmitri Paduchikh
2015-08-07 17:18             ` Stefan Monnier
2015-07-18 22:29   ` raman
2015-07-12 21:59 ` Richard Stallman
2015-07-13 15:17   ` Dmitri Paduchikh
2015-07-13 23:03     ` Richard Stallman
2015-08-06 22:36     ` Stefan Monnier
2015-07-17 20:35 ` Przemysław Wojnowski

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=p91wpxyabxw.fsf@google.com \
    --to=raman@google.com \
    --cc=dpaduchikh@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=rms@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.
Code repositories for project(s) associated with this public inbox

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

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).