* bug#31466: 27.0.50; customize-apropos: Separate package name from its description
@ 2018-05-16 3:51 Tino Calancha
2018-05-16 15:58 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Tino Calancha @ 2018-05-16 3:51 UTC (permalink / raw)
To: 31466
emacs -Q -l dired-x
M-x customize-apropos dired-x RET
;; Last line of the buffer is:
Dired XExtended directory editing (dired-x).
;; It reads better if the package name is separated from
;; the package description. For instance:
Dired X: Extended directory editing (dired-x).
;; Following patch shows the line as:
Dired X:Extended directory editing (dired-x).
;; Without the extra space because looks a bit ugly in the link.
;; If someone knows a way to add the extra space out of the link,
;; that would be better.
--8<-----------------------------cut here---------------start------------->8---
commit 2edea58d78914063bb56270774b5e02d8a1a55af
Author: Tino Calancha <tino.calancha@gmail.com>
Date: Wed May 16 12:46:09 2018 +0900
customize-apropos: Separate package name from its description
* lisp/cus-edit.el (custom-buffer-create-internal): Separate
package name from its description with a colon.
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index a12897e799..0a596ab331 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1711,8 +1711,10 @@ custom-buffer-create-internal
(message "Creating customization items ...%2d%%"
(floor (* 100.0 count) length))
(widget-create (nth 1 entry)
- :tag (custom-unlispify-tag-name
- (nth 0 entry))
+ :tag (format "%s%s"
+ (custom-unlispify-tag-name
+ (nth 0 entry))
+ (if (eq (nth 1 entry) 'custom-group) ":" ""))
:value (nth 0 entry))
(setq count (1+ count))
(unless (eq (preceding-char) ?\n)
--8<-----------------------------cut here---------------end--------------->8---
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#31466: 27.0.50; customize-apropos: Separate package name from its description
2018-05-16 3:51 bug#31466: 27.0.50; customize-apropos: Separate package name from its description Tino Calancha
@ 2018-05-16 15:58 ` Eli Zaretskii
2018-05-17 2:57 ` Tino Calancha
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2018-05-16 15:58 UTC (permalink / raw)
To: Tino Calancha; +Cc: 31466
> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Wed, 16 May 2018 12:51:01 +0900
>
> emacs -Q -l dired-x
> M-x customize-apropos dired-x RET
>
> ;; Last line of the buffer is:
> Dired XExtended directory editing (dired-x).
>
> ;; It reads better if the package name is separated from
> ;; the package description. For instance:
>
> Dired X: Extended directory editing (dired-x).
>
> ;; Following patch shows the line as:
> Dired X:Extended directory editing (dired-x).
>
> ;; Without the extra space because looks a bit ugly in the link.
> ;; If someone knows a way to add the extra space out of the link,
> ;; that would be better.
I think customize-group does a better job in presenting similar
lists. It uses :align-to display spec for that; can customize-apropos
do something similar? E.g., try "M-x customize-group RET RET".
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#31466: 27.0.50; customize-apropos: Separate package name from its description
2018-05-16 15:58 ` Eli Zaretskii
@ 2018-05-17 2:57 ` Tino Calancha
2018-06-07 4:54 ` Tino Calancha
0 siblings, 1 reply; 5+ messages in thread
From: Tino Calancha @ 2018-05-17 2:57 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 31466
Eli Zaretskii <eliz@gnu.org> writes:
>> ;; Without the extra space because looks a bit ugly in the link.
>> ;; If someone knows a way to add the extra space out of the link,
>> ;; that would be better.
>
> I think customize-group does a better job in presenting similar
> lists. It uses :align-to display spec for that; can customize-apropos
> do something similar? E.g., try "M-x customize-group RET RET".
Thanks for the tip.
I am not so familiar with this widget stuff.
Following is a hack but seems to work:
--8<-----------------------------cut here---------------start------------->8---
commit c12b63c079c9294819f1152912d9b3ad0c830717
Author: Tino Calancha <tino.calancha@gmail.com>
Date: Thu May 17 11:50:11 2018 +0900
customize-apropos: Separate package name from its description
* lisp/cus-edit.el (custom-buffer-create-internal):
Indent the documentation from the package name in `customize-apropos',
`customize-apropos-groups' commands (Bug#31466).
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index a12897e799..1496e0b89f 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4145,7 +4145,9 @@ custom-group-value-create
;; Update buttons.
(widget-put widget :buttons buttons)
;; Insert documentation.
- (if (and (eq custom-buffer-style 'links) (> level 1))
+ (if (and (eq custom-buffer-style 'links)
+ (or (> level 1)
+ (memq this-command '(customize-apropos customize-apropos-groups))))
(widget-put widget :documentation-indent
custom-group-doc-align-col))
(widget-add-documentation-string-button
--8<-----------------------------cut here---------------end--------------->8---
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#31466: 27.0.50; customize-apropos: Separate package name from its description
2018-05-17 2:57 ` Tino Calancha
@ 2018-06-07 4:54 ` Tino Calancha
2018-06-15 7:23 ` Tino Calancha
0 siblings, 1 reply; 5+ messages in thread
From: Tino Calancha @ 2018-06-07 4:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 31466
Tino Calancha <tino.calancha@gmail.com> writes:
> diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
> index a12897e799..1496e0b89f 100644
> --- a/lisp/cus-edit.el
> +++ b/lisp/cus-edit.el
> @@ -4145,7 +4145,9 @@ custom-group-value-create
> ;; Update buttons.
> (widget-put widget :buttons buttons)
> ;; Insert documentation.
> - (if (and (eq custom-buffer-style 'links) (> level 1))
> + (if (and (eq custom-buffer-style 'links)
> + (or (> level 1)
> + (memq this-command '(customize-apropos customize-apropos-groups))))
> (widget-put widget :documentation-indent
I think we can just require
(eq custom-buffer-style 'links)
and go ahead indenting the documentation if such condition holds.
Then, we don't need `this-command', so that the doc will be indented
also in non-interactive calls.
--8<-----------------------------cut here---------------start------------->8---
commit dff8d8fb83f2e629e66380554c0b28e68db49868
Author: Tino Calancha <tino.calancha@gmail.com>
Date: Thu Jun 7 13:49:53 2018 +0900
customize-apropos: Separate package name from its description
* lisp/cus-edit.el (custom-group-value-create):
Always insert documentation indented from its package name (Bug#31466).
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index a12897e799..ff6a4f6d33 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4145,7 +4145,7 @@ custom-group-value-create
;; Update buttons.
(widget-put widget :buttons buttons)
;; Insert documentation.
- (if (and (eq custom-buffer-style 'links) (> level 1))
+ (when (eq custom-buffer-style 'links)
(widget-put widget :documentation-indent
custom-group-doc-align-col))
(widget-add-documentation-string-button
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 27.0.50 (build 23, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
of 2018-06-05 built on calancha-pc
Repository revision: 4a51deb993d923767f0eddd4f350e636fe8d7c0b
If people OK with that, I'd like to push this fix.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#31466: 27.0.50; customize-apropos: Separate package name from its description
2018-06-07 4:54 ` Tino Calancha
@ 2018-06-15 7:23 ` Tino Calancha
0 siblings, 0 replies; 5+ messages in thread
From: Tino Calancha @ 2018-06-15 7:23 UTC (permalink / raw)
To: 31466-done
Tino Calancha <tino.calancha@gmail.com> writes:
>
> I think we can just require
> (eq custom-buffer-style 'links)
> and go ahead indenting the documentation if such condition holds.
>
> Then, we don't need `this-command', so that the doc will be indented
> also in non-interactive calls.
>
> commit dff8d8fb83f2e629e66380554c0b28e68db49868
> Author: Tino Calancha <tino.calancha@gmail.com>
> Date: Thu Jun 7 13:49:53 2018 +0900
>
> customize-apropos: Separate package name from its description
>
> * lisp/cus-edit.el (custom-group-value-create):
> Always insert documentation indented from its package name (Bug#31466).
>
> diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
> index a12897e799..ff6a4f6d33 100644
> --- a/lisp/cus-edit.el
> +++ b/lisp/cus-edit.el
> @@ -4145,7 +4145,7 @@ custom-group-value-create
> ;; Update buttons.
> (widget-put widget :buttons buttons)
> ;; Insert documentation.
> - (if (and (eq custom-buffer-style 'links) (> level 1))
> + (when (eq custom-buffer-style 'links)
> (widget-put widget :documentation-indent
> custom-group-doc-align-col))
> (widget-add-documentation-string-button
>
> If people OK with that, I'd like to push this fix.
Pushed fix into master branch as commit
'customize-apropos: Separate package name from its description'
(aeb6b2e31fea5d3fa78e2f8a0895dc86f6b4a7a6)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-06-15 7:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-16 3:51 bug#31466: 27.0.50; customize-apropos: Separate package name from its description Tino Calancha
2018-05-16 15:58 ` Eli Zaretskii
2018-05-17 2:57 ` Tino Calancha
2018-06-07 4:54 ` Tino Calancha
2018-06-15 7:23 ` 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.