all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: "Stephen J. Turnbull" <turnbull@sk.tsukuba.ac.jp>
Cc: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: save-excursion again
Date: Sat, 19 Jun 2010 16:58:22 +0200	[thread overview]
Message-ID: <AANLkTinmYVhYEmJ_TJHvedB5-h8yvxZgD0DkKHmmlbD0@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimmjz3yisZzYeFMQpOG5yyeVSyp_srW8lpouXm1@mail.gmail.com>

On Sat, Jun 19, 2010 at 4:56 PM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> On Sat, Jun 19, 2010 at 4:50 PM, Stephen J. Turnbull
> <turnbull@sk.tsukuba.ac.jp> wrote:
>> Uday S Reddy writes:
>>
>> The point is that if
>>
>>    ;; current buffer is "bar"
>>    (save-excursion
>>     (set-buffer "foo")
>>     (frob-current-buffer))
>
>
> Just a simple question from someone that does not understand:
>
> What is wrong with just saving the point in the buffer you are
> interested and then returning to that, i.e.
>
>  (let ((here (point)) ;; maybe (point-marker) sometimes
>    ...
>    (prog1

Eh...

(let ((here (point)))
   ...
   (prog1
        return_value
     (goto-char here)))



  reply	other threads:[~2010-06-19 14:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18  7:42 save-excursion again Uday S Reddy
2010-06-18 13:51 ` Stefan Monnier
2010-06-18 14:02   ` David Kastrup
2010-06-18 15:29     ` Stefan Monnier
2010-06-18 17:16   ` Uday S Reddy
2010-06-18 18:37     ` Stefan Monnier
2010-06-19 14:50     ` Stephen J. Turnbull
2010-06-19 14:56       ` Lennart Borgman
2010-06-19 14:58         ` Lennart Borgman [this message]
2010-06-19 17:23           ` Stephen J. Turnbull
2010-06-19 17:30             ` Lennart Borgman
2010-06-25 21:20             ` Stefan Monnier
2010-06-26  0:40               ` Stephen J. Turnbull
2010-07-01  0:26                 ` Stefan Monnier
2010-07-01  4:34                   ` Stephen J. Turnbull
2010-07-04 17:07                     ` Stefan Monnier
2010-06-26 11:03               ` Uday S Reddy
2010-07-01  0:30                 ` Stefan Monnier
2010-07-01  1:54                   ` Lennart Borgman
2010-07-04 17:08                     ` Stefan Monnier
2010-06-19 16:22       ` Uday S Reddy
2010-06-18 15:04 ` Davis Herring

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=AANLkTinmYVhYEmJ_TJHvedB5-h8yvxZgD0DkKHmmlbD0@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=turnbull@sk.tsukuba.ac.jp \
    --cc=u.s.reddy@cs.bham.ac.uk \
    /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.