emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-mode breaks buffer indexing in sclang-mode
@ 2010-09-12 12:33 James Harkins
  2010-10-04  8:42 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: James Harkins @ 2010-09-12 12:33 UTC (permalink / raw)
  To: emacs-orgmode

As I said before, I'm really enjoying org-mode. I love that I can keep 
all my semester's teaching data in one text file and zoom in right to 
where I want quickly. But, today I found a not-good interaction between 
it and the main programming mode that I use in Emacs (sclang-mode, an 
interactive front end for the supercollider* audio programming language).

Supercollider keeps objects internally for code documents. These are 
connected to Emacs buffers. The sclang-mode lisp code assigns an integer 
index to buffers that supercollider is supposed to know about, and 
passes those indices into the sc interpreter. When I run sclang-mode on 
its own, this is all totally stable. It's also stable if I have an 
org-mode buffer open and I'm editing only.

As soon as org-mode opens a calendar buffer, the sclang interpreter no 
longer knows about its Document buffers -- i.e., when in a buffer that's 
been loaded from disk, the sc code "Document.current.path" should return 
the full path to the file, but after opening the calendar, 
Document.current returns 'nil' and .path fails with an error. This could 
happen if Emacs tells sclang that the buffer closed (but the buffer is 
still open).

This is consistent behavior that I can reproduce on-demand, both in 
Aquamacs 1.9 (OSX) and Emacs 23 on Ubuntu. Opening an agenda view does 
not trigger the problem. It seems to be just the calendar.

Why would opening a calendar buffer to choose a date mess around with 
other modes' buffers?

Not a major, major problem for me but it seems something fishy is going 
on and I thought I would report it.

James

* http://supercollider.sourceforge.net


-- 
James Harkins /// dewdrop world
jamshark70@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks

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

* Re: org-mode breaks buffer indexing in sclang-mode
  2010-09-12 12:33 org-mode breaks buffer indexing in sclang-mode James Harkins
@ 2010-10-04  8:42 ` Carsten Dominik
  2010-10-04 10:07   ` James Harkins
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2010-10-04  8:42 UTC (permalink / raw)
  To: jamshark70; +Cc: emacs-orgmode

Hi James,

does this only happen when Org-mode opens the calendar,
or also when you use M-x calendar?

- Carsten

On Sep 12, 2010, at 2:33 PM, James Harkins wrote:

> As I said before, I'm really enjoying org-mode. I love that I can  
> keep all my semester's teaching data in one text file and zoom in  
> right to where I want quickly. But, today I found a not-good  
> interaction between it and the main programming mode that I use in  
> Emacs (sclang-mode, an interactive front end for the supercollider*  
> audio programming language).
>
> Supercollider keeps objects internally for code documents. These are  
> connected to Emacs buffers. The sclang-mode lisp code assigns an  
> integer index to buffers that supercollider is supposed to know  
> about, and passes those indices into the sc interpreter. When I run  
> sclang-mode on its own, this is all totally stable. It's also stable  
> if I have an org-mode buffer open and I'm editing only.
>
> As soon as org-mode opens a calendar buffer, the sclang interpreter  
> no longer knows about its Document buffers -- i.e., when in a buffer  
> that's been loaded from disk, the sc code "Document.current.path"  
> should return the full path to the file, but after opening the  
> calendar, Document.current returns 'nil' and .path fails with an  
> error. This could happen if Emacs tells sclang that the buffer  
> closed (but the buffer is still open).
>
> This is consistent behavior that I can reproduce on-demand, both in  
> Aquamacs 1.9 (OSX) and Emacs 23 on Ubuntu. Opening an agenda view  
> does not trigger the problem. It seems to be just the calendar.
>
> Why would opening a calendar buffer to choose a date mess around  
> with other modes' buffers?
>
> Not a major, major problem for me but it seems something fishy is  
> going on and I thought I would report it.
>
> James
>
> * http://supercollider.sourceforge.net
>
>
> -- 
> James Harkins /// dewdrop world
> jamshark70@dewdrop-world.net
> http://www.dewdrop-world.net
>
> "Come said the Muse,
> Sing me a song no poet has yet chanted,
> Sing me the universal." -- Whitman
>
> blog: http://www.dewdrop-world.net/words
> audio clips: http://www.dewdrop-world.net/audio
> more audio: http://soundcloud.com/dewdrop_world/tracks
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: org-mode breaks buffer indexing in sclang-mode
  2010-10-04  8:42 ` Carsten Dominik
@ 2010-10-04 10:07   ` James Harkins
  0 siblings, 0 replies; 3+ messages in thread
From: James Harkins @ 2010-10-04 10:07 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1498 bytes --]

On Mon, Oct 4, 2010 at 4:42 PM, Carsten Dominik
<carsten.dominik@gmail.com>wrote:

> Hi James,
>
> does this only happen when Org-mode opens the calendar,
> or also when you use M-x calendar?
>

Ah... I misdiagnosed it. Opening the calendar doesn't cause the problem.
It's after choosing the date to insert as a timestamp or schedule/deadline.
Then org-mode hides the *Calendar* buffer and it's at that point that the
sclang buffers get messed up. (Or maybe it's when the calendar buf inserts
the timestamp into the org-mode buffer - those are indistinguishable from
the user's point of view.)

Couldn't reproduce it with M-x calendar, which doesn't insert a timestamp
AFAICS. That tipped me off... so I retested this way:

1. Open scd file (sclang-mode). Run "Document.current" -- reports "a
ScelDocument."
2. Open org-mode file.
3. C-c ., then C-g (no timestamp insertion).
4. C-x b to the sclang mode doc. Run "Document.current" again -- reports "a
ScelDocument."
5. C-x b to org-mode. C-c . and choose a date.
6. Step 4 again, but now "Document.current" replies "nil." Bingo!

So it breaks when clicking on a date in *Calendar* to add the timestamp.

hjh


-- 
James Harkins /// dewdrop world
jamshark70@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks

[-- Attachment #1.2: Type: text/html, Size: 2335 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2010-10-04 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-12 12:33 org-mode breaks buffer indexing in sclang-mode James Harkins
2010-10-04  8:42 ` Carsten Dominik
2010-10-04 10:07   ` James Harkins

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