all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ambrose Laing <aklaing@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to return to the position from where I did tags-query-replace?
Date: Sat, 3 Feb 2018 14:27:15 -0800 (PST)	[thread overview]
Message-ID: <2f9fe1c0-f382-47d4-8df2-0b39d3645385@googlegroups.com> (raw)
In-Reply-To: <mailman.388.1189029337.18990.help-gnu-emacs@gnu.org>

I would like the same outcome as the original poster: I would like for tags-query-replace to always return to the position of the point when the command was invoked, except that I want it to happen programmatically.  Here are two approaches I tried, neither of which works.  In each case, if I run the commands manually, it does what I want, but if I put the commands into the function, it doesn't work.

(defun my-tags-query-replace ()
  (interactive)
  (point-to-register "a")
  (command-execute 'tags-query-replace)
  (jump-to-register "a"))

(defun my-tags-query-replace ()
  (interactive)
  (bc-set)
  (command-execute 'tags-query-replace)
  (bc-goto-current)
  (setq *bc-bookmarks* (cdr *bc-bookmarks*)))

Any ideas how to do this correctly?
Thanks you,
Ambrose


  parent reply	other threads:[~2018-02-03 22:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05 18:33 How to return to the position from where I did tags-query-replace? Yevgeniy Makarov
2007-09-05 21:41 ` Eric Hanchrow
     [not found] ` <mailman.388.1189029337.18990.help-gnu-emacs@gnu.org>
2018-02-03 22:27   ` Ambrose Laing [this message]
2018-02-04  3:28     ` Emanuel Berg
2018-02-04  4:30       ` Emanuel Berg
2018-02-04  4:34         ` Emanuel Berg
2018-02-04  4:46         ` Emanuel Berg
2018-02-04 20:14           ` aklaing
2018-02-04 20:25             ` Emanuel Berg
2018-02-04 20:36               ` Emanuel Berg
2018-02-04 20:37               ` aklaing
2018-02-04 20:41                 ` Emanuel Berg
2018-02-04 20:52                   ` aklaing
2018-02-04 21:02                     ` Emanuel Berg
2018-02-04 20:29             ` aklaing
2018-02-04 20:38               ` Emanuel Berg

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=2f9fe1c0-f382-47d4-8df2-0b39d3645385@googlegroups.com \
    --to=aklaing@gmail.com \
    --cc=help-gnu-emacs@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 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.