unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: Chong Yidong <cyd@stupidchicken.com>, 1779@debbugs.gnu.org
Subject: bug#1779: 23.0.60; proced with variable-pitch header line
Date: Tue, 19 Jul 2011 23:24:26 +0200	[thread overview]
Message-ID: <87r55motf9.fsf@escher.fritz.box> (raw)
In-Reply-To: <8739i72r0o.fsf@escher.fritz.box> (Stephen Berman's message of "Fri, 15 Jul 2011 23:05:59 +0200")

On Fri, 15 Jul 2011 23:05:59 +0200 Stephen Berman <stephen.berman@gmx.net> wrote:

> On Fri, 15 Jul 2011 19:54:11 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
>
>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>
>>> I guess lack of time.  I don't think I agree with the change to the face
>>> definition, but the part of the code that adds :align-to properties to
>>> the spaces looks fine.
>>
>> Stephen, could you send an updated patch with just the :align-to
>> properties?  (If that makes any sense.  :-)  I'm not familiar enough
>> with the code to know whether that would be an improvement or not
>> without the other bits in the patch.)
>
> Sure.  I'll do it as soon as I can, but I probably won't have time until
> Monday or Tuesday.

The patch is below.  The only change I made from the previous patch
(aside from leaving out the face change) is to omit the comment from
buff-menu.el about assuming fixed-pitch, since obviously we aren't
making that assumption (though it's true that :align-to works best with
fixed-pitch, but still I definitely think it's an improvement).

Steve Berman


*** /home/steve/bzr/emacs/trunk/lisp/proced.el	2011-07-08 15:13:26.000000000 +0200
--- /home/steve/bzr/emacs/quickfixes/lisp/proced.el	2011-07-19 23:06:48.000000000 +0200
***************
*** 1509,1514 ****
--- 1509,1524 ----
      (if (string-match "[ \t]+$" proced-header-line)
          (setq proced-header-line (substring proced-header-line 0
                                              (match-beginning 0))))
+      (setq proced-header-line (concat "  " proced-header-line))
+      ;; From buff-menu.el: Turn whitespace chars in the header into
+      ;; stretch specs so they work regardless of the header-line face.
+      (let ((pos 0)
+      	  (header proced-header-line))
+      	(while (string-match "[ \t\n]+" header pos)
+      	  (setq pos (match-end 0))
+      	  (put-text-property (match-beginning 0) pos 'display
+      			     (list 'space :align-to pos)
+      			     header)))
      ;; (delete-trailing-whitespace)
      (goto-char (point-min))
      (while (re-search-forward "[ \t\r]+$" nil t)
***************
*** 1602,1608 ****
      (while (not (eobp))
        (insert "  ")
        (forward-line))
-     (setq proced-header-line (concat "  " proced-header-line))
      (if revert (set-buffer-modified-p nil))
  
      ;; set `goal-column'
--- 1612,1617 ----





  reply	other threads:[~2011-07-19 21:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-04  8:23 bug#1779: 23.0.60; proced with variable-pitch header line Chong Yidong
2009-01-04 15:01 ` Stephen Berman
2009-01-04 15:46   ` Stefan Monnier
2010-12-05 23:30 ` Stephen Berman
2010-12-07 10:40   ` Stephen Berman
2011-07-10 14:47     ` Lars Magne Ingebrigtsen
2011-07-11  3:36       ` Stefan Monnier
2011-07-15 17:54         ` Lars Magne Ingebrigtsen
2011-07-15 21:05           ` Stephen Berman
2011-07-19 21:24             ` Stephen Berman [this message]
2009-01-03 22:02               ` Stephen Berman
2011-07-20  1:18                 ` Roland Winkler
2011-07-20  8:28                   ` Stephen Berman
2011-07-20  9:54                     ` Lars Magne Ingebrigtsen
2020-10-11 22:22                       ` Stefan Monnier
2020-10-11 22:50                         ` Stephen Berman
2021-11-22 17:40                         ` Juri Linkov
2021-11-24  6:53                           ` Lars Ingebrigtsen
2021-11-24  9:15                             ` Juri Linkov
2021-11-24 16:51                               ` Lars Ingebrigtsen
2021-11-24 18:51                                 ` bug#1779: [External] : " Drew Adams
2021-11-29 17:16                                 ` Juri Linkov
2021-11-29 18:05                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 18:47                                     ` Lars Ingebrigtsen
2021-11-29 18:55                                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2011-07-20 11:56                     ` Roland Winkler
2011-07-21 16:41                       ` Chong Yidong
2011-07-22  3:03                         ` Roland Winkler
2011-07-22  5:15                           ` Chong Yidong
2022-04-24 14:00                 ` Lars Ingebrigtsen
2011-07-19 21:31               ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r55motf9.fsf@escher.fritz.box \
    --to=stephen.berman@gmx.net \
    --cc=1779@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).