emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug?: org-agenda-set-property sets property on wrong element
@ 2012-06-28 10:16 Max Mikhanosha
  2012-06-28 10:41 ` Max Mikhanosha
  0 siblings, 1 reply; 2+ messages in thread
From: Max Mikhanosha @ 2012-06-28 10:16 UTC (permalink / raw)
  To: emacs-orgmode


Can someone confirm this, before I try to fix this?

1. Generate agenda
2. Go to some entry A by pressing RET
3. Switch back to agenda, and make sure its the only window (or that
   A's buffer is not in any other window)
4. In Agenda navigate to entry B (in the same buffer as A), and C-c
   C-x p (org-agenda-set-property), use any property name or value

Result: property is set in entry A not in entry B. This is with
org-mode from git, and emacs 23.

The problem seems to be that the code like this (with-current-buffer
buffer (goto-char pos (call-interactively 'some-command)) the point
inside of 'some-command will not be at `pos', but where the user last
moved it, _unless_ the buffer's window is selected window, then
(goto-char) sticks through (call-interactively) boundary.

Could be that there are other pieces of code like this in lurking in
there.

Regards,
  Max

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

* Re: Bug?: org-agenda-set-property sets property on wrong element
  2012-06-28 10:16 Bug?: org-agenda-set-property sets property on wrong element Max Mikhanosha
@ 2012-06-28 10:41 ` Max Mikhanosha
  0 siblings, 0 replies; 2+ messages in thread
From: Max Mikhanosha @ 2012-06-28 10:41 UTC (permalink / raw)
  To: emacs-orgmode

At Thu, 28 Jun 2012 06:16:06 -0400,
Max Mikhanosha wrote:
> 
> The problem seems to be that the code like this (with-current-buffer
> buffer (goto-char pos (call-interactively 'some-command)) the point
> inside of 'some-command will not be at `pos', but where the user last
> moved it, _unless_ the buffer's window is selected window, then
> (goto-char) sticks through (call-interactively) boundary.

Above was wrong, it seems the culprit is anything that uses a
completing read from minibuffer, while inside of (with-current-buffer)
for a buffer that is not visible on any window; after reading from
minibuffer the point is reset back to where user last moved it. I was
able to fix parent message's test case by putting save-excursion around
(org-icompleting-read), but I'm wondering if its my specific setup, or
if anyone else can reproduce this.

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

end of thread, other threads:[~2012-06-28 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-28 10:16 Bug?: org-agenda-set-property sets property on wrong element Max Mikhanosha
2012-06-28 10:41 ` Max Mikhanosha

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).