Gnus development mailing list
 help / color / mirror / Atom feed
* jump and select
@ 1998-02-28 21:19 Dan Christensen
  1998-03-01 12:57 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Christensen @ 1998-02-28 21:19 UTC (permalink / raw)


The following patch adds an optional argument to
gnus-group-jump-to-group which asks it to select the group it is
jumping to.  So if the user types `C-u j', he or she will be
prompted for a group-name which will then be selected.

1) Is this a good way to get this functionality?

2) If so, can this patch be applied?

Dan

*** gnus-group.el	Sat Feb 28 16:03:13 1998
--- gnus-group.el.orig	Sat Feb 28 15:58:30 1998
***************
*** 1619,1649 ****
  	    group)
  	;;(error nil)
  	(quit nil)))))
  
! (defun gnus-group-jump-to-group (group &optional select)
    "Jump to newsgroup GROUP."
    (interactive
     (list (completing-read
  	  "Group: " gnus-active-hashtb nil
  	  (gnus-read-active-file-p)
  	  nil
! 	  'gnus-group-history) 
! 	 current-prefix-arg))
  
    (when (equal group "")
      (error "Empty group name"))
  
!   (if select
!       (gnus-group-read-group t t group)
!     (unless (gnus-ephemeral-group-p group)
      ;; Either go to the line in the group buffer...
      (unless (gnus-group-goto-group group)
        ;; ... or insert the line.
        (gnus-group-update-group group)
        (gnus-group-goto-group group)))
    ;; Adjust cursor point.
!   (gnus-group-position-point)))
  
  (defun gnus-group-goto-group (group &optional far)
    "Goto to newsgroup GROUP.
  If FAR, it is likely that the group is not on the current line."
--- 1619,1646 ----
  	    group)
  	;;(error nil)
  	(quit nil)))))
  
! (defun gnus-group-jump-to-group (group)
    "Jump to newsgroup GROUP."
    (interactive
     (list (completing-read
  	  "Group: " gnus-active-hashtb nil
  	  (gnus-read-active-file-p)
  	  nil
! 	  'gnus-group-history)))
  
    (when (equal group "")
      (error "Empty group name"))
  
!   (unless (gnus-ephemeral-group-p group)
      ;; Either go to the line in the group buffer...
      (unless (gnus-group-goto-group group)
        ;; ... or insert the line.
        (gnus-group-update-group group)
        (gnus-group-goto-group group)))
    ;; Adjust cursor point.
!   (gnus-group-position-point))
  
  (defun gnus-group-goto-group (group &optional far)
    "Goto to newsgroup GROUP.
  If FAR, it is likely that the group is not on the current line."


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

end of thread, other threads:[~1998-03-01 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-28 21:19 jump and select Dan Christensen
1998-03-01 12:57 ` Lars Magne Ingebrigtsen
1998-03-01 17:01   ` Dan Christensen

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 NNTP newsgroup(s).