all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* speedbar: speedbar-up-directory
@ 2006-07-12 13:27 harry meyers
  2006-07-14  8:14 ` Klaus Berndl
  0 siblings, 1 reply; 5+ messages in thread
From: harry meyers @ 2006-07-12 13:27 UTC (permalink / raw)


Hi,

I did not use speedbar for a long time, but the preceeding post
reminded me of that handy feature. For some things it can be really
helpfull, but I find its behaviour kind of weird. Every time I do a
speedbar-up-directory speedbar jumps to the next directory but jumps
back at the same speed.  Same thing when I click on the directory name.
 No way to reach another directory that way. Only thing I can do is a
C-x d to change the directory.
Any pointers to that?

harry

PS: I use emacs-snapshot (that ist 22) from debian unstable

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

* Re: speedbar: speedbar-up-directory
@ 2006-07-13  9:13 martin rudalics
  0 siblings, 0 replies; 5+ messages in thread
From: martin rudalics @ 2006-07-13  9:13 UTC (permalink / raw)
  Cc: help-gnu-emacs

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

 > Hi,
 >
 > I did not use speedbar for a long time, but the preceeding post
 > reminded me of that handy feature. For some things it can be really
 > helpfull, but I find its behaviour kind of weird. Every time I do a
 > speedbar-up-directory speedbar jumps to the next directory but jumps
 > back at the same speed.  Same thing when I click on the directory name.
 >  No way to reach another directory that way. Only thing I can do is a
 > C-x d to change the directory.
 > Any pointers to that?
 >
 > harry
 >
 > PS: I use emacs-snapshot (that ist 22) from debian unstable

I think there's a couple of bugs in speedbar.el and dframe.el.  I posted
the attached fix at <emacs-devel@gnu.org> please try whether it works.

[-- Attachment #2: speedbar-dframe.patch --]
[-- Type: text/plain, Size: 12205 bytes --]

*** dframe.el	Tue Apr 11 16:23:48 2006
--- dframe.el	Thu Jul 13 09:56:02 2006
***************
*** 164,172 ****
  ;;; Variables
  ;;
  (defgroup dframe nil
!   "Faces used in dframe."
    :prefix "dframe-"
!   :group 'dframe)

  (defvar dframe-have-timer-flag
    (and (or (fboundp 'run-with-idle-timer)
--- 164,174 ----
  ;;; Variables
  ;;
  (defgroup dframe nil
!   "Dedicated frames management."
    :prefix "dframe-"
!   :group 'frames
!   :group 'speedbar
!   :version "22.1")

  (defvar dframe-have-timer-flag
    (and (or (fboundp 'run-with-idle-timer)
***************
*** 187,193 ****
  Updates occur to allow dframe to display directory information
  relevant to the buffer you are currently editing."
    :group 'dframe
!   :type 'integer)

  (defcustom dframe-activity-change-focus-flag nil
    "*Non-nil means the selected frame will change based on activity.
--- 189,199 ----
  Updates occur to allow dframe to display directory information
  relevant to the buffer you are currently editing."
    :group 'dframe
!   :type 'integer
!   :set (lambda (sym val)
! 	 (set-default sym val)
!          (when (and val (fboundp 'dframe-set-timer-internal)
!            (dframe-set-timer-internal val t)))))

  (defcustom dframe-activity-change-focus-flag nil
    "*Non-nil means the selected frame will change based on activity.

*** speedbar.el	Tue Jun  6 19:20:26 2006
--- speedbar.el	Thu Jul 13 10:16:46 2006
***************
*** 320,336 ****
    :group 'speedbar
    :type 'boolean)

! ;;; EVENTUALLY REMOVE THESE

! ;; When I moved to a repeating timer, I had the horrible missfortune
! ;; of loosing the ability for adaptive speed choice.  This update
! ;; speed currently causes long delays when it should have been turned off.
! (defvar speedbar-update-speed dframe-update-speed
!   "*Obsoleted variable.  Use `dframe-update-speed'.")
! 
! (defvar speedbar-navigating-speed dframe-update-speed
!   "*Obsoleted variable.  Use `dframe-update-speed'.")
! ;;; END REMOVE THESE

  (defcustom speedbar-frame-parameters '((minibuffer . nil)
  				       (width . 20)
--- 320,340 ----
    :group 'speedbar
    :type 'boolean)

! (defcustom speedbar-update-speed dframe-update-speed
!   "*Idle time in seconds needed before speedbar will update itself.
! Updates occur to allow speedbar to display directory information
! relevant to the buffer you are currently editing."
!   :group 'speedbar
!   :type 'integer
!   :set (lambda (sym val)
! 	 (set-default sym val)
!          (when (and val (fboundp 'speedbar-set-timer)
! 		    (boundp 'speedbar-buffer) speedbar-buffer)
! 	   (with-current-buffer speedbar-buffer
! 	     (speedbar-set-timer val)))))

! (defvar speedbar-navigating-speed speedbar-update-speed
!   "*Obsoleted variable.  Use `speedbar-update-speed' instead.")

  (defcustom speedbar-frame-parameters '((minibuffer . nil)
  				       (width . 20)
***************
*** 915,921 ****
  		     (looking-at "[0-9]+: *\\[[+-]\\] [^ \n]+ \\*?[!#]$"))]
      )
    "Additional menu items while in file-mode.")
!  
  (defvar speedbar-easymenu-definition-trailer
    (append
     (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
--- 919,925 ----
  		     (looking-at "[0-9]+: *\\[[+-]\\] [^ \n]+ \\*?[!#]$"))]
      )
    "Additional menu items while in file-mode.")
! 
  (defvar speedbar-easymenu-definition-trailer
    (append
     (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
***************
*** 1008,1014 ****
        (speedbar-set-timer nil)
      (speedbar-reconfigure-keymaps)
      (speedbar-update-contents)
!     (speedbar-set-timer dframe-update-speed)
      )
    ;; Frame modifications
    (set (make-local-variable 'dframe-delete-frame-function)
--- 1012,1018 ----
        (speedbar-set-timer nil)
      (speedbar-reconfigure-keymaps)
      (speedbar-update-contents)
!     (speedbar-set-timer speedbar-update-speed)
      )
    ;; Frame modifications
    (set (make-local-variable 'dframe-delete-frame-function)
***************
*** 1158,1164 ****
  ;; Backwards compatibility
  (defalias 'speedbar-with-attached-buffer 'dframe-with-attached-buffer)
  (defalias 'speedbar-maybee-jump-to-attached-frame 'dframe-maybee-jump-to-attached-frame)
!  
  (defun speedbar-set-mode-line-format ()
    "Set the format of the mode line based on the current speedbar environment.
  This gives visual indications of what is up.  It EXPECTS the speedbar
--- 1162,1168 ----
  ;; Backwards compatibility
  (defalias 'speedbar-with-attached-buffer 'dframe-with-attached-buffer)
  (defalias 'speedbar-maybee-jump-to-attached-frame 'dframe-maybee-jump-to-attached-frame)
! 
  (defun speedbar-set-mode-line-format ()
    "Set the format of the mode line based on the current speedbar environment.
  This gives visual indications of what is up.  It EXPECTS the speedbar
***************
*** 1422,1428 ****
      (speedbar-update-contents)
      (speedbar-stealthy-updates)
      ;; Reset the timer in case it got really hosed for some reason...
!     (speedbar-set-timer dframe-update-speed)
      (if (<= 1 speedbar-verbosity-level)
  	(speedbar-message "Refreshing speedbar...done"))))

--- 1426,1432 ----
      (speedbar-update-contents)
      (speedbar-stealthy-updates)
      ;; Reset the timer in case it got really hosed for some reason...
!     (speedbar-set-timer speedbar-update-speed)
      (if (<= 1 speedbar-verbosity-level)
  	(speedbar-message "Refreshing speedbar...done"))))

***************
*** 1674,1680 ****
    (interactive)
    (setq speedbar-update-flag t)
    (speedbar-set-mode-line-format)
!   (speedbar-set-timer dframe-update-speed))

  (defun speedbar-disable-update ()
    "Disable automatic updating and stop consuming resources."
--- 1678,1684 ----
    (interactive)
    (setq speedbar-update-flag t)
    (speedbar-set-mode-line-format)
!   (speedbar-set-timer speedbar-update-speed))

  (defun speedbar-disable-update ()
    "Disable automatic updating and stop consuming resources."
***************
*** 2055,2061 ****
  			    (if tag-button-function 'speedbar-highlight-face nil)
  			    tag-button-function tag-button-data))
      ))
!   
  (defun speedbar-change-expand-button-char (char)
    "Change the expansion button character to CHAR for the current line."
    (save-excursion
--- 2059,2065 ----
  			    (if tag-button-function 'speedbar-highlight-face nil)
  			    tag-button-function tag-button-data))
      ))
! 
  (defun speedbar-change-expand-button-char (char)
    "Change the expansion button character to CHAR for the current line."
    (save-excursion
***************
*** 2454,2460 ****
    (speedbar-insert-generic-list indent lst
  				'speedbar-tag-expand
  				'speedbar-tag-find))
! 				
  (defun speedbar-insert-etags-list (indent lst)
    "At level INDENT, insert the etags generated LST."
    (speedbar-insert-generic-list indent lst
--- 2458,2464 ----
    (speedbar-insert-generic-list indent lst
  				'speedbar-tag-expand
  				'speedbar-tag-find))
! 
  (defun speedbar-insert-etags-list (indent lst)
    "At level INDENT, insert the etags generated LST."
    (speedbar-insert-generic-list indent lst
***************
*** 2721,2727 ****
    "Go to the line where FILE is."

    (set-buffer speedbar-buffer)
!   
    (goto-char (point-min))
    (let ((m nil))
      (while (and (setq m (re-search-forward
--- 2725,2731 ----
    "Go to the line where FILE is."

    (set-buffer speedbar-buffer)
! 
    (goto-char (point-min))
    (let ((m nil))
      (while (and (setq m (re-search-forward
***************
*** 3212,3218 ****
      (widen)
      (let ((rf (speedbar-fetch-replacement-function 'speedbar-line-directory)))
        (if rf (funcall rf depth) default-directory))))
!       
  (defun speedbar-files-line-directory (&optional depth)
    "Retrieve the directoryname associated with the current line.
  This may require traversing backwards from DEPTH and combining the default
--- 3216,3222 ----
      (widen)
      (let ((rf (speedbar-fetch-replacement-function 'speedbar-line-directory)))
        (if rf (funcall rf depth) default-directory))))
! 
  (defun speedbar-files-line-directory (&optional depth)
    "Retrieve the directoryname associated with the current line.
  This may require traversing backwards from DEPTH and combining the default
***************
*** 3297,3308 ****
  	  (forward-char -2)
  	  (speedbar-do-function-pointer))
        (error (speedbar-position-cursor-on-line)))))
!   
  (defun speedbar-flush-expand-line ()
    "Expand the line under the cursor and flush any cached information."
    (interactive)
    (speedbar-expand-line 1))
!   
  (defun speedbar-contract-line ()
    "Contract the line under the cursor."
    (interactive)
--- 3301,3312 ----
  	  (forward-char -2)
  	  (speedbar-do-function-pointer))
        (error (speedbar-position-cursor-on-line)))))
! 
  (defun speedbar-flush-expand-line ()
    "Expand the line under the cursor and flush any cached information."
    (interactive)
    (speedbar-expand-line 1))
! 
  (defun speedbar-contract-line ()
    "Contract the line under the cursor."
    (interactive)
***************
*** 3370,3376 ****
      ;; Reset the timer with a new timeout when cliking a file
      ;; in case the user was navigating directories, we can cancel
      ;; that other timer.
!     (speedbar-set-timer dframe-update-speed))
    (dframe-maybee-jump-to-attached-frame))

  (defun speedbar-dir-follow (text token indent)
--- 3374,3380 ----
      ;; Reset the timer with a new timeout when cliking a file
      ;; in case the user was navigating directories, we can cancel
      ;; that other timer.
!     (speedbar-set-timer speedbar-update-speed))
    (dframe-maybee-jump-to-attached-frame))

  (defun speedbar-dir-follow (text token indent)
***************
*** 3387,3393 ****
    ;; in case.
    (let ((speedbar-smart-directory-expand-flag nil))
      (speedbar-update-contents))
!   (speedbar-set-timer speedbar-navigating-speed)
    (setq speedbar-last-selected-file nil)
    (speedbar-stealthy-updates))

--- 3391,3397 ----
    ;; in case.
    (let ((speedbar-smart-directory-expand-flag nil))
      (speedbar-update-contents))
!   (speedbar-set-timer speedbar-update-speed)
    (setq speedbar-last-selected-file nil)
    (speedbar-stealthy-updates))

***************
*** 3452,3458 ****
    ;; update contents will change directory without
    ;; having to touch the attached frame.
    (speedbar-update-contents)
!   (speedbar-set-timer speedbar-navigating-speed))

  (defun speedbar-tag-file (text token indent)
    "The cursor is on a selected line.  Expand the tags in the specified file.
--- 3456,3462 ----
    ;; update contents will change directory without
    ;; having to touch the attached frame.
    (speedbar-update-contents)
!   (speedbar-set-timer speedbar-update-speed))

  (defun speedbar-tag-file (text token indent)
    "The cursor is on a selected line.  Expand the tags in the specified file.
***************
*** 3491,3497 ****
      ;; Reset the timer with a new timeout when cliking a file
      ;; in case the user was navigating directories, we can cancel
      ;; that other timer.
!     (speedbar-set-timer dframe-update-speed)
      (goto-char token)
      (run-hooks 'speedbar-visiting-tag-hook)
      (dframe-maybee-jump-to-attached-frame)
--- 3495,3501 ----
      ;; Reset the timer with a new timeout when cliking a file
      ;; in case the user was navigating directories, we can cancel
      ;; that other timer.
!     (speedbar-set-timer speedbar-update-speed)
      (goto-char token)
      (run-hooks 'speedbar-visiting-tag-hook)
      (dframe-maybee-jump-to-attached-frame)
***************
*** 3551,3561 ****
  interested in."

    (save-selected-window
!   
      (select-window (get-buffer-window speedbar-buffer t))
!     
      (set-buffer speedbar-buffer)
!     
      (if (<= (count-lines (point-min) (point-max))
  	    (1- (window-height (selected-window))))
  	;; whole buffer fits
--- 3555,3565 ----
  interested in."

    (save-selected-window
! 
      (select-window (get-buffer-window speedbar-buffer t))
! 
      (set-buffer speedbar-buffer)
! 
      (if (<= (count-lines (point-min) (point-max))
  	    (1- (window-height (selected-window))))
  	;; whole buffer fits


[-- Attachment #3: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: speedbar: speedbar-up-directory
  2006-07-12 13:27 speedbar: speedbar-up-directory harry meyers
@ 2006-07-14  8:14 ` Klaus Berndl
  2006-07-14  8:54   ` Lothar Braun
       [not found]   ` <mailman.4088.1152867274.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Klaus Berndl @ 2006-07-14  8:14 UTC (permalink / raw)



No a solution: maybe you could give a try to ECB - the Emacs code browser
which offers similar features as speedbar with another paradigm: Running all
special windows within one frame - see: http://ecb-sf.net (Section
screenshots)

Klaus

On 12 Jul 2006, harry meyers wrote:



>  Hi,
>  
>  I did not use speedbar for a long time, but the preceeding post
>  reminded me of that handy feature. For some things it can be really
>  helpfull, but I find its behaviour kind of weird. Every time I do a
>  speedbar-up-directory speedbar jumps to the next directory but jumps
>  back at the same speed.  Same thing when I click on the directory name.
>   No way to reach another directory that way. Only thing I can do is a
>  C-x d to change the directory.
>  Any pointers to that?
>  
>  harry
>  
>  PS: I use emacs-snapshot (that ist 22) from debian unstable

-- 
Klaus Berndl			mailto: klaus.berndl@sdm.de
sd&m AG				http://www.sdm.de
software design & management	
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220

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

* Re: speedbar: speedbar-up-directory
  2006-07-14  8:14 ` Klaus Berndl
@ 2006-07-14  8:54   ` Lothar Braun
       [not found]   ` <mailman.4088.1152867274.9609.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Lothar Braun @ 2006-07-14  8:54 UTC (permalink / raw)


On Fri, 2006-07-14 at 10:14 +0200, Klaus Berndl wrote:
>  see: http://ecb-sf.net

It is http://ecb.sf.net (typo) :)

-- Lothar

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

* Re: speedbar: speedbar-up-directory
       [not found]   ` <mailman.4088.1152867274.9609.help-gnu-emacs@gnu.org>
@ 2006-07-16 12:04     ` harry meyers
  0 siblings, 0 replies; 5+ messages in thread
From: harry meyers @ 2006-07-16 12:04 UTC (permalink / raw)



Thanks for the pointer to ecb. Not only it is exactly what I was
looking for, the installation also solved the problem with speedbar:
for ecb I had to install the cedet tools and they come along with a
properly working speedbar.

harry

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

end of thread, other threads:[~2006-07-16 12:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-12 13:27 speedbar: speedbar-up-directory harry meyers
2006-07-14  8:14 ` Klaus Berndl
2006-07-14  8:54   ` Lothar Braun
     [not found]   ` <mailman.4088.1152867274.9609.help-gnu-emacs@gnu.org>
2006-07-16 12:04     ` harry meyers
  -- strict thread matches above, loose matches on Subject: below --
2006-07-13  9:13 martin rudalics

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.