* Infinite Loop with org-mode and speedbar with cc-mode
@ 2008-11-18 12:43 Rolf Unger
2008-11-18 13:58 ` Carsten Dominik
0 siblings, 1 reply; 4+ messages in thread
From: Rolf Unger @ 2008-11-18 12:43 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]
Hi,
I am using org-mode in version 6.09a and ran into a problem
with speedbar and cc-mode. And I don't want to drop one of
these modes, because all three of them are great tools and
essential for my daily work.
The emacs version that I am using is for win32:
GNU Emacs 22.3.1 (i386-mingw-nt5.0.2195)
of 2008-09-06 on SOFT-MJASON
I can't navigate from the speedbar frame to functions or
methods in the source code file. In my case speedbar is based
on imenu, not on the TAGS file.
If I use imenu directly (M-x imenu and completion to find the
functions there is no problem), but when started from
speedbar, emacs eats up all the CPU resources and I need
to interrupt it with C-g.
If I enable debug-on-quit I get the attached backtraces
for a plain c-file and for a java file. I send them as
attachments for the sake of the linebreaks, because several
lines are rather long.
I am quite sure, that I am stuck in an infinite loop.
Other modes that are not based on cc-mode like perl-mode or
sql-mode don't show this behaviour. And I did my tests with
several kind of c source files, even a minimalistic hello-world
has this problem:
-------------------- plain.c --------------------------
#include <stdio.h>
int main( int argc, char *argv[])
{
printf("Hello, World!\n");
return 0;
}
my setup for org-mode is:
(require 'org-install))
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-ct" 'org-todo-list)
(setq org-agenda-files (list "~/org"))
(setq org-archive-location "done/%s::* Finished Tasks")
(require 'remember)
(org-remember-insinuate)
(setq org-directory "~/org")
(setq org-default-notes-file (concat org-directory "/notes.org"))
(global-set-key "\C-cr" 'org-remember)
(global-set-key "\C-cc" 'remember-clipboard)
Thanks, Rolf.
[-- Attachment #2: org-backtrace.txt --]
[-- Type: text/plain, Size: 2669 bytes --]
GNU Emacs 22.3.1 (i386-mingw-nt5.0.2195)
of 2008-09-06 on SOFT-MJASON
org-mode version: 6.09a
Debugger entered--Lisp error: (quit)
(if siblings-p (progn (org-show-siblings)))
(when siblings-p (org-show-siblings))
(while (and (condition-case nil ... ...) (not ...)) (org-flag-heading nil) (when siblings-p (org-show-siblings)))
(save-excursion (while (and ... ...) (org-flag-heading nil) (when siblings-p ...)))
(progn (save-excursion (while ... ... ...)))
(if hierarchy-p (progn (save-excursion ...)))
(when hierarchy-p (save-excursion (while ... ... ...)))
(catch (quote exit) (if (and heading-p ...) (org-flag-heading nil) (and ... ...)) (when following-p (save-excursion ...)) (when siblings-p (org-show-siblings)) (when hierarchy-p (save-excursion ...)))
(let ((heading-p ...) (hierarchy-p ...) (following-p ...) (entry-p ...) (siblings-p ...)) (catch (quote exit) (if ... ... ...) (when following-p ...) (when siblings-p ...) (when hierarchy-p ...)))
org-show-context(org-goto)
(lambda nil (org-show-context (quote org-goto)))()
run-hooks(speedbar-visiting-tag-hook)
speedbar-tag-find("cmSetFont" #<marker at 12106 in Display.c> 2)
speedbar-do-function-pointer()
speedbar-edit-line()
call-interactively(speedbar-edit-line)
Debugger entered--Lisp error: (quit)
outline-up-heading(1 t)
(if (fboundp (quote outline-up-heading-all)) (outline-up-heading-all arg) (outline-up-heading arg t))
org-up-heading-all(1)
(progn (org-up-heading-all 1) t)
(condition-case nil (progn (org-up-heading-all 1) t) (error nil))
(and (condition-case nil (progn ... t) (error nil)) (not (bobp)))
(while (and (condition-case nil ... ...) (not ...)) (org-flag-heading nil) (when siblings-p (org-show-siblings)))
(save-excursion (while (and ... ...) (org-flag-heading nil) (when siblings-p ...)))
(progn (save-excursion (while ... ... ...)))
(if hierarchy-p (progn (save-excursion ...)))
(when hierarchy-p (save-excursion (while ... ... ...)))
(catch (quote exit) (if (and heading-p ...) (org-flag-heading nil) (and ... ...)) (when following-p (save-excursion ...)) (when siblings-p (org-show-siblings)) (when hierarchy-p (save-excursion ...)))
(let ((heading-p ...) (hierarchy-p ...) (following-p ...) (entry-p ...) (siblings-p ...)) (catch (quote exit) (if ... ... ...) (when following-p ...) (when siblings-p ...) (when hierarchy-p ...)))
org-show-context(org-goto)
(lambda nil (org-show-context (quote org-goto)))()
run-hooks(speedbar-visiting-tag-hook)
speedbar-tag-find("MenuBar" #<marker at 525 in MenuBar.java> 1)
speedbar-do-function-pointer()
speedbar-edit-line()
call-interactively(speedbar-edit-line)
[-- Attachment #3: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: 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] 4+ messages in thread
* Re: Infinite Loop with org-mode and speedbar with cc-mode
2008-11-18 12:43 Infinite Loop with org-mode and speedbar with cc-mode Rolf Unger
@ 2008-11-18 13:58 ` Carsten Dominik
2008-11-18 14:46 ` Rolf Unger
0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2008-11-18 13:58 UTC (permalink / raw)
To: Rolf Unger; +Cc: emacs-orgmode
Hi Rolf,
does this patch help?
Best wishes.
- Carsten Dominik
------------------------------------------------------------------------------------
diff -u org.el.orig org.el
--- org.el.orig 2008-11-18 14:54:12.000000000 +0100
+++ org.el 2008-11-18 14:54:54.000000000 +0100
@@ -14510,7 +14510,7 @@
(define-key speedbar-file-key-map ">" 'org-agenda-remove-
restriction-lock)
(define-key speedbar-file-key-map "\C-c\C-x>" 'org-agenda-
remove-restriction-lock)
(add-hook 'speedbar-visiting-tag-hook
- (lambda () (org-show-context 'org-goto)))))
+ (lambda () (and (org-mode-p) (org-show-context 'org-
goto))))))
;;; Fixes and Hacks for problems with other packages
-----------------------------------------------------------------------------------
On Nov 18, 2008, at 1:43 PM, Rolf Unger wrote:
> Hi,
>
> I am using org-mode in version 6.09a and ran into a problem
> with speedbar and cc-mode. And I don't want to drop one of
> these modes, because all three of them are great tools and
> essential for my daily work.
>
> The emacs version that I am using is for win32:
>
> GNU Emacs 22.3.1 (i386-mingw-nt5.0.2195)
> of 2008-09-06 on SOFT-MJASON
>
> I can't navigate from the speedbar frame to functions or
> methods in the source code file. In my case speedbar is based
> on imenu, not on the TAGS file.
>
> If I use imenu directly (M-x imenu and completion to find the
> functions there is no problem), but when started from
> speedbar, emacs eats up all the CPU resources and I need
> to interrupt it with C-g.
>
> If I enable debug-on-quit I get the attached backtraces
> for a plain c-file and for a java file. I send them as
> attachments for the sake of the linebreaks, because several
> lines are rather long.
>
> I am quite sure, that I am stuck in an infinite loop.
>
> Other modes that are not based on cc-mode like perl-mode or
> sql-mode don't show this behaviour. And I did my tests with
> several kind of c source files, even a minimalistic hello-world
> has this problem:
>
> -------------------- plain.c --------------------------
> #include <stdio.h>
>
> int main( int argc, char *argv[])
> {
> printf("Hello, World!\n");
> return 0;
> }
>
> my setup for org-mode is:
>
> (require 'org-install))
>
> (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> (global-set-key "\C-cl" 'org-store-link)
> (global-set-key "\C-ca" 'org-agenda)
> (global-set-key "\C-ct" 'org-todo-list)
>
> (setq org-agenda-files (list "~/org"))
> (setq org-archive-location "done/%s::* Finished Tasks")
>
> (require 'remember)
> (org-remember-insinuate)
> (setq org-directory "~/org")
> (setq org-default-notes-file (concat org-directory "/notes.org"))
> (global-set-key "\C-cr" 'org-remember)
> (global-set-key "\C-cc" 'remember-clipboard)
>
> Thanks, Rolf.
>
> GNU Emacs 22.3.1 (i386-mingw-nt5.0.2195)
> of 2008-09-06 on SOFT-MJASON
>
> org-mode version: 6.09a
>
> Debugger entered--Lisp error: (quit)
> (if siblings-p (progn (org-show-siblings)))
> (when siblings-p (org-show-siblings))
> (while (and (condition-case nil ... ...) (not ...)) (org-flag-
> heading nil) (when siblings-p (org-show-siblings)))
> (save-excursion (while (and ... ...) (org-flag-heading nil) (when
> siblings-p ...)))
> (progn (save-excursion (while ... ... ...)))
> (if hierarchy-p (progn (save-excursion ...)))
> (when hierarchy-p (save-excursion (while ... ... ...)))
> (catch (quote exit) (if (and heading-p ...) (org-flag-heading nil)
> (and ... ...)) (when following-p (save-excursion ...)) (when
> siblings-p (org-show-siblings)) (when hierarchy-p (save-
> excursion ...)))
> (let ((heading-p ...) (hierarchy-p ...) (following-p ...) (entry-
> p ...) (siblings-p ...)) (catch (quote exit) (if ... ... ...) (when
> following-p ...) (when siblings-p ...) (when hierarchy-p ...)))
> org-show-context(org-goto)
> (lambda nil (org-show-context (quote org-goto)))()
> run-hooks(speedbar-visiting-tag-hook)
> speedbar-tag-find("cmSetFont" #<marker at 12106 in Display.c> 2)
> speedbar-do-function-pointer()
> speedbar-edit-line()
> call-interactively(speedbar-edit-line)
>
> Debugger entered--Lisp error: (quit)
> outline-up-heading(1 t)
> (if (fboundp (quote outline-up-heading-all)) (outline-up-heading-
> all arg) (outline-up-heading arg t))
> org-up-heading-all(1)
> (progn (org-up-heading-all 1) t)
> (condition-case nil (progn (org-up-heading-all 1) t) (error nil))
> (and (condition-case nil (progn ... t) (error nil)) (not (bobp)))
> (while (and (condition-case nil ... ...) (not ...)) (org-flag-
> heading nil) (when siblings-p (org-show-siblings)))
> (save-excursion (while (and ... ...) (org-flag-heading nil) (when
> siblings-p ...)))
> (progn (save-excursion (while ... ... ...)))
> (if hierarchy-p (progn (save-excursion ...)))
> (when hierarchy-p (save-excursion (while ... ... ...)))
> (catch (quote exit) (if (and heading-p ...) (org-flag-heading nil)
> (and ... ...)) (when following-p (save-excursion ...)) (when
> siblings-p (org-show-siblings)) (when hierarchy-p (save-
> excursion ...)))
> (let ((heading-p ...) (hierarchy-p ...) (following-p ...) (entry-
> p ...) (siblings-p ...)) (catch (quote exit) (if ... ... ...) (when
> following-p ...) (when siblings-p ...) (when hierarchy-p ...)))
> org-show-context(org-goto)
> (lambda nil (org-show-context (quote org-goto)))()
> run-hooks(speedbar-visiting-tag-hook)
> speedbar-tag-find("MenuBar" #<marker at 525 in MenuBar.java> 1)
> speedbar-do-function-pointer()
> speedbar-edit-line()
> call-interactively(speedbar-edit-line)
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: 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] 4+ messages in thread
* Re: Infinite Loop with org-mode and speedbar with cc-mode
2008-11-18 13:58 ` Carsten Dominik
@ 2008-11-18 14:46 ` Rolf Unger
2008-11-18 15:09 ` Carsten Dominik
0 siblings, 1 reply; 4+ messages in thread
From: Rolf Unger @ 2008-11-18 14:46 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Okay Carsten,
thank you, this modification makes it work again.
I have posted this problem before to the gnu.emacs.help
mailing list, because initially I had no clue that it could
be related with org-mode.
I will add a comment there refering to the patch.
Thanks again especially for the impressive response time,
Rolf.
Carsten Dominik wrote:
> Hi Rolf,
>
> does this patch help?
>
>
> Best wishes.
>
> - Carsten Dominik
>
> ------------------------------------------------------------------------------------
>
> diff -u org.el.orig org.el
> --- org.el.orig 2008-11-18 14:54:12.000000000 +0100
> +++ org.el 2008-11-18 14:54:54.000000000 +0100
> @@ -14510,7 +14510,7 @@
> (define-key speedbar-file-key-map ">"
> 'org-agenda-remove-restriction-lock)
> (define-key speedbar-file-key-map "\C-c\C-x>"
> 'org-agenda-remove-restriction-lock)
> (add-hook 'speedbar-visiting-tag-hook
> - (lambda () (org-show-context 'org-goto)))))
> + (lambda () (and (org-mode-p) (org-show-context
> 'org-goto))))))
>
>
> ;;; Fixes and Hacks for problems with other packages
> -----------------------------------------------------------------------------------
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Infinite Loop with org-mode and speedbar with cc-mode
2008-11-18 14:46 ` Rolf Unger
@ 2008-11-18 15:09 ` Carsten Dominik
0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2008-11-18 15:09 UTC (permalink / raw)
To: Rolf Unger; +Cc: emacs-orgmode
I have fixed this in our git repository, and also in CVS emacs.
- Carsten
On Nov 18, 2008, at 3:46 PM, Rolf Unger wrote:
> Okay Carsten,
>
> thank you, this modification makes it work again.
>
> I have posted this problem before to the gnu.emacs.help
> mailing list, because initially I had no clue that it could
> be related with org-mode.
>
> I will add a comment there refering to the patch.
>
> Thanks again especially for the impressive response time,
>
> Rolf.
>
> Carsten Dominik wrote:
>> Hi Rolf,
>>
>> does this patch help?
>>
>>
>> Best wishes.
>>
>> - Carsten Dominik
>>
>> ------------------------------------------------------------------------------------
>>
>> diff -u org.el.orig org.el
>> --- org.el.orig 2008-11-18 14:54:12.000000000 +0100
>> +++ org.el 2008-11-18 14:54:54.000000000 +0100
>> @@ -14510,7 +14510,7 @@
>> (define-key speedbar-file-key-map ">"
>> 'org-agenda-remove-restriction-lock)
>> (define-key speedbar-file-key-map "\C-c\C-x>"
>> 'org-agenda-remove-restriction-lock)
>> (add-hook 'speedbar-visiting-tag-hook
>> - (lambda () (org-show-context 'org-goto)))))
>> + (lambda () (and (org-mode-p) (org-show-context
>> 'org-goto))))))
>>
>>
>> ;;; Fixes and Hacks for problems with other packages
>> -----------------------------------------------------------------------------------
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-18 15:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-18 12:43 Infinite Loop with org-mode and speedbar with cc-mode Rolf Unger
2008-11-18 13:58 ` Carsten Dominik
2008-11-18 14:46 ` Rolf Unger
2008-11-18 15:09 ` Carsten Dominik
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.