unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10803: 24.0.93; execute-kbd-macro doesn't preserve current buffer
@ 2012-02-13 17:24 Jambunathan K
  2012-02-13 18:16 ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Jambunathan K @ 2012-02-13 17:24 UTC (permalink / raw)
  To: 10803, rustompmody


Copy the below snippet to scratch buffer and C-x C-e it.

(with-temp-buffer  
  (message "1:%s" (buffer-name))
  (execute-kbd-macro "ab")
  (message "2:%s" (buffer-name))
  "Done")

This is what gets printed in the message buffer.
1: *temp*<2>
2:*scratch*
"Done"

I am wondering why execute-kbd-macro is meddling with the current
buffer, (that too in not so useful way). 

This bug is raised as a post-mortem of the following thread in
help-gnu-emacs which deals with transliteration from Roman text to
Hindi.

http://lists.gnu.org/archive/html/help-gnu-emacs/2012-02/msg00149.html
http://lists.gnu.org/archive/html/help-gnu-emacs/2012-02/msg00152.html

In GNU Emacs 24.0.93.1 (i386-mingw-nt5.1.2600)
 of 2012-01-30 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include --ldflags
 -LD:/devel/emacs/libs/gnutls-3.0.9/lib'





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10803: 24.0.93; execute-kbd-macro doesn't preserve current buffer
  2012-02-13 17:24 bug#10803: 24.0.93; execute-kbd-macro doesn't preserve current buffer Jambunathan K
@ 2012-02-13 18:16 ` Andreas Schwab
  2012-02-25  4:43   ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2012-02-13 18:16 UTC (permalink / raw)
  To: Jambunathan K; +Cc: rustompmody, 10803

Jambunathan K <kjambunathan@gmail.com> writes:

> I am wondering why execute-kbd-macro is meddling with the current
> buffer, (that too in not so useful way). 

Because it runs the normal comand loop, which always starts with
selecting the current window's buffer.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10803: 24.0.93; execute-kbd-macro doesn't preserve current buffer
  2012-02-13 18:16 ` Andreas Schwab
@ 2012-02-25  4:43   ` Chong Yidong
  2012-03-04  7:32     ` Rustom Mody
  0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2012-02-25  4:43 UTC (permalink / raw)
  To: Jambunathan K; +Cc: rustompmody, Andreas Schwab, 10803

Andreas Schwab <schwab@linux-m68k.org> writes:

> Jambunathan K <kjambunathan@gmail.com> writes:
>
>> I am wondering why execute-kbd-macro is meddling with the current
>> buffer, (that too in not so useful way). 
>
> Because it runs the normal comand loop, which always starts with
> selecting the current window's buffer.

Pretty much.  Since there's been no reponse, I'm closing this in the bug
tracker.  Feel free to reopen if you think it is not resolved.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10803: 24.0.93; execute-kbd-macro doesn't preserve current buffer
  2012-02-25  4:43   ` Chong Yidong
@ 2012-03-04  7:32     ` Rustom Mody
  0 siblings, 0 replies; 4+ messages in thread
From: Rustom Mody @ 2012-03-04  7:32 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Andreas Schwab, Jambunathan K, 10803

[-- Attachment #1: Type: text/plain, Size: 930 bytes --]

On Sat, Feb 25, 2012 at 10:13 AM, Chong Yidong <cyd@gnu.org> wrote:

> Andreas Schwab <schwab@linux-m68k.org> writes:
>
> > Jambunathan K <kjambunathan@gmail.com> writes:
> >
> >> I am wondering why execute-kbd-macro is meddling with the current
> >> buffer, (that too in not so useful way).
> >
> > Because it runs the normal comand loop, which always starts with
> > selecting the current window's buffer.
>
> Pretty much.  Since there's been no reponse, I'm closing this in the bug
> tracker.  Feel free to reopen if you think it is not resolved.
>

This question arose because I was trying to script input methods

http://lists.gnu.org/archive/html/help-gnu-emacs/2012-02/msg00147.html

As of now I get by with running batch emacs scripts without -batch and
having an unnecessary window pop up.
Seems to me there should be a cleaner way; on the other hand emacs is
probably not the tool to run batch scripts so its ok I guess

[-- Attachment #2: Type: text/html, Size: 1523 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-04  7:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-13 17:24 bug#10803: 24.0.93; execute-kbd-macro doesn't preserve current buffer Jambunathan K
2012-02-13 18:16 ` Andreas Schwab
2012-02-25  4:43   ` Chong Yidong
2012-03-04  7:32     ` Rustom Mody

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