all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* debbugs-0.10: two comments
@ 2016-09-12  6:08 Tino Calancha
  2016-09-12  7:05 ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Tino Calancha @ 2016-09-12  6:08 UTC (permalink / raw)
  To: michael.albinus, larsi; +Cc: Emacs developers


Dear Lars and Michael:

I)
Several commands use following internal variables:
debbugs-gnu-trunk-directory
debbugs-gnu-branch-directory
debbugs-gnu-current-directory

Shouldn't be options instead? Or, at least, an user should be asked
for their values when their default values don't work.
For instance, command `debbugs-gnu-find-contributor' fails because
`debbugs-gnu-current-directory' has default value nil.

II)
Most of the time i am interested in the newest bugs.  I have defined
following command in my .emacs:
(defun mydebbugs-gnu-latest-bugs (&optional num)
   "List latest NUM bugs.
If NUM is nil, then show the latest 10 bugs."
   (interactive (list (read-number "How many bugs: " 10)))
   (apply 'debbugs-gnu-bugs (debbugs-newest-bugs (or num 10))))

Maybe is useful to have a command like this in debbugs-gnu.el;
possibly with a different default value for NUM.

Regards,
Tino



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

* Re: debbugs-0.10: two comments
  2016-09-12  6:08 debbugs-0.10: two comments Tino Calancha
@ 2016-09-12  7:05 ` Michael Albinus
  2016-09-12  7:24   ` Tino Calancha
  2016-09-13 12:06   ` Michael Albinus
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Albinus @ 2016-09-12  7:05 UTC (permalink / raw)
  To: Tino Calancha; +Cc: larsi, Emacs developers

Tino Calancha <tino.calancha@gmail.com> writes:

[My email address is @gmx.de]

> Dear Lars and Michael:

Hi Tino,

> I)
> Several commands use following internal variables:
> debbugs-gnu-trunk-directory
> debbugs-gnu-branch-directory
> debbugs-gnu-current-directory
>
> Shouldn't be options instead? Or, at least, an user should be asked
> for their values when their default values don't work.
> For instance, command `debbugs-gnu-find-contributor' fails because
> `debbugs-gnu-current-directory' has default value nil.

I agree, debbugs-gnu-trunk-directory and debbugs-gnu-branch-directory
should be user options. Will change.

debbugs-gnu-current-directory is the internal working horse, not needed
to be exposed outside.

In debbugs-gnu-apply-patch, it will be checked already whether this is
set properly. If not, the directory name is requested
interactively. Shall be done in other functions as well; I'll change
this.

> II)
> Most of the time i am interested in the newest bugs.  I have defined
> following command in my .emacs:
> (defun mydebbugs-gnu-latest-bugs (&optional num)
>   "List latest NUM bugs.
> If NUM is nil, then show the latest 10 bugs."
>   (interactive (list (read-number "How many bugs: " 10)))
>   (apply 'debbugs-gnu-bugs (debbugs-newest-bugs (or num 10))))
>
> Maybe is useful to have a command like this in debbugs-gnu.el;
> possibly with a different default value for NUM.

I have already plans to extend debbugs-gnu-bugs and debbugs-org-bugs.
Currently, they allow only list of bug numbers, like "100,200,300" etc.
I want to allow also ranges, like "100-200,300-400" and so on. A special
range "-10" could mean then "the last 10 bugs". This shall fit your needs.

Will do both next days as time permits.

> Regards,
> Tino

Best regards, Michael.



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

* Re: debbugs-0.10: two comments
  2016-09-12  7:05 ` Michael Albinus
@ 2016-09-12  7:24   ` Tino Calancha
  2016-09-12  7:32     ` Michael Albinus
  2016-09-13 12:06   ` Michael Albinus
  1 sibling, 1 reply; 9+ messages in thread
From: Tino Calancha @ 2016-09-12  7:24 UTC (permalink / raw)
  To: Michael Albinus; +Cc: larsi, Emacs developers, Tino Calancha



On Mon, 12 Sep 2016, Michael Albinus wrote:

> [My email address is @gmx.de]
Opps, that explain that i got one e-mail with the following:
Delivery to the following recipient failed permanently:

      michael.albinus@gmx.org

>> Dear Lars and Michael:
> I agree, debbugs-gnu-trunk-directory and debbugs-gnu-branch-directory
> should be user options. Will change.
Thank you very much.

> debbugs-gnu-current-directory is the internal working horse, not needed
> to be exposed outside.
>
> In debbugs-gnu-apply-patch, it will be checked already whether this is
> set properly. If not, the directory name is requested
> interactively. Shall be done in other functions as well; I'll change
> this.
Thanks also for this.

>> II)
>> Most of the time i am interested in the newest bugs.  I have defined
>> following command in my .emacs:
>> (defun mydebbugs-gnu-latest-bugs (&optional num)
>>   "List latest NUM bugs.
>> If NUM is nil, then show the latest 10 bugs."
>>   (interactive (list (read-number "How many bugs: " 10)))
>>   (apply 'debbugs-gnu-bugs (debbugs-newest-bugs (or num 10))))
>>
>> Maybe is useful to have a command like this in debbugs-gnu.el;
>> possibly with a different default value for NUM.
>
> I have already plans to extend debbugs-gnu-bugs and debbugs-org-bugs.
> Currently, they allow only list of bug numbers, like "100,200,300" etc.
> I want to allow also ranges, like "100-200,300-400" and so on. A special
> range "-10" could mean then "the last 10 bugs". This shall fit your needs.
That sounds great!
Maybe worth to provide the command for latest bugs with a nice default. 
It is handy not having to write in the minibuffer the range for this: just
RET to accept the default value is very pleasant.

> Will do both next days as time permits.
Great! Thank you very much.



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

* Re: debbugs-0.10: two comments
  2016-09-12  7:24   ` Tino Calancha
@ 2016-09-12  7:32     ` Michael Albinus
  2016-09-12  7:46       ` Tino Calancha
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2016-09-12  7:32 UTC (permalink / raw)
  To: Tino Calancha; +Cc: larsi, Emacs developers

Tino Calancha <tino.calancha@gmail.com> writes:

Hi Tino,

>> I have already plans to extend debbugs-gnu-bugs and debbugs-org-bugs.
>> Currently, they allow only list of bug numbers, like "100,200,300" etc.
>> I want to allow also ranges, like "100-200,300-400" and so on. A special
>> range "-10" could mean then "the last 10 bugs". This shall fit your needs.
> That sounds great!
> Maybe worth to provide the command for latest bugs with a nice
> default. It is handy not having to write in the minibuffer the range
> for this: just
> RET to accept the default value is very pleasant.

Good idea. Will use "-10" as default, and will make the default customizable.

Best regards, Michael.



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

* Re: debbugs-0.10: two comments
  2016-09-12  7:32     ` Michael Albinus
@ 2016-09-12  7:46       ` Tino Calancha
  0 siblings, 0 replies; 9+ messages in thread
From: Tino Calancha @ 2016-09-12  7:46 UTC (permalink / raw)
  To: Michael Albinus; +Cc: larsi, Emacs developers, Tino Calancha



On Mon, 12 Sep 2016, Michael Albinus wrote:

> Tino Calancha <tino.calancha@gmail.com> writes:
>
> Hi Tino,
>
>>> I have already plans to extend debbugs-gnu-bugs and debbugs-org-bugs.
>>> Currently, they allow only list of bug numbers, like "100,200,300" etc.
>>> I want to allow also ranges, like "100-200,300-400" and so on. A special
>>> range "-10" could mean then "the last 10 bugs". This shall fit your needs.
>> That sounds great!
>> Maybe worth to provide the command for latest bugs with a nice
>> default. It is handy not having to write in the minibuffer the range
>> for this: just
>> RET to accept the default value is very pleasant.
>
> Good idea. Will use "-10" as default, and will make the default customizable.
Great, i love the idea of having a customizable default: that improve my 
original idea.
Thank you!



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

* Re: debbugs-0.10: two comments
  2016-09-12  7:05 ` Michael Albinus
  2016-09-12  7:24   ` Tino Calancha
@ 2016-09-13 12:06   ` Michael Albinus
  2016-09-23  7:42     ` debbugs-0.10: doc fixes Tino Calancha
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2016-09-13 12:06 UTC (permalink / raw)
  To: Tino Calancha; +Cc: larsi, Emacs developers

Michael Albinus <michael.albinus@gmx.de> writes:

Hi Tino,

> I agree, debbugs-gnu-trunk-directory and debbugs-gnu-branch-directory
> should be user options. Will change.
>
> In debbugs-gnu-apply-patch, it will be checked already whether this is
> set properly. If not, the directory name is requested
> interactively. Shall be done in other functions as well; I'll change
> this.

Done.

> I have already plans to extend debbugs-gnu-bugs and debbugs-org-bugs.
> Currently, they allow only list of bug numbers, like "100,200,300" etc.
> I want to allow also ranges, like "100-200,300-400" and so on. A special
> range "-10" could mean then "the last 10 bugs". This shall fit your needs.

Done also. See `debbugs-gnu-default-bug-number-list' for the default value.

> Will do both next days as time permits.

I've pushed this to the elpa repository, you might play with it. Within
a week or so, I will release debbugs 0.11.

>> Regards,
>> Tino

Best regards, Michael.



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

* Re: debbugs-0.10: doc fixes
  2016-09-13 12:06   ` Michael Albinus
@ 2016-09-23  7:42     ` Tino Calancha
  2016-09-23 12:40       ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Tino Calancha @ 2016-09-23  7:42 UTC (permalink / raw)
  To: Michael Albinus; +Cc: larsi, Emacs developers, Tino Calancha



On Tue, 13 Sep 2016, Michael Albinus wrote:

> I've pushed this to the elpa repository, you might play with it. Within
> a week or so, I will release debbugs 0.11.

Hi Michal,
it looks good.  Thank you.
I have few suggestions to make the doc strings more clear.  See below.

From 6d3d28162e0b3e956a531dd60380243cc5dfd481 Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Fri, 23 Sep 2016 16:37:01 +0900
Subject: [PATCH] debbugs-gnu.el: Doc fixes

* packages/debbugs/debbugs-gnu.el (debbugs-gnu-expand-bug-number-list):
Fix typo in doc string.
(debbugs-gnu-default-bug-number-list): Explain the meaning of a
value like '-N'.
(debbugs-gnu-bugs): Clarify in doc string the input format
for interactive calls.
Show default value in the prompt, i.e., 
'debbugs-gnu-default-bug-number-list'.
---
  packages/debbugs/debbugs-gnu.el | 13 +++++++++----
  1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/packages/debbugs/debbugs-gnu.el 
b/packages/debbugs/debbugs-gnu.el
index 4a69f2b..f8b8726 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/debbugs-gnu.el
@@ -1421,7 +1421,7 @@ MERGED is the list of bugs merged with this one."
    "Dynamic completion table for reading bug numbers.")

  (defun debbugs-gnu-expand-bug-number-list (bug-number-list)
-  "Expand BUG-NUMBER-LIST to a list of singe bug numbers.
+  "Expand BUG-NUMBER-LIST to a list of single bug numbers.
  BUG-NUMBER-LIST is a list of bug numbers or bug number ranges, as
  returned by `debbugs-gnu-bugs'."
    (let (result)
@@ -1659,20 +1659,25 @@ The following commands are available:

  (defcustom debbugs-gnu-default-bug-number-list "-10"
    "The default value used in interactive call of `debbugs-gnu-bugs'.
-It must be a string, containing a comma separated list of bugs or bug 
ranges."
+It must be a string, containing a comma separated list of bugs or bug 
ranges.
+A negative value, -N, means the newest N bugs."
    :group 'debbugs-gnu
    :type 'string
    :version "25.2")

  ;;;###autoload
  (defun debbugs-gnu-bugs (&rest bugs)
-  "List all BUGS, a list of bug numbers."
+  "List all BUGS, a list of bug numbers.
+In interactive calls, prompt for a comma separated list of bugs
+or bug ranges, with default to `debbugs-gnu-default-bug-number-list'."
    (interactive
     (mapcar
      'string-to-number
      (debbugs-gnu-expand-bug-number-list
       (or
-      (completing-read-multiple "Bug numbers: " 
debbugs-gnu-completion-table)
+      (completing-read-multiple
+       (format "Bug numbers (%s): " debbugs-gnu-default-bug-number-list)
+       debbugs-gnu-completion-table)
        (split-string debbugs-gnu-default-bug-number-list "," t)))))
    (dolist (elt bugs)
      (unless (natnump elt) (signal 'wrong-type-argument (list 'natnump 
elt))))
-- 
2.9.3

Repository revision: 1c1ee85d183daee1d409413226ec739f35499918



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

* Re: debbugs-0.10: doc fixes
  2016-09-23  7:42     ` debbugs-0.10: doc fixes Tino Calancha
@ 2016-09-23 12:40       ` Michael Albinus
  2016-09-23 13:14         ` Tino Calancha
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2016-09-23 12:40 UTC (permalink / raw)
  To: Tino Calancha; +Cc: larsi, Emacs developers

Tino Calancha <tino.calancha@gmail.com> writes:

> Hi Michal,

Hi Tino,

> I have few suggestions to make the doc strings more clear.  See below.

LGTM. Pls push to the elpa repo.

Thanks, and best regards, Michael.



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

* Re: debbugs-0.10: doc fixes
  2016-09-23 12:40       ` Michael Albinus
@ 2016-09-23 13:14         ` Tino Calancha
  0 siblings, 0 replies; 9+ messages in thread
From: Tino Calancha @ 2016-09-23 13:14 UTC (permalink / raw)
  To: Michael Albinus; +Cc: larsi, Emacs developers, Tino Calancha



On Fri, 23 Sep 2016, Michael Albinus wrote:

> Tino Calancha <tino.calancha@gmail.com> writes:
>
>> Hi Michal,
>
> Hi Tino,
>
>> I have few suggestions to make the doc strings more clear.  See below.
>
> LGTM. Pls push to the elpa repo.
Thank you.
Pushed as commit: 6d3d2816
Regards,
Tino



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

end of thread, other threads:[~2016-09-23 13:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12  6:08 debbugs-0.10: two comments Tino Calancha
2016-09-12  7:05 ` Michael Albinus
2016-09-12  7:24   ` Tino Calancha
2016-09-12  7:32     ` Michael Albinus
2016-09-12  7:46       ` Tino Calancha
2016-09-13 12:06   ` Michael Albinus
2016-09-23  7:42     ` debbugs-0.10: doc fixes Tino Calancha
2016-09-23 12:40       ` Michael Albinus
2016-09-23 13:14         ` Tino Calancha

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.