Gnus development mailing list
 help / color / mirror / Atom feed
* Group Line Specification Problem
@ 1998-10-15 15:22 Jean-Yves Perrier
  1998-10-16  9:51 ` Jean-Yves Perrier
  0 siblings, 1 reply; 5+ messages in thread
From: Jean-Yves Perrier @ 1998-10-15 15:22 UTC (permalink / raw)


Hello,

I have the following problem:

I want my group buffer to looks like:

[ Gnus -- 0 ]
  [ misc -- 0 ]
*        0: other                    |                    ++++|  (nnml:)
         *: drafts                   |                      ++|  (nndraft:)
  [ Emacs -- 0 ]
    [ Mail/News/AddressBook/Calendar/W3 -- 0 ]
*          0: gnu.emacs.gnus         |          ..............|  (nntp:cachou)
*          0: gnus.dev               |                     +++|  (nnml:)
*          0: bbdb.dev               |                     +++|  (nnml:)
    [ Windoze -- 0 ]
*          0: nt.emacs               |                    ++++|  (nnml:)
  [ OOP -- 0 ]
*        0: oo.gang-of-4-patterns    |                     +++|  (nnml:)

(Don't worry about the . and the +: it is a timestamp histogramm).

I have the following group line definition:
(setq gnus-group-line-format "%M%S%p%P%5y: %(%~(pad-right 25)G%)|%24uz|  %l%z\n")

But this don't take into account the 'folding' of the topic. So I end up with:
[ Gnus -- 0 ]
  [ misc -- 0 ]
*        0: other                    |                    ++++|  (nnml:)
         *: drafts                   |                      ++|  (nndraft:)
  [ Emacs -- 0 ]
    [ Mail/News/AddressBook/Calendar/W3 -- 0 ]
*          0: gnu.emacs.gnus           |          ..............|  (nntp:cachou)
*          0: gnus.dev                 |                     +++|  (nnml:)
*          0: bbdb.dev                 |                     +++|  (nnml:)
    [ Windoze -- 0 ]		       
*          0: nt.emacs                 |                    ++++|  (nnml:)
  [ OOP -- 0 ]
*        0: oo.gang-of-4-patterns    |                     +++|  (nnml:)

				     ^^^
                                     That's the problem.

which I find ugly.

Is there a way, probably in the definition of %(%~(pad-right 25)G%), to take
in account the folding indent?

Best regards,
-- 
Jean-Yves



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

* Re: Group Line Specification Problem
  1998-10-15 15:22 Group Line Specification Problem Jean-Yves Perrier
@ 1998-10-16  9:51 ` Jean-Yves Perrier
  1998-10-16 10:08   ` Didier Verna
  1998-10-17 21:07   ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Jean-Yves Perrier @ 1998-10-16  9:51 UTC (permalink / raw)


Ok,

I'm now trying to write a specific function to do this kind of unindent. In order to do
that I need to know the current indent on a group line.

I've tried to play with gnus-topic-group-indentation, gnus-group-group-indentation, but
I didn't succeed.

Any idea(s)?
-- 
Jean-Yves



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

* Re: Group Line Specification Problem
  1998-10-16  9:51 ` Jean-Yves Perrier
@ 1998-10-16 10:08   ` Didier Verna
  1998-10-16 10:25     ` Jean-Yves Perrier
  1998-10-17 21:07   ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 5+ messages in thread
From: Didier Verna @ 1998-10-16 10:08 UTC (permalink / raw)


Jean-Yves Perrier <perrier@nagra-kudelski.ch> writes:

> Ok,
> 
> I'm now trying to write a specific function to do this kind of unindent. In
> order to do that I need to know the current indent on a group line.
> 
> I've tried to play with gnus-topic-group-indentation,
> gnus-group-group-indentation, but I didn't succeed.

	I faced the problem of Topic indentation too, and the only thing I
found to take it into account was to use `(current-column)' in my user-defined 
function. Here it is. It's very stupid, but enough for my own use. What would
be nice is to have something like a `flush' post-processing command, to flush
everything after it on the right of the window.


;; This is to flush the output to the right (a constant column).
(defun gnus-user-format-function-g (dummy)
  (let ((length (- (current-fill-column) 15 (current-column))))
    (if (<= length 0)
	" "
      (make-string length ? ))
    ))


-- 
    /     /   _   _       Didier Verna        http://www.inf.enst.fr/~verna/
 - / / - / / /_/ /      E.N.S.T. INF C201.1      mailto:verna@inf.enst.fr
/_/ / /_/ / /__ /        46 rue Barrault        Tel.   (33) 01 45 81 73 46
                      75634 Paris  cedex 13     Fax.   (33) 01 45 81 31 19


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

* Re: Group Line Specification Problem
  1998-10-16 10:08   ` Didier Verna
@ 1998-10-16 10:25     ` Jean-Yves Perrier
  0 siblings, 0 replies; 5+ messages in thread
From: Jean-Yves Perrier @ 1998-10-16 10:25 UTC (permalink / raw)


>>>>> "Didier" == Didier Verna <verna@inf.enst.fr> writes:
    Didier> ;; This is to flush the output to the right (a constant column).

It did the trick, thanks!
-- 
Jean-Yves



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

* Re: Group Line Specification Problem
  1998-10-16  9:51 ` Jean-Yves Perrier
  1998-10-16 10:08   ` Didier Verna
@ 1998-10-17 21:07   ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-10-17 21:07 UTC (permalink / raw)


Jean-Yves Perrier <perrier@nagra-kudelski.ch> writes:

> I'm now trying to write a specific function to do this kind of
> unindent. In order to do that I need to know the current indent on a
> group line.

I've thought about adding a "tab" spec that would say "go to column
x", but I've not written that.  It's non-trivial because of the
(optimized) way text props are added to the lines.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~1998-10-17 21:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-15 15:22 Group Line Specification Problem Jean-Yves Perrier
1998-10-16  9:51 ` Jean-Yves Perrier
1998-10-16 10:08   ` Didier Verna
1998-10-16 10:25     ` Jean-Yves Perrier
1998-10-17 21:07   ` Lars Magne Ingebrigtsen

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