unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Where is the vertical-border char set?
@ 2014-04-30  7:55 Trent W. Buck
  2014-04-30 14:21 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Trent W. Buck @ 2014-04-30  7:55 UTC (permalink / raw)
  To: emacs-devel

Stupidly, I started doing this today:

    (setq mode-line-end-spaces (make-string 1024 ?─))

It makes the modeline look prettier (except when it doesn't).
The 1024 is arbitrary, it replaces %- (infinite MINUS HYPHEN).
I can't see how to ask for infinity of an arbitrary codepoint.

I want to do the same thing for the vertical-border character,
which is "|" for me (my window-system is nil).

Where do I set that?
CAN I set that?
I tried apropos-variable and apropos-value and grepping lisp/ and src/,
but my fu is weak.




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

* Re: Where is the vertical-border char set?
  2014-04-30  7:55 Where is the vertical-border char set? Trent W. Buck
@ 2014-04-30 14:21 ` Eli Zaretskii
  2014-05-01  0:32   ` Trent W. Buck
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2014-04-30 14:21 UTC (permalink / raw)
  To: Trent W. Buck; +Cc: emacs-devel

> From: trentbuck@gmail.com (Trent W. Buck)
> Date: Wed, 30 Apr 2014 17:55:52 +1000
> 
> Stupidly, I started doing this today:
> 
>     (setq mode-line-end-spaces (make-string 1024 ?─))
> 
> It makes the modeline look prettier (except when it doesn't).
> The 1024 is arbitrary, it replaces %- (infinite MINUS HYPHEN).
> I can't see how to ask for infinity of an arbitrary codepoint.

What's wrong with 1024?  If that might be too few, enlarge it.

> I want to do the same thing for the vertical-border character,

I hope by "do the same thing" you do NOT mean to have 1024 characters
as the border, but rather replace "|" with some non-ASCII character.

> Where do I set that?

It hides in one of the extra slots of the display table.  See the node
"Display Tables" in the ELisp manual.

> CAN I set that?

Yes, something like

  (set-display-table-slot (setq standard-display-table (make-display-table))
                          'vertical-border ?│)

But beware: the character you use must be encodable by your
terminal-coding-system, otherwise you will get a question mark "?"
instead of your fancy character.

(Personally, I question the utility of doing what you want, but that's
me.)




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

* Re: Where is the vertical-border char set?
  2014-04-30 14:21 ` Eli Zaretskii
@ 2014-05-01  0:32   ` Trent W. Buck
  2014-05-01  2:48     ` Eli Zaretskii
  2014-05-02  2:42     ` Trent W. Buck
  0 siblings, 2 replies; 6+ messages in thread
From: Trent W. Buck @ 2014-05-01  0:32 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: trentbuck@gmail.com (Trent W. Buck)
>> Date: Wed, 30 Apr 2014 17:55:52 +1000
>> 
>> Stupidly, I started doing this today:
>> 
>>     (setq mode-line-end-spaces (make-string 1024 ?─))
>> 
>> It makes the modeline look prettier (except when it doesn't).
>> The 1024 is arbitrary, it replaces %- (infinite MINUS HYPHEN).
>> I can't see how to ask for infinity of an arbitrary codepoint.
>
> What's wrong with 1024?  If that might be too few, enlarge it.

It works; it just feels inelegant compared to %-.

>> I want to do the same thing for the vertical-border character,
>
> I hope by "do the same thing" you do NOT mean to have 1024 characters
> as the border, but rather replace "|" with some non-ASCII character.
>
>> Where do I set that?
>
> It hides in one of the extra slots of the display table.  See the node
> "Display Tables" in the ELisp manual.

Ah, thanks -- I found disp-table but from reading it I thought it was
only used for M-x list charset chars RET, and (make-display-table)
didn't use a "|" as its default vertical-border, which fooled me.

> Yes, something like
>
>   (set-display-table-slot (setq standard-display-table (make-display-table))
>                           'vertical-border ?│)

This works for me:
(set-display-table-slot standard-display-table 'vertical-border ?│)

> But beware: the character you use must be encodable by your
> terminal-coding-system, otherwise you will get a question mark "?"
> instead of your fancy character.
>
> (Personally, I question the utility of doing what you want, but that's
> me.)

Understood; thus the "Stupidly" at the start of my email.

Anywhere modern enough that I have Emacs and dotfiles installed,
bloody well ought to be UTF-8 throughout, so I'm not to worried.
If it annoys me I'll just turn it off again.

It already looks funny in DejaVu Sans Mono at certain :pixelsize's,
because the hinter makes the "ends" of each char a bit fatter, so you
end up with a fuzzy pulse.  Oh well.




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

* Re: Where is the vertical-border char set?
  2014-05-01  0:32   ` Trent W. Buck
@ 2014-05-01  2:48     ` Eli Zaretskii
  2014-05-02  2:42     ` Trent W. Buck
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2014-05-01  2:48 UTC (permalink / raw)
  To: Trent W. Buck; +Cc: emacs-devel

> From: trentbuck@gmail.com (Trent W. Buck)
> Date: Thu, 01 May 2014 10:32:07 +1000
> 
> > Yes, something like
> >
> >   (set-display-table-slot (setq standard-display-table (make-display-table))
> >                           'vertical-border ?│)
> 
> This works for me:
> (set-display-table-slot standard-display-table 'vertical-border ?│)

The default value of standard-display-table is nil.

> Anywhere modern enough that I have Emacs and dotfiles installed,
> bloody well ought to be UTF-8 throughout, so I'm not to worried.

Not every "modern enough" environment will be able to do that on a
TTY.

> It already looks funny in DejaVu Sans Mono at certain :pixelsize's,
> because the hinter makes the "ends" of each char a bit fatter, so you
> end up with a fuzzy pulse.  Oh well.

That's what I meant when I questioned the utility of this.




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

* Re: Where is the vertical-border char set?
  2014-05-01  0:32   ` Trent W. Buck
  2014-05-01  2:48     ` Eli Zaretskii
@ 2014-05-02  2:42     ` Trent W. Buck
  2014-05-02  7:24       ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Trent W. Buck @ 2014-05-02  2:42 UTC (permalink / raw)
  To: emacs-devel

Waah, I ran into a problem.

Vertical split switches back to using '|' character in at least one mode:
when rcirc is the left window in the split.

Looks like rcirc has a buffer-local disp-table so that it can show the
little arrow in the fringe (or over the top of text, in the tty) to show
where evaluation is up to.

So now I'm up to

    (setq mode-line-end-spaces (make-string 1024 ?─))
    (set-display-table-slot standard-display-table 'vertical-border ?│)
    (add-hook 'rcirc-mode-hook
      (λ ()
        (set-display-table-slot buffer-display-table 'vertical-border ?│)))




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

* Re: Where is the vertical-border char set?
  2014-05-02  2:42     ` Trent W. Buck
@ 2014-05-02  7:24       ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2014-05-02  7:24 UTC (permalink / raw)
  To: Trent W. Buck; +Cc: emacs-devel

> From: trentbuck@gmail.com (Trent W. Buck)
> Date: Fri, 02 May 2014 12:42:40 +1000
> 
> Waah, I ran into a problem.
> 
> Vertical split switches back to using '|' character in at least one mode:
> when rcirc is the left window in the split.
> 
> Looks like rcirc has a buffer-local disp-table so that it can show the
> little arrow in the fringe (or over the top of text, in the tty) to show
> where evaluation is up to.

These facilities are indeed intended for specialized modes and
commands, not for users.



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

end of thread, other threads:[~2014-05-02  7:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30  7:55 Where is the vertical-border char set? Trent W. Buck
2014-04-30 14:21 ` Eli Zaretskii
2014-05-01  0:32   ` Trent W. Buck
2014-05-01  2:48     ` Eli Zaretskii
2014-05-02  2:42     ` Trent W. Buck
2014-05-02  7:24       ` Eli Zaretskii

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