Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: dev

[Bug 1147] builtin list counting feature

 

 

exim dev RSS feed   Index | Next | Previous | View Threaded


jgh146exb at wizmail

Jun 9, 2012, 4:34 PM

Post #1 of 7 (568 views)
Permalink
[Bug 1147] builtin list counting feature

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1147




--- Comment #2 from Jeremy Harris <jgh146exb [at] wizmail> 2012-06-10 00:34:48 ---
Created an attachment (id=576)
--> (http://bugs.exim.org/attachment.cgi?id=576)
${list:name} and ${nlist:string} expansions

For amusement, a pair of expansion operators:

${list:name}
Takes the name of a named list (with optional +) and returns the expansion.
Handles nested named lists (but the output will be confused if variant list
separator specs are present). Looks for any type of list, in an undefined
order, returning the first one found. Variants list_a, list_d, list_h and
list_l restrict the lookup to address, domain, host or localpart lists
respectively.

${nlist:string}
Takes a list and returns the number of elements.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


pdp at exim

Jun 9, 2012, 5:49 PM

Post #2 of 7 (542 views)
Permalink
[Bug 1147] builtin list counting feature [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1147




--- Comment #3 from Phil Pennock <pdp [at] exim> 2012-06-10 01:49:16 ---
If ${list:..} gets confused by changing list separator options, then that's a
bug which would yield complaints and consume mailing-list debugging time until
fixed.

The ${reduce} approaches are at least explicit about what they count over, and
not chasing down sub-lists.

I'm happier to see ${nlist:...} go in (with a more explicit name) than
${list:...}


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


jgh146exb at wizmail

Jun 10, 2012, 9:16 AM

Post #3 of 7 (537 views)
Permalink
[Bug 1147] builtin list counting feature [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1147

Jeremy Harris <jgh146exb [at] wizmail> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #576 is|0 |1
obsolete| |
AssignedTo|nigel [at] exim |jgh146exb [at] wizmail
Status|NEW |ASSIGNED




--- Comment #4 from Jeremy Harris <jgh146exb [at] wizmail> 2012-06-10 17:16:22 ---
Created an attachment (id=577)
--> (http://bugs.exim.org/attachment.cgi?id=577)
mk.2

Well, not so much the code gets confused as the user is confused by the output
- but it's a valid point.

${list:name} now always outputs as a colon-sep list, re-quoting as needed.

Any preferences for the actual names?


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


pdp at exim

Jun 10, 2012, 1:53 PM

Post #4 of 7 (532 views)
Permalink
[Bug 1147] builtin list counting feature [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1147




--- Comment #5 from Phil Pennock <pdp [at] exim> 2012-06-10 21:53:26 ---
${named_list:...} and ${count_list:...} ? Those seem clear and explicit.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


jgh146exb at wizmail

Jun 11, 2012, 2:27 PM

Post #5 of 7 (522 views)
Permalink
[Bug 1147] builtin list counting feature [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1147




--- Comment #6 from Jeremy Harris <jgh146exb [at] wizmail> 2012-06-11 22:27:05 ---
I don't think a name with underscores in works well with an (optional)
underscore-introduced argument...

${namedlist:...} , ${countlist:...} ?
${listnamed:...} , ${listcount:...} ?


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


pdp at exim

Jun 11, 2012, 6:29 PM

Post #6 of 7 (520 views)
Permalink
[Bug 1147] builtin list counting feature [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1147




--- Comment #7 from Phil Pennock <pdp [at] exim> 2012-06-12 02:29:26 ---
I was already concerned I might be painting the bikeshed. I mostly don't want
the name to be cryptic or subject to misinterpretation if someone is thinking
of something else and spots the expansion operator with this name. Your other
proposals are fine.

(I'm not seeing the problem with underscores in the name, we have some like
that already, such as "from_utf8", it's clear, explicit and makes it easier for
non-native speakers of English to find the word breaks; but if you're opposed,
since you're the one doing the work, you get to avoid the underscores.)


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


jgh146exb at wizmail

Jun 12, 2012, 1:46 PM

Post #7 of 7 (518 views)
Permalink
[Bug 1147] builtin list counting feature [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1147

Jeremy Harris <jgh146exb [at] wizmail> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED




--- Comment #8 from Jeremy Harris <jgh146exb [at] wizmail> 2012-06-12 21:46:41 ---
Pushed 585121e268254.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

exim dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.