all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: How to change overlay arrow position silently?
Date: Mon, 10 Aug 2009 01:55:33 +0300	[thread overview]
Message-ID: <87iqgw1wkq.fsf@mail.jurta.org> (raw)
In-Reply-To: <jwvhbwn8ox4.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 04 Aug 2009 13:38:33 -0400")

>> Its docstring says it can be used non-interactively:
>
>>   When called from Lisp code, the optional argument BUFFER
>>   ==========================
>>   specifies a buffer to switch to.
>
> It seems like even this `buffer' argument is very much an "interactive"
> feature since it causes the buffer to be displayed, which may cause new
> windows/frames to be created.
>
> Makes me wonder: does any code use this `buffer' argument?  My guess is
> that it's only used by things like the command-line-arg processing
> (and/or the emacs-server).  We had better make it more clear: do not use
> it from Elisp unless you know what you're doing (i.e. add it to
> byte-compile-interactive-only-functions).

I can't find any code that uses this `buffer' argument, but there are
more than 150 places in Emacs that call this `goto-line' function.
So we can't easily prohibit using it non-interactively.  But I think
there is no harm when using non-interactively.  A similar function
"goto-char" has interactive/non-interactive duality with no problem.

The only problem with "goto-line" is that it sets the mark and prints
the message "Mark set".  Using a new argument `interactivep' will allow
the programmer to decide where to do this.  When a command is just
a wrapper around the `goto-line' (like the command `View-goto-line')
then it should call `goto-line' with interactivep=t.

-- 
Juri Linkov
http://www.jurta.org/emacs/




  reply	other threads:[~2009-08-09 22:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-02 13:01 How to change overlay arrow position silently? Dmitry Dzhus
2009-08-02 13:57 ` Johan Bockgård
2009-08-03  0:14   ` Juri Linkov
2009-08-04 17:38     ` Stefan Monnier
2009-08-09 22:55       ` Juri Linkov [this message]
2009-08-10  2:41         ` Stefan Monnier

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=87iqgw1wkq.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.