Gnus development mailing list
 help / color / mirror / Atom feed
* Tabs in texi files
@ 2007-03-28 15:17 Katsumi Yamaoka
  2007-03-28 16:21 ` Didier Verna
  0 siblings, 1 reply; 8+ messages in thread
From: Katsumi Yamaoka @ 2007-03-28 15:17 UTC (permalink / raw)
  To: Didier Verna; +Cc: ding

Hi,

Your recent commit made not only this change

2007-03-28  Didier Verna  <didier@xemacs.org>

	* gnus.texi (Group Parameters): Document the posting-style merging
	process in topic-mode.

but also many tabs.  Is it intentional?

AFAIK, tabs in texi sources will make the formatted info ugly,
so I usually run `untabify' over the area I edited.

Regards,



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

* Re: Tabs in texi files
  2007-03-28 15:17 Tabs in texi files Katsumi Yamaoka
@ 2007-03-28 16:21 ` Didier Verna
  2007-03-28 16:37   ` Didier Verna
  2007-03-28 16:47   ` Reiner Steib
  0 siblings, 2 replies; 8+ messages in thread
From: Didier Verna @ 2007-03-28 16:21 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding

Katsumi Yamaoka <yamaoka@jpl.org> wrote:

> Hi,
>
> Your recent commit made not only this change
>
> 2007-03-28  Didier Verna  <didier@xemacs.org>
>
> 	* gnus.texi (Group Parameters): Document the posting-style merging
> 	process in topic-mode.
>
> but also many tabs.  Is it intentional?

        I have whitespace.el hooked in write-file-hooks.


> AFAIK, tabs in texi sources will make the formatted info ugly,
> so I usually run `untabify' over the area I edited.

        Hmmm. I had never realized that. Thanks for pointing it out.

-- 
Didier Verna, didier@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France   Fax.+33 (1) 53 14 59 22   didier@xemacs.org



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

* Re: Tabs in texi files
  2007-03-28 16:21 ` Didier Verna
@ 2007-03-28 16:37   ` Didier Verna
  2007-03-28 22:32     ` Katsumi Yamaoka
  2007-03-28 22:54     ` Kevin Ryde
  2007-03-28 16:47   ` Reiner Steib
  1 sibling, 2 replies; 8+ messages in thread
From: Didier Verna @ 2007-03-28 16:37 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding


[ Sorry, finger slip; I had more to say here ]


>> AFAIK, tabs in texi sources will make the formatted info ugly,
>> so I usually run `untabify' over the area I edited.
>
>         Hmmm. I had never realized that. Thanks for pointing it out.

I must admit however that I never encountered this situation (I mean any
ugliness) myself. Besides, there are also tabs in other (untouched by me)
places, like between a node name and its description.

So what's the general recommendation for texi files ?

-- 
Didier Verna, didier@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France   Fax.+33 (1) 53 14 59 22   didier@xemacs.org



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

* Re: Tabs in texi files
  2007-03-28 16:21 ` Didier Verna
  2007-03-28 16:37   ` Didier Verna
@ 2007-03-28 16:47   ` Reiner Steib
  2007-03-28 23:01     ` Miles Bader
  1 sibling, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2007-03-28 16:47 UTC (permalink / raw)
  To: Didier Verna; +Cc: ding

On Wed, Mar 28 2007, Didier Verna wrote:

> Katsumi Yamaoka <yamaoka@jpl.org> wrote:
[...]
>         I have whitespace.el hooked in write-file-hooks.
>
>> AFAIK, tabs in texi sources will make the formatted info ugly,
>> so I usually run `untabify' over the area I edited.
>
>         Hmmm. I had never realized that. Thanks for pointing it out.

IMHO, it would be better _not_ do mix topical changes with white space
changes at all.  It makes merging (with/from Emacs) and tracking
changes unnecessary hard.  I'd suggest to avoid this.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



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

* Re: Tabs in texi files
  2007-03-28 16:37   ` Didier Verna
@ 2007-03-28 22:32     ` Katsumi Yamaoka
  2007-03-28 22:54     ` Kevin Ryde
  1 sibling, 0 replies; 8+ messages in thread
From: Katsumi Yamaoka @ 2007-03-28 22:32 UTC (permalink / raw)
  To: ding

>>>>> In <muxzm5x2ukr.fsf@uzeb.lrde.epita.fr> Didier Verna wrote:

>>> AFAIK, tabs in texi sources will make the formatted info ugly,
>>> so I usually run `untabify' over the area I edited.
>>
>>         Hmmm. I had never realized that. Thanks for pointing it out.

> I must admit however that I never encountered this situation (I mean any
> ugliness) myself. Besides, there are also tabs in other (untouched by me)
> places, like between a node name and its description.

There were one tab in the gnus.texi file before you modified it.
Though I've never noticed it, I see it breaks the indentation of
the Lisp form in the info node `6.1.3 Example Methods' as follows:

--8<---------------cut here---------------start------------->8---
   See also `nntp-via-rlogin-command-switches'.  Here's an example for
an indirect connection:
     (setq gnus-select-method
           '(nntp "indirect"
     	     (nntp-address "news.server.example")
                  (nntp-via-user-name "intermediate_user_name")
                  (nntp-via-address "intermediate.host.example")
                  (nntp-via-rlogin-command "ssh")
                  (nntp-end-of-line "\n")
                  (nntp-via-rlogin-command-switches ("-C" "-t" "-e" "none"))
                  (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)))
--8<---------------cut here---------------end--------------->8---

But now such ugliness is here and there.  For example:

--8<---------------cut here---------------start------------->8---
          (setq gnus-summary-show-article-charset-alist
                '((1 . cn-gb-2312)
          	(2 . big5)))
--8<---------------cut here---------------end--------------->8---

I use:

$ makeinfo --version
makeinfo (GNU texinfo) 4.8

> So what's the general recommendation for texi files ?

Don't use tabs.

Regards,



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

* Re: Tabs in texi files
  2007-03-28 16:37   ` Didier Verna
  2007-03-28 22:32     ` Katsumi Yamaoka
@ 2007-03-28 22:54     ` Kevin Ryde
  2007-03-28 23:12       ` Katsumi Yamaoka
  1 sibling, 1 reply; 8+ messages in thread
From: Kevin Ryde @ 2007-03-28 22:54 UTC (permalink / raw)
  To: ding

Didier Verna <didier@xemacs.org> writes:
>
> So what's the general recommendation for texi files ?

I use the spot of code below to see any tabs that creep in (usually
from cutting and pasting code).  I've kept meaning to propose
something like it for texinfo-mode, but I've been through various
versions and still haven't got to a balance between warning vs fixing
vs being overly intrusive.


(defun my-texinfo-tab-warn-face (beg end)
  "Put `trailing-whitespace' face on any tabs from BEG to END, as a warning."
  (save-excursion
    (goto-char beg)
    (let ((modified (buffer-modified-p)))
      (while (re-search-forward "\t+" end t)
        (put-text-property (match-beginning 0) (match-end 0)
                           'face 'trailing-whitespace))
      (set-buffer-modified-p modified))))

(add-hook 'after-change-functions
          (lambda (beg end prev-len)
            (if (eq major-mode 'texinfo-mode)
                (my-texinfo-tab-warn-face beg end))))

(add-hook 'texinfo-mode-hook
          (lambda ()
            (my-texinfo-tab-warn-face (point-min) (point-max))))



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

* Re: Tabs in texi files
  2007-03-28 16:47   ` Reiner Steib
@ 2007-03-28 23:01     ` Miles Bader
  0 siblings, 0 replies; 8+ messages in thread
From: Miles Bader @ 2007-03-28 23:01 UTC (permalink / raw)
  To: ding

Reiner Steib <reinersteib+gmane@imap.cc> writes:
>>         I have whitespace.el hooked in write-file-hooks.
>>
>>> AFAIK, tabs in texi sources will make the formatted info ugly,
>>> so I usually run `untabify' over the area I edited.
>>
>>         Hmmm. I had never realized that. Thanks for pointing it out.
>
> IMHO, it would be better _not_ do mix topical changes with white space
> changes at all.  It makes merging (with/from Emacs) and tracking
> changes unnecessary hard.  I'd suggest to avoid this.

Indeed.

For this reason, it's not a good idea to use things like "whitespace.el
hooked in write-file-hooks" unless perhaps you are the primary
maintainer of a file or otherwise edit it so often that the resulting
whitespace changes are kept under control.

-Miles

-- 
`Cars give people wonderful freedom and increase their opportunities.
 But they also destroy the environment, to an extent so drastic that
 they kill all social life' (from _A Pattern Language_)




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

* Re: Tabs in texi files
  2007-03-28 22:54     ` Kevin Ryde
@ 2007-03-28 23:12       ` Katsumi Yamaoka
  0 siblings, 0 replies; 8+ messages in thread
From: Katsumi Yamaoka @ 2007-03-28 23:12 UTC (permalink / raw)
  To: ding

>>>>> In <873b3pf07b.fsf@zip.com.au> Kevin Ryde wrote:

> Didier Verna <didier@xemacs.org> writes:

>> So what's the general recommendation for texi files ?

> I use the spot of code below to see any tabs that creep in (usually
> from cutting and pasting code).  I've kept meaning to propose
> something like it for texinfo-mode, but I've been through various
> versions and still haven't got to a balance between warning vs fixing
> vs being overly intrusive.

> (defun my-texinfo-tab-warn-face (beg end)
>   "Put `trailing-whitespace' face on any tabs from BEG to END, as a warning."
>   (save-excursion
>     (goto-char beg)
>     (let ((modified (buffer-modified-p)))
>       (while (re-search-forward "\t+" end t)
>         (put-text-property (match-beginning 0) (match-end 0)
>                            'face 'trailing-whitespace))
>       (set-buffer-modified-p modified))))

> (add-hook 'after-change-functions
>           (lambda (beg end prev-len)
>             (if (eq major-mode 'texinfo-mode)
>                 (my-texinfo-tab-warn-face beg end))))

> (add-hook 'texinfo-mode-hook
>           (lambda ()
>             (my-texinfo-tab-warn-face (point-min) (point-max))))

I use:

http://www.jpl.org/ftp/pub/elisp/develock.el.gz
(or ftp://ftp.jpl.org/pub/elisp/develock.el.gz)



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

end of thread, other threads:[~2007-03-28 23:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-28 15:17 Tabs in texi files Katsumi Yamaoka
2007-03-28 16:21 ` Didier Verna
2007-03-28 16:37   ` Didier Verna
2007-03-28 22:32     ` Katsumi Yamaoka
2007-03-28 22:54     ` Kevin Ryde
2007-03-28 23:12       ` Katsumi Yamaoka
2007-03-28 16:47   ` Reiner Steib
2007-03-28 23:01     ` Miles Bader

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).