Gnus development mailing list
 help / color / mirror / Atom feed
* Topic mode, too limited ?
@ 2011-01-23 14:18 Francis Moreau
  2011-01-23 21:09 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 17+ messages in thread
From: Francis Moreau @ 2011-01-23 14:18 UTC (permalink / raw)
  To: ding

Hi !

I'm using Topic mode to sort my different mailboxes/groups and I find it
too limited.

Mostly because I can use one name for only one topic.

For example I have the following topic hierarchy:

   [ Jobs ]
        [ company-A ]...
        [ company-B ]...

So far so good, but now for each job I have a mailbox, so what I'd like
is:

   [ Jobs ]
        [ company-A ]
           [ Mailbox ]
        [ company-B ]
           [ Mailbox ]

which is currently impossible I think. Same with projects, lists..

Ok I could prefix all sub topics with a prefix (for example the name of
the company) but that doesn't sound right.

Am I missing something ?
-- 
Francis
.



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

* Re: Topic mode, too limited ?
  2011-01-23 14:18 Topic mode, too limited ? Francis Moreau
@ 2011-01-23 21:09 ` Lars Ingebrigtsen
  2011-01-23 22:46   ` Francis Moreau
                     ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-23 21:09 UTC (permalink / raw)
  To: ding

Francis Moreau <francis.moro@gmail.com> writes:

> Am I missing something ?

Nope.  Topic names, like group names, have to be unique in Gnus.

But you could just prefix the topic names and then alter
gnus-topic-line-format not to display the prefix.

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




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

* Re: Topic mode, too limited ?
  2011-01-23 21:09 ` Lars Ingebrigtsen
@ 2011-01-23 22:46   ` Francis Moreau
  2011-01-23 23:08     ` Lars Ingebrigtsen
  2011-01-23 23:12   ` Francis Moreau
  2011-01-24 17:38   ` Ted Zlatanov
  2 siblings, 1 reply; 17+ messages in thread
From: Francis Moreau @ 2011-01-23 22:46 UTC (permalink / raw)
  To: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Francis Moreau <francis.moro@gmail.com> writes:
>
>> Am I missing something ?
>
> Nope.  Topic names, like group names, have to be unique in Gnus.
>
> But you could just prefix the topic names and then alter
> gnus-topic-line-format not to display the prefix.

Or Gnus could do that by default...

   [ Jobs ]
     [ company-a ]
     [ company-b ]

and it could generate internal topic names like this:

    Jobs
    Jobs/company-a
    Jobs/company-b

no ?
-- 
Francis



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

* Re: Topic mode, too limited ?
  2011-01-23 22:46   ` Francis Moreau
@ 2011-01-23 23:08     ` Lars Ingebrigtsen
  2011-01-23 23:25       ` Francis Moreau
  0 siblings, 1 reply; 17+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-23 23:08 UTC (permalink / raw)
  To: ding

Francis Moreau <francis.moro@gmail.com> writes:

> no ?

I think that Gnus should show the actual topic names by default.

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




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

* Re: Topic mode, too limited ?
  2011-01-23 21:09 ` Lars Ingebrigtsen
  2011-01-23 22:46   ` Francis Moreau
@ 2011-01-23 23:12   ` Francis Moreau
  2011-01-24 17:38   ` Ted Zlatanov
  2 siblings, 0 replies; 17+ messages in thread
From: Francis Moreau @ 2011-01-23 23:12 UTC (permalink / raw)
  To: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Francis Moreau <francis.moro@gmail.com> writes:
>
>> Am I missing something ?
>
> Nope.  Topic names, like group names, have to be unique in Gnus.
>
> But you could just prefix the topic names and then alter
> gnus-topic-line-format not to display the prefix.

BTW, how can I do that if for example I want to display the name part of
the topic starting from the end and until I encounter '/' character ?

For example the real topic name is "Jobs/A/B/C", I just want to display
"C".

I was planning to use "User-Defined" specs but I don't know what
parameter will be passed to my format function and I can't find the
answer in the documentation.

Thanks
-- 
Francis



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

* Re: Topic mode, too limited ?
  2011-01-23 23:08     ` Lars Ingebrigtsen
@ 2011-01-23 23:25       ` Francis Moreau
  0 siblings, 0 replies; 17+ messages in thread
From: Francis Moreau @ 2011-01-23 23:25 UTC (permalink / raw)
  To: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Francis Moreau <francis.moro@gmail.com> writes:
>
>> no ?
>
> I think that Gnus should show the actual topic names by default.

Well, Gnus should show the topic names the user entered. But it could
keep its own internal topic names (maybe based on the user ones),
specially if it allows more convenient things...

And I think allowing same topic names in different topic can be quite
useful and intuitive since it gives the same hierarchy as filesystems
give with directories.

Thanks
-- 
Francis



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

* Re: Topic mode, too limited ?
  2011-01-23 21:09 ` Lars Ingebrigtsen
  2011-01-23 22:46   ` Francis Moreau
  2011-01-23 23:12   ` Francis Moreau
@ 2011-01-24 17:38   ` Ted Zlatanov
  2011-01-24 20:21     ` Francis Moreau
  2 siblings, 1 reply; 17+ messages in thread
From: Ted Zlatanov @ 2011-01-24 17:38 UTC (permalink / raw)
  To: ding

On Sun, 23 Jan 2011 22:09:42 +0100 Lars Ingebrigtsen <larsi@gnus.org> wrote: 

LI> Topic names, like group names, have to be unique in Gnus.

`gnus-topic-topology' should be OK with non-unique names.  I think it's
an issue with `gnus-topic-alist' IIUC, and fixing it would require
changing a lot of the topic commands.

Ted





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

* Re: Topic mode, too limited ?
  2011-01-24 17:38   ` Ted Zlatanov
@ 2011-01-24 20:21     ` Francis Moreau
  2011-01-24 20:30       ` Ted Zlatanov
  0 siblings, 1 reply; 17+ messages in thread
From: Francis Moreau @ 2011-01-24 20:21 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Sun, 23 Jan 2011 22:09:42 +0100 Lars Ingebrigtsen <larsi@gnus.org> wrote: 
>
> LI> Topic names, like group names, have to be unique in Gnus.
>
> `gnus-topic-topology' should be OK with non-unique names.

From the manual:

  That variable is saved in the `.newsrc.eld' file, and shouldn't be
  messed with manually--unless you really want to.

Quite frankly, I don't feel bold enough to play with this one...

Altering gnus-topic-line-format to not show the prefix should be ok but
I don't know how to do it.

Thanks
-- 
Francis



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

* Re: Topic mode, too limited ?
  2011-01-24 20:21     ` Francis Moreau
@ 2011-01-24 20:30       ` Ted Zlatanov
  2011-01-24 20:34         ` Francis Moreau
  0 siblings, 1 reply; 17+ messages in thread
From: Ted Zlatanov @ 2011-01-24 20:30 UTC (permalink / raw)
  To: ding

On Mon, 24 Jan 2011 21:21:51 +0100 Francis Moreau <francis.moro@gmail.com> wrote: 

FM> Ted Zlatanov <tzz@lifelogs.com> writes:
>> On Sun, 23 Jan 2011 22:09:42 +0100 Lars Ingebrigtsen <larsi@gnus.org> wrote: 
>> 
LI> Topic names, like group names, have to be unique in Gnus.
>> 
>> `gnus-topic-topology' should be OK with non-unique names.

FM> From the manual:

FM>   That variable is saved in the `.newsrc.eld' file, and shouldn't be
FM>   messed with manually--unless you really want to.

FM> Quite frankly, I don't feel bold enough to play with this one...

FM> Altering gnus-topic-line-format to not show the prefix should be ok but
FM> I don't know how to do it.

I meant that for Lars, meaning that there's one central place where
topic names are assumed to be unique.  Sorry if I confused you, implying
you could edit it yourself.

I have played with gnus-topic-line-format a little and it should be
fairly easy:

;; set the format to use the function below (%i is indentation)
(setq gnus-topic-line-format "%i[ %u&topic-line; ] %v\n")

;; this function will return some string you can use, here it's just the topic name
(defun gnus-user-format-function-topic-line (dummy)
  name)

So you just need to write that function to return some transformation of
the actual topic name.  Then a topic like x.y.z could be transformed to
z or whatever you need.

Ted




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

* Re: Topic mode, too limited ?
  2011-01-24 20:30       ` Ted Zlatanov
@ 2011-01-24 20:34         ` Francis Moreau
  2011-01-24 21:45           ` Ted Zlatanov
  0 siblings, 1 reply; 17+ messages in thread
From: Francis Moreau @ 2011-01-24 20:34 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Mon, 24 Jan 2011 21:21:51 +0100 Francis Moreau <francis.moro@gmail.com> wrote: 
>
> FM> Ted Zlatanov <tzz@lifelogs.com> writes:
>>> On Sun, 23 Jan 2011 22:09:42 +0100 Lars Ingebrigtsen <larsi@gnus.org> wrote: 
>>> 
> LI> Topic names, like group names, have to be unique in Gnus.
>>> 
>>> `gnus-topic-topology' should be OK with non-unique names.
>
> FM> From the manual:
>
> FM>   That variable is saved in the `.newsrc.eld' file, and shouldn't be
> FM>   messed with manually--unless you really want to.
>
> FM> Quite frankly, I don't feel bold enough to play with this one...
>
> FM> Altering gnus-topic-line-format to not show the prefix should be ok but
> FM> I don't know how to do it.
>
> I meant that for Lars, meaning that there's one central place where
> topic names are assumed to be unique.  Sorry if I confused you, implying
> you could edit it yourself.
>
> I have played with gnus-topic-line-format a little and it should be
> fairly easy:
>
> ;; set the format to use the function below (%i is indentation)
> (setq gnus-topic-line-format "%i[ %u&topic-line; ] %v\n")
>
> ;; this function will return some string you can use, here it's just the topic name
> (defun gnus-user-format-function-topic-line (dummy)
>   name)

You're a wizzard !

I mean, how that 'name' symbol came into the picture ?

I haven't find a trace of it in the doc...

-- 
Francis



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

* Re: Topic mode, too limited ?
  2011-01-24 20:34         ` Francis Moreau
@ 2011-01-24 21:45           ` Ted Zlatanov
  2011-01-25  5:39             ` Francis Moreau
  0 siblings, 1 reply; 17+ messages in thread
From: Ted Zlatanov @ 2011-01-24 21:45 UTC (permalink / raw)
  To: ding

On Mon, 24 Jan 2011 21:34:59 +0100 Francis Moreau <francis.moro@gmail.com> wrote: 

FM> Ted Zlatanov <tzz@lifelogs.com> writes:
>> 
>> I have played with gnus-topic-line-format a little and it should be
>> fairly easy:
>> 
>> ;; set the format to use the function below (%i is indentation)
>> (setq gnus-topic-line-format "%i[ %u&topic-line; ] %v\n")
>> 
>> ;; this function will return some string you can use, here it's just the topic name
>> (defun gnus-user-format-function-topic-line (dummy)
>> name)

FM> You're a wizzard !

FM> I mean, how that 'name' symbol came into the picture ?

FM> I haven't find a trace of it in the doc...

I *think* I copied it from someone.  Or maybe I looked at gnus-topic.el
and gnus-spec.el.  It's lexically scoped and pretty complicated code.

Ted




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

* Re: Topic mode, too limited ?
  2011-01-24 21:45           ` Ted Zlatanov
@ 2011-01-25  5:39             ` Francis Moreau
  2011-01-25 16:45               ` Ted Zlatanov
  0 siblings, 1 reply; 17+ messages in thread
From: Francis Moreau @ 2011-01-25  5:39 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Mon, 24 Jan 2011 21:34:59 +0100 Francis Moreau <francis.moro@gmail.com> wrote: 
>
> FM> Ted Zlatanov <tzz@lifelogs.com> writes:
>>> 
>>> I have played with gnus-topic-line-format a little and it should be
>>> fairly easy:
>>> 
>>> ;; set the format to use the function below (%i is indentation)
>>> (setq gnus-topic-line-format "%i[ %u&topic-line; ] %v\n")
>>> 
>>> ;; this function will return some string you can use, here it's just the topic name
>>> (defun gnus-user-format-function-topic-line (dummy)
>>> name)
>
> FM> You're a wizzard !
>
> FM> I mean, how that 'name' symbol came into the picture ?
>
> FM> I haven't find a trace of it in the doc...
>
> I *think* I copied it from someone.  Or maybe I looked at gnus-topic.el
> and gnus-spec.el.  It's lexically scoped and pretty complicated code.
>

Do you think 'name' is part of the API I can use enough so I can use it
reliably ?

-- 
Francis



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

* Re: Topic mode, too limited ?
  2011-01-25  5:39             ` Francis Moreau
@ 2011-01-25 16:45               ` Ted Zlatanov
  2011-01-26 19:12                 ` Francis Moreau
  0 siblings, 1 reply; 17+ messages in thread
From: Ted Zlatanov @ 2011-01-25 16:45 UTC (permalink / raw)
  To: ding

On Tue, 25 Jan 2011 06:39:12 +0100 Francis Moreau <francis.moro@gmail.com> wrote: 

FM> Ted Zlatanov <tzz@lifelogs.com> writes:
>> On Mon, 24 Jan 2011 21:34:59 +0100 Francis Moreau <francis.moro@gmail.com> wrote: 
>> 
FM> Ted Zlatanov <tzz@lifelogs.com> writes:
>>>> 
>>>> I have played with gnus-topic-line-format a little and it should be
>>>> fairly easy:
>>>> 
>>>> ;; set the format to use the function below (%i is indentation)
>>>> (setq gnus-topic-line-format "%i[ %u&topic-line; ] %v\n")
>>>> 
>>>> ;; this function will return some string you can use, here it's just the topic name
>>>> (defun gnus-user-format-function-topic-line (dummy)
>>>> name)
>> 
FM> You're a wizzard !
>> 
FM> I mean, how that 'name' symbol came into the picture ?
>> 
FM> I haven't find a trace of it in the doc...
>> 
>> I *think* I copied it from someone.  Or maybe I looked at gnus-topic.el
>> and gnus-spec.el.  It's lexically scoped and pretty complicated code.

FM> Do you think 'name' is part of the API I can use enough so I can use it
FM> reliably ?

There's no API.  It's just a lexical variable.  If Lars wants to make it
an official API he can, but I don't know if that's useful.

Ted




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

* Re: Topic mode, too limited ?
  2011-01-25 16:45               ` Ted Zlatanov
@ 2011-01-26 19:12                 ` Francis Moreau
  2011-01-27  1:30                   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 17+ messages in thread
From: Francis Moreau @ 2011-01-26 19:12 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Tue, 25 Jan 2011 06:39:12 +0100 Francis Moreau <francis.moro@gmail.com> wrote: 
>
> FM> Ted Zlatanov <tzz@lifelogs.com> writes:
>>> On Mon, 24 Jan 2011 21:34:59 +0100 Francis Moreau <francis.moro@gmail.com> wrote: 
>>> 
> FM> Ted Zlatanov <tzz@lifelogs.com> writes:
>>>>> 
>>>>> I have played with gnus-topic-line-format a little and it should be
>>>>> fairly easy:
>>>>> 
>>>>> ;; set the format to use the function below (%i is indentation)
>>>>> (setq gnus-topic-line-format "%i[ %u&topic-line; ] %v\n")
>>>>> 
>>>>> ;; this function will return some string you can use, here it's just the topic name
>>>>> (defun gnus-user-format-function-topic-line (dummy)
>>>>> name)
>>> 
> FM> You're a wizzard !
>>> 
> FM> I mean, how that 'name' symbol came into the picture ?
>>> 
> FM> I haven't find a trace of it in the doc...
>>> 
>>> I *think* I copied it from someone.  Or maybe I looked at gnus-topic.el
>>> and gnus-spec.el.  It's lexically scoped and pretty complicated code.
>
> FM> Do you think 'name' is part of the API I can use enough so I can use it
> FM> reliably ?
>
> There's no API.  It's just a lexical variable.  If Lars wants to make it
> an official API he can, but I don't know if that's useful.

Lars, would you mind to add this information part of the API by using
the unused parameter of gnus-user-format-function-topic-line. That would
make a change which should be backward compatible.

Thanks
-- 
Francis



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

* Re: Topic mode, too limited ?
  2011-01-26 19:12                 ` Francis Moreau
@ 2011-01-27  1:30                   ` Lars Ingebrigtsen
  2011-01-27  9:06                     ` Francis Moreau
  0 siblings, 1 reply; 17+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-27  1:30 UTC (permalink / raw)
  To: ding

Francis Moreau <francis.moro@gmail.com> writes:

> Lars, would you mind to add this information part of the API by using
> the unused parameter of gnus-user-format-function-topic-line. That would
> make a change which should be backward compatible.

Yes...  but I'm actually not sure whether it will remain backwards
compatible.  Emacs 25(-ish) is probably going to use lexical bindings
by default, and some renaming may be necessary to keep the dynamic
extent thing that the user-format thing uses.  I'm not sure.

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




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

* Re: Topic mode, too limited ?
  2011-01-27  1:30                   ` Lars Ingebrigtsen
@ 2011-01-27  9:06                     ` Francis Moreau
  2011-01-27 23:44                       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 17+ messages in thread
From: Francis Moreau @ 2011-01-27  9:06 UTC (permalink / raw)
  To: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Francis Moreau <francis.moro@gmail.com> writes:
>
>> Lars, would you mind to add this information part of the API by using
>> the unused parameter of gnus-user-format-function-topic-line. That would
>> make a change which should be backward compatible.
>
> Yes...  but I'm actually not sure whether it will remain backwards
> compatible.  Emacs 25(-ish) is probably going to use lexical bindings
> by default, and some renaming may be necessary to keep the dynamic
> extent thing that the user-format thing uses.  I'm not sure.

Sorry, but I don't understand this.

Why not simply passing the name of the topic through the function's
argument (gnus-user-format-function-topic-line name) ?

-- 
Francis



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

* Re: Topic mode, too limited ?
  2011-01-27  9:06                     ` Francis Moreau
@ 2011-01-27 23:44                       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 17+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-27 23:44 UTC (permalink / raw)
  To: ding

Francis Moreau <francis.moro@gmail.com> writes:

> Why not simply passing the name of the topic through the function's
> argument (gnus-user-format-function-topic-line name) ?

There's a gazillion dynamic variables that the user-format functions can
use.  Passing then explicitly is prohibitively expensive.

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




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

end of thread, other threads:[~2011-01-27 23:44 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-23 14:18 Topic mode, too limited ? Francis Moreau
2011-01-23 21:09 ` Lars Ingebrigtsen
2011-01-23 22:46   ` Francis Moreau
2011-01-23 23:08     ` Lars Ingebrigtsen
2011-01-23 23:25       ` Francis Moreau
2011-01-23 23:12   ` Francis Moreau
2011-01-24 17:38   ` Ted Zlatanov
2011-01-24 20:21     ` Francis Moreau
2011-01-24 20:30       ` Ted Zlatanov
2011-01-24 20:34         ` Francis Moreau
2011-01-24 21:45           ` Ted Zlatanov
2011-01-25  5:39             ` Francis Moreau
2011-01-25 16:45               ` Ted Zlatanov
2011-01-26 19:12                 ` Francis Moreau
2011-01-27  1:30                   ` Lars Ingebrigtsen
2011-01-27  9:06                     ` Francis Moreau
2011-01-27 23:44                       ` Lars 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).