GNU bug report logs -
#11408
24.1.50; [PATCH] Don't inherit faces when untabifying the man page
Previous Next
Reported by: Wolfgang Jenkner <wjenkner <at> inode.at>
Date: Fri, 4 May 2012 17:45:02 UTC
Severity: normal
Tags: patch
Found in version 24.1.50
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11408 in the body.
You can then email your comments to 11408 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11408
; Package
emacs
.
(Fri, 04 May 2012 17:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Wolfgang Jenkner <wjenkner <at> inode.at>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 04 May 2012 17:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Look a the emacs(1) man page
M-x m a n <return> e m a c s <return>
You may (or may not, depending on how your man program outputs tab
characters) observe that the underlining of some words protrudes to the
following white space. E.g., I see occurrences of "Emacs windows" or
"Emacs. Help" where the (multiple) space characters are underlined.
GNU Emacs 24.1.50.1 (amd64-unknown-freebsd9.0, GTK+ Version 2.24.6)
of 2012-05-02 on iznogoud.viz
2012-05-04 Wolfgang Jenkner <wjenkner <at> inode.at>
* man.el (Man-unindent): Use text-property-default-nonsticky to
prevent untabify from inheriting `face' text properties.
In particular, underlined white space didn't look so hot.
=== modified file 'lisp/man.el'
--- lisp/man.el 2012-04-28 21:59:08 +0000
+++ lisp/man.el 2012-05-04 16:18:33 +0000
@@ -1475,7 +1475,12 @@
(nindent 0))
(narrow-to-region (car page) (car (cdr page)))
(if Man-uses-untabify-flag
- (untabify (point-min) (point-max)))
+ (let ((text-property-default-nonsticky
+ ;; The space characters `untabify' (or rather `indent-to')
+ ;; inserts inherit sticky text properties, which is
+ ;; unnecessary and looks exceedingly ugly with `underline'.
+ (cons '(face . t) text-property-default-nonsticky)))
+ (untabify (point-min) (point-max))))
(if (catch 'unindent
(goto-char (point-min))
(if (not (re-search-forward Man-first-heading-regexp nil t))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11408
; Package
emacs
.
(Sun, 06 May 2012 04:22:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 11408 <at> debbugs.gnu.org (full text, mbox):
Wolfgang Jenkner <wjenkner <at> inode.at> writes:
> 2012-05-04 Wolfgang Jenkner <wjenkner <at> inode.at>
>
> * man.el (Man-unindent): Use text-property-default-nonsticky to
> prevent untabify from inheriting `face' text properties.
> In particular, underlined white space didn't look so hot.
Thanks, committed to trunk.
bug closed, send any further explanations to
11408 <at> debbugs.gnu.org and Wolfgang Jenkner <wjenkner <at> inode.at>
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 06 May 2012 04:22:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11408
; Package
emacs
.
(Sun, 06 May 2012 14:00:02 GMT)
Full text and
rfc822 format available.
Message #13 received at submit <at> debbugs.gnu.org (full text, mbox):
> * man.el (Man-unindent): Use text-property-default-nonsticky to
> prevent untabify from inheriting `face' text properties.
> In particular, underlined white space didn't look so hot.
Thanks. The BTW, I think this should be fixed in untabify.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11408
; Package
emacs
.
(Sun, 06 May 2012 15:58:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 11408 <at> debbugs.gnu.org (full text, mbox):
On Sun, May 06 2012, Stefan Monnier wrote:
>> * man.el (Man-unindent): Use text-property-default-nonsticky to
>> prevent untabify from inheriting `face' text properties.
>> In particular, underlined white space didn't look so hot.
>
> Thanks. The BTW, I think this should be fixed in untabify.
The following idea is perhaps obvious or silly or obviously silly,
but...
Here's a simple test
#+begin_src emacs-lisp
(with-temp-buffer
(insert-string "foo\t\tbar")
(put-text-property 1 4 'face 'underline)
(put-text-property 4 6 'face '(:background "red"))
(put-text-property 6 9 'face '(:foreground "blue"))
(untabify (point-min) (point-max))
(message "%s" (buffer-string)))
#+end_src
Wolfgang
diff --git a/lisp/tabify.el b/lisp/tabify.el
index 26762ac..6d27084 100644
--- a/lisp/tabify.el
+++ b/lisp/tabify.el
@@ -46,7 +46,9 @@ The variable `tab-width' controls the spacing of tab stops."
column)
(skip-chars-forward "\t")
(setq column (current-column))
- (delete-region tab-beg (point))
+ ;; Inherit from the last tab in a run.
+ (insert-char ?\s 1 t)
+ (delete-region tab-beg (1- (point)))
(indent-to column)))))
(move-to-column c)))
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 04 Jun 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 321 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.