help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is `(1 . width)` zero?


From: Robert Thorpe
Subject: Re: Why is `(1 . width)` zero?
Date: Tue, 19 Jan 2021 06:53:57 +0000

Jörg Sommer <joerg@jo-so.de> writes:

> [1:text/plain Hide]
>
> Hi,
>
> I'm using GNU Emacs 27.1¹ with X and the font DejaVu Sans Mono. I would like
> to align a text on the right side and thought I can use this:
>
> ```lisp
> (let* ((text " abcd")
>        (len (length text))
>        )
>   (add-text-properties 0 1 `(display (space :align-to (- text (,len . 
> width)))) text)
>   (insert "\n" (format "%S" text) "\n" text "\n"))
> ```

I don't understand your problem.  But I this snippet looks wrong:

>   (- text (,len . width))

You can't do arithmetic on a pair.

BR,
Robert Thorpe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]