all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using defcustom to set width and height for set-window-scroll-bars
@ 2024-05-14  0:34 Heime
  2024-05-14  6:18 ` Eli Zaretskii
  0 siblings, 1 reply; 30+ messages in thread
From: Heime @ 2024-05-14  0:34 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

Am using a defcustom to specify the scroll bar size (width, height) in pixels
for use with set-window-scroll-bars

Emacs seems to get confused in applying width and height.

(defcustom bdrive-barsize 80
  "Customizable variable to store the scroll bar size in pixels."
  :type 'integer
  :group 'bdrive)

  (let ( (window (selected-window))
         (width bdrive-barsize)
         (vertical-type 'right)
         (height bdrive-barsize)
         (horizontal-type 'bottom)
         (persistent nil) )
    (set-window-scroll-bars window width vertical-type
                            height horizontal-type persistent))






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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14  0:34 Using defcustom to set width and height for set-window-scroll-bars Heime
@ 2024-05-14  6:18 ` Eli Zaretskii
  2024-05-14 11:03   ` Heime
  0 siblings, 1 reply; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14  6:18 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 14 May 2024 00:34:23 +0000
> From: Heime <heimeborgia@protonmail.com>
> 
> Am using a defcustom to specify the scroll bar size (width, height) in pixels
> for use with set-window-scroll-bars
> 
> Emacs seems to get confused in applying width and height.
> 
> (defcustom bdrive-barsize 80
>   "Customizable variable to store the scroll bar size in pixels."
>   :type 'integer
>   :group 'bdrive)
> 
>   (let ( (window (selected-window))
>          (width bdrive-barsize)
>          (vertical-type 'right)
>          (height bdrive-barsize)
>          (horizontal-type 'bottom)
>          (persistent nil) )
>     (set-window-scroll-bars window width vertical-type
>                             height horizontal-type persistent))
> 

"Confused" how?  The above snippet works for me.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14  6:18 ` Eli Zaretskii
@ 2024-05-14 11:03   ` Heime
  2024-05-14 11:14     ` Heime
  2024-05-14 11:37     ` Eli Zaretskii
  0 siblings, 2 replies; 30+ messages in thread
From: Heime @ 2024-05-14 11:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Tuesday, May 14th, 2024 at 6:18 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 14 May 2024 00:34:23 +0000
> > From: Heime heimeborgia@protonmail.com
> > 
> > Am using a defcustom to specify the scroll bar size (width, height) in pixels
> > for use with set-window-scroll-bars
> > 
> > Emacs seems to get confused in applying width and height.
> > 
> > (defcustom bdrive-barsize 80
> > "Customizable variable to store the scroll bar size in pixels."
> > :type 'integer
> > :group 'bdrive)
> > 
> > (let ( (window (selected-window))
> > (width bdrive-barsize)
> > (vertical-type 'right)
> > (height bdrive-barsize)
> > (horizontal-type 'bottom)
> > (persistent nil) )
> > (set-window-scroll-bars window width vertical-type
> > height horizontal-type persistent))
> 
> 
> "Confused" how? The above snippet works for me.

The size of the scroll bars that appear do not look correct to me,
they seem too small.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 11:03   ` Heime
@ 2024-05-14 11:14     ` Heime
  2024-05-14 11:37       ` Heime
  2024-05-14 11:38       ` Eli Zaretskii
  2024-05-14 11:37     ` Eli Zaretskii
  1 sibling, 2 replies; 30+ messages in thread
From: Heime @ 2024-05-14 11:14 UTC (permalink / raw)
  To: Heime; +Cc: Eli Zaretskii, help-gnu-emacs

On Tuesday, May 14th, 2024 at 11:03 PM, Heime <heimeborgia@protonmail.com> wrote:

> On Tuesday, May 14th, 2024 at 6:18 PM, Eli Zaretskii eliz@gnu.org wrote:
> 
> > > Date: Tue, 14 May 2024 00:34:23 +0000
> > > From: Heime heimeborgia@protonmail.com
> > > 
> > > Am using a defcustom to specify the scroll bar size (width, height) in pixels
> > > for use with set-window-scroll-bars
> > > 
> > > Emacs seems to get confused in applying width and height.
> > > 
> > > (defcustom bdrive-barsize 80
> > > "Customizable variable to store the scroll bar size in pixels."
> > > :type 'integer
> > > :group 'bdrive)
> > > 
> > > (let ( (window (selected-window))
> > > (width bdrive-barsize)
> > > (vertical-type 'right)
> > > (height bdrive-barsize)
> > > (horizontal-type 'bottom)
> > > (persistent nil) )
> > > (set-window-scroll-bars window width vertical-type
> > > height horizontal-type persistent))
> > 
> > "Confused" how? The above snippet works for me.
> 
> 
> The size of the scroll bars that appear do not look correct to me,
> they seem too small.

Is defcustom with ":type 'integer", the right thing to do in order to allow
users to customise width and height  ?



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 11:14     ` Heime
@ 2024-05-14 11:37       ` Heime
  2024-05-14 11:55         ` Eli Zaretskii
  2024-05-14 11:38       ` Eli Zaretskii
  1 sibling, 1 reply; 30+ messages in thread
From: Heime @ 2024-05-14 11:37 UTC (permalink / raw)
  To: Heime; +Cc: Eli Zaretskii, help-gnu-emacs

On Tuesday, May 14th, 2024 at 11:14 PM, Heime <heimeborgia@protonmail.com> wrote:

> On Tuesday, May 14th, 2024 at 11:03 PM, Heime heimeborgia@protonmail.com wrote:
> 
> > On Tuesday, May 14th, 2024 at 6:18 PM, Eli Zaretskii eliz@gnu.org wrote:
> > 
> > > > Date: Tue, 14 May 2024 00:34:23 +0000
> > > > From: Heime heimeborgia@protonmail.com
> > > > 
> > > > Am using a defcustom to specify the scroll bar size (width, height) in pixels
> > > > for use with set-window-scroll-bars
> > > > 
> > > > Emacs seems to get confused in applying width and height.
> > > > 
> > > > (defcustom bdrive-barsize 80
> > > > "Customizable variable to store the scroll bar size in pixels."
> > > > :type 'integer
> > > > :group 'bdrive)
> > > > 
> > > > (let ( (window (selected-window))
> > > > (width bdrive-barsize)
> > > > (vertical-type 'right)
> > > > (height bdrive-barsize)
> > > > (horizontal-type 'bottom)
> > > > (persistent nil) )
> > > > (set-window-scroll-bars window width vertical-type
> > > > height horizontal-type persistent))
> > > 
> > > "Confused" how? The above snippet works for me.
> > 
> > The size of the scroll bars that appear do not look correct to me,
> > they seem too small.
> 
> 
> Is defcustom with ":type 'integer", the right thing to do in order to allow
> users to customise width and height ?

Have changed the value from 80 to 160, yet I cannot see the difference, one 
should be double the other.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 11:03   ` Heime
  2024-05-14 11:14     ` Heime
@ 2024-05-14 11:37     ` Eli Zaretskii
  1 sibling, 0 replies; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14 11:37 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 14 May 2024 11:03:53 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> On Tuesday, May 14th, 2024 at 6:18 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > > Emacs seems to get confused in applying width and height.
> > > 
> > > (defcustom bdrive-barsize 80
> > > "Customizable variable to store the scroll bar size in pixels."
> > > :type 'integer
> > > :group 'bdrive)
> > > 
> > > (let ( (window (selected-window))
> > > (width bdrive-barsize)
> > > (vertical-type 'right)
> > > (height bdrive-barsize)
> > > (horizontal-type 'bottom)
> > > (persistent nil) )
> > > (set-window-scroll-bars window width vertical-type
> > > height horizontal-type persistent))
> > 
> > 
> > "Confused" how? The above snippet works for me.
> 
> The size of the scroll bars that appear do not look correct to me,
> they seem too small.

They seem okay here.  How did you determine that they are too small?



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 11:14     ` Heime
  2024-05-14 11:37       ` Heime
@ 2024-05-14 11:38       ` Eli Zaretskii
  2024-05-14 11:43         ` Heime
  2024-05-14 13:33         ` Po Lu
  1 sibling, 2 replies; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14 11:38 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 14 May 2024 11:14:59 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs@gnu.org
> 
> Is defcustom with ":type 'integer", the right thing to do in order to allow
> users to customise width and height  ? 

If you want them to be able to specify values that are not numbers,
then no.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 11:38       ` Eli Zaretskii
@ 2024-05-14 11:43         ` Heime
  2024-05-14 12:00           ` Eli Zaretskii
  2024-05-14 13:33         ` Po Lu
  1 sibling, 1 reply; 30+ messages in thread
From: Heime @ 2024-05-14 11:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Tuesday, May 14th, 2024 at 11:38 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 14 May 2024 11:14:59 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: Eli Zaretskii eliz@gnu.org, help-gnu-emacs@gnu.org
> > 
> > Is defcustom with ":type 'integer", the right thing to do in order to allow
> > users to customise width and height ?
> 
> 
> If you want them to be able to specify values that are not numbers,
> then no.

As described in the docs, I am taking that the value provided to the
defcustom variable correspond to dimensions in pixels.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 11:37       ` Heime
@ 2024-05-14 11:55         ` Eli Zaretskii
  0 siblings, 0 replies; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14 11:55 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 14 May 2024 11:37:08 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs@gnu.org
> 
> Have changed the value from 80 to 160, yet I cannot see the difference, one 
> should be double the other.

Strange, because I do see the difference.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 11:43         ` Heime
@ 2024-05-14 12:00           ` Eli Zaretskii
  2024-05-14 13:19             ` Heime
  0 siblings, 1 reply; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14 12:00 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 14 May 2024 11:43:46 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> > > Is defcustom with ":type 'integer", the right thing to do in order to allow
> > > users to customise width and height ?
> > 
> > 
> > If you want them to be able to specify values that are not numbers,
> > then no.
> 
> As described in the docs, I am taking that the value provided to the
> defcustom variable correspond to dimensions in pixels.

That's not all the doc string says about the possible values of width
and height.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 12:00           ` Eli Zaretskii
@ 2024-05-14 13:19             ` Heime
  2024-05-14 13:33               ` Eli Zaretskii
  0 siblings, 1 reply; 30+ messages in thread
From: Heime @ 2024-05-14 13:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Wednesday, May 15th, 2024 at 12:00 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 14 May 2024 11:43:46 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > > Is defcustom with ":type 'integer", the right thing to do in order to allow
> > > > users to customise width and height ?
> > > 
> > > If you want them to be able to specify values that are not numbers,
> > > then no.
> > 
> > As described in the docs, I am taking that the value provided to the
> > defcustom variable correspond to dimensions in pixels.
> 
> 
> That's not all the doc string says about the possible values of width
> and height.

What should be the customary size of width and height ?



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 13:19             ` Heime
@ 2024-05-14 13:33               ` Eli Zaretskii
  0 siblings, 0 replies; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14 13:33 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 14 May 2024 13:19:25 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> On Wednesday, May 15th, 2024 at 12:00 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > > Date: Tue, 14 May 2024 11:43:46 +0000
> > > From: Heime heimeborgia@protonmail.com
> > > Cc: help-gnu-emacs@gnu.org
> > > 
> > > > > Is defcustom with ":type 'integer", the right thing to do in order to allow
> > > > > users to customise width and height ?
> > > > 
> > > > If you want them to be able to specify values that are not numbers,
> > > > then no.
> > > 
> > > As described in the docs, I am taking that the value provided to the
> > > defcustom variable correspond to dimensions in pixels.
> > 
> > 
> > That's not all the doc string says about the possible values of width
> > and height.
> 
> What should be the customary size of width and height ?

I don't understand the question, sorry.  What do you mean by
"customary size" of width and height?



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 11:38       ` Eli Zaretskii
  2024-05-14 11:43         ` Heime
@ 2024-05-14 13:33         ` Po Lu
  2024-05-14 13:54           ` Heime
  2024-05-14 21:33           ` Heime
  1 sibling, 2 replies; 30+ messages in thread
From: Po Lu @ 2024-05-14 13:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Tue, 14 May 2024 11:14:59 +0000
>> From: Heime <heimeborgia@protonmail.com>
>> Cc: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs@gnu.org
>> 
>> Is defcustom with ":type 'integer", the right thing to do in order to allow
>> users to customise width and height  ? 
>
> If you want them to be able to specify values that are not numbers,
> then no.

GTK builds don't implement the scroll-bar-width or scroll-bar-height
parameters, and as usual, through no fault of our own.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 13:33         ` Po Lu
@ 2024-05-14 13:54           ` Heime
  2024-05-14 14:05             ` Eli Zaretskii
  2024-05-14 21:33           ` Heime
  1 sibling, 1 reply; 30+ messages in thread
From: Heime @ 2024-05-14 13:54 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, help-gnu-emacs






Sent with Proton Mail secure email.

On Wednesday, May 15th, 2024 at 1:33 AM, Po Lu <luangruo@yahoo.com> wrote:

> Eli Zaretskii eliz@gnu.org writes:
> 
> > > Date: Tue, 14 May 2024 11:14:59 +0000
> > > From: Heime heimeborgia@protonmail.com
> > > Cc: Eli Zaretskii eliz@gnu.org, help-gnu-emacs@gnu.org
> > > 
> > > Is defcustom with ":type 'integer", the right thing to do in order to allow
> > > users to customise width and height ?
> > 
> > If you want them to be able to specify values that are not numbers,
> > then no.
> 
> 
> GTK builds don't implement the scroll-bar-width or scroll-bar-height
> parameters, and as usual, through no fault of our own.

Have applied a change for width and height to 55 to get the following information.
There is no way that colums and lines are correct.

(55 5 right 55 3 bottom nil)






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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 13:54           ` Heime
@ 2024-05-14 14:05             ` Eli Zaretskii
  2024-05-14 14:09               ` Heime
  2024-05-14 14:19               ` Using defcustom to set width and height for set-window-scroll-bars Heime
  0 siblings, 2 replies; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14 14:05 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 14 May 2024 13:54:59 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs@gnu.org
> 
> Have applied a change for width and height to 55 to get the following information.
> There is no way that colums and lines are correct.
> 
> (55 5 right 55 3 bottom nil)

Why not?  Looks entirely reasonable to me, at least up front and
without knowing the exact metrics of your default-font.

What do default-font-height and default-font-width return in your
case?



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 14:05             ` Eli Zaretskii
@ 2024-05-14 14:09               ` Heime
  2024-05-14 16:53                 ` Eli Zaretskii
  2024-05-14 14:19               ` Using defcustom to set width and height for set-window-scroll-bars Heime
  1 sibling, 1 reply; 30+ messages in thread
From: Heime @ 2024-05-14 14:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs






Sent with Proton Mail secure email.

On Wednesday, May 15th, 2024 at 2:05 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 14 May 2024 13:54:59 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: Eli Zaretskii eliz@gnu.org, help-gnu-emacs@gnu.org
> > 
> > Have applied a change for width and height to 55 to get the following information.
> > There is no way that colums and lines are correct.
> > 
> > (55 5 right 55 3 bottom nil)
> 
> 
> Why not? Looks entirely reasonable to me, at least up front and
> without knowing the exact metrics of your default-font.
> 
> What do default-font-height and default-font-width return in your
> case?

I changed from 

  (55 5 right 55 3 bottom nil)

to

  (80 7 right 80 4 bottom nil)

and the scroll bar sizes look the same with 55 as with 80.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 14:05             ` Eli Zaretskii
  2024-05-14 14:09               ` Heime
@ 2024-05-14 14:19               ` Heime
  2024-05-14 17:04                 ` Eli Zaretskii
  1 sibling, 1 reply; 30+ messages in thread
From: Heime @ 2024-05-14 14:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs






Sent with Proton Mail secure email.

On Wednesday, May 15th, 2024 at 2:05 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 14 May 2024 13:54:59 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: Eli Zaretskii eliz@gnu.org, help-gnu-emacs@gnu.org
> > 
> > Have applied a change for width and height to 55 to get the following information.
> > There is no way that colums and lines are correct.
> > 
> > (55 5 right 55 3 bottom nil)
> 
> 
> Why not? Looks entirely reasonable to me, at least up front and
> without knowing the exact metrics of your default-font.
> 
> What do default-font-height and default-font-width return in your
> case?

(face-attribute 'default :height nil 'default)

gives me 

58 (#o236, #x9e)

With 

  (face-attribute 'default :font)

I have

#<font-object "-PfEd-DejaVu Sans Mono-bold-normal-normal-*-21-*-*-*-m-0-iso10646-1">






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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 14:09               ` Heime
@ 2024-05-14 16:53                 ` Eli Zaretskii
  2024-05-14 18:08                   ` How to tell if Emacs's built with GTK? [was: Using defcustom to set width and height for set-window-scroll-bars] Pierre Rouleau
  0 siblings, 1 reply; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14 16:53 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 14 May 2024 14:09:06 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> I changed from 
> 
>   (55 5 right 55 3 bottom nil)
> 
> to
> 
>   (80 7 right 80 4 bottom nil)
> 
> and the scroll bar sizes look the same with 55 as with 80.

If your build is with GTK, I guess this is due to what Po Lu just
wrote about the GTK scroll bars not supporting these settings.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 14:19               ` Using defcustom to set width and height for set-window-scroll-bars Heime
@ 2024-05-14 17:04                 ` Eli Zaretskii
  2024-05-14 20:13                   ` Heime
  0 siblings, 1 reply; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14 17:04 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 14 May 2024 14:19:57 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> > What do default-font-height and default-font-width return in your
> > case?
> 
> (face-attribute 'default :height nil 'default)
> 
> gives me 
> 
> 58 (#o236, #x9e)

That's not what I asked you to do.  It doesn't answer the question of
how many pixels does each column and each screen line take.  If you do
what I asked, we will have our answers in hand in no time.



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

* How to tell if Emacs's built with GTK? [was: Using defcustom to set width and height for set-window-scroll-bars]
  2024-05-14 16:53                 ` Eli Zaretskii
@ 2024-05-14 18:08                   ` Pierre Rouleau
  2024-05-14 18:25                     ` Eli Zaretskii
  0 siblings, 1 reply; 30+ messages in thread
From: Pierre Rouleau @ 2024-05-14 18:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Tue, May 14, 2024 at 12:54 PM Eli Zaretskii <eliz@gnu.org> wrote:

>
> If your build is with GTK, ...
>
> Out of curiosity, can someone tell if Emacs was built with GTK by
looking at the value of the variable system-configuration-features ?

-- 
/Pierre


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

* Re: How to tell if Emacs's built with GTK? [was: Using defcustom to set width and height for set-window-scroll-bars]
  2024-05-14 18:08                   ` How to tell if Emacs's built with GTK? [was: Using defcustom to set width and height for set-window-scroll-bars] Pierre Rouleau
@ 2024-05-14 18:25                     ` Eli Zaretskii
  2024-05-14 19:12                       ` Pierre Rouleau
  0 siblings, 1 reply; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14 18:25 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Pierre Rouleau <prouleau001@gmail.com>
> Date: Tue, 14 May 2024 14:08:50 -0400
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> Out of curiosity, can someone tell if Emacs was built with GTK by
> looking at the value of the variable system-configuration-features ?

Yes.  Also if you look at system-configuration-options.



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

* Re: How to tell if Emacs's built with GTK? [was: Using defcustom to set width and height for set-window-scroll-bars]
  2024-05-14 18:25                     ` Eli Zaretskii
@ 2024-05-14 19:12                       ` Pierre Rouleau
  2024-05-14 19:25                         ` Eli Zaretskii
  0 siblings, 1 reply; 30+ messages in thread
From: Pierre Rouleau @ 2024-05-14 19:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Tue, May 14, 2024 at 2:26 PM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Pierre Rouleau <prouleau001@gmail.com>
> > Date: Tue, 14 May 2024 14:08:50 -0400
> > Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> >
> > Out of curiosity, can someone tell if Emacs was built with GTK by
> > looking at the value of the variable system-configuration-features ?
>
> Yes.  Also if you look at system-configuration-options.
>

Is it always the case?

I have a system that shows an *empty string* for
system-configuration-options.
It's an instance of Emacs 28.2, running on an old Ubunbu 16.4 in a VM.
I might have built that myself (don't remember).
And in this instance of Emacs, "GTK3" is part of the words of
system-configuration-features.
Should one expect to see an empty. string in system-configuration-options?
What might cause that?

On this system, the string printed by emacs-version is:
"GNU Emacs 28.2 (build 1, x86_64_pc-linux-gnu, GTK+, Version 3.18.9, cairo
version 1.14.6) of 2023-01-06"

-- 
/Pierre


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

* Re: How to tell if Emacs's built with GTK? [was: Using defcustom to set width and height for set-window-scroll-bars]
  2024-05-14 19:12                       ` Pierre Rouleau
@ 2024-05-14 19:25                         ` Eli Zaretskii
  2024-05-14 20:01                           ` Pierre Rouleau
  0 siblings, 1 reply; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-14 19:25 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Pierre Rouleau <prouleau001@gmail.com>
> Date: Tue, 14 May 2024 15:12:24 -0400
> Cc: help-gnu-emacs@gnu.org
> 
>  > Out of curiosity, can someone tell if Emacs was built with GTK by
>  > looking at the value of the variable system-configuration-features ?
> 
>  Yes.  Also if you look at system-configuration-options.
> 
> Is it always the case?  

AFAIK, yes, as long as Emacs is built using unmodified configury.

> I have a system that shows an *empty string* for system-configuration-options.
> It's an instance of Emacs 28.2, running on an old Ubunbu 16.4 in a VM. 
> I might have built that myself (don't remember).
> And in this instance of Emacs, "GTK3" is part of the words of system-configuration-features.
> Should one expect to see an empty. string in system-configuration-options?

No.

> What might cause that? 

No clue.  AFAIK, GTK is not the default, you need to say at least
"--with-x-toolkit=yes".

> On this system, the string printed by emacs-version is: 
> "GNU Emacs 28.2 (build 1, x86_64_pc-linux-gnu, GTK+, Version 3.18.9, cairo version 1.14.6) of 2023-01-06"

So system-configuration itself already mentions GTK.

May I ask why you are asking these questions?



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

* Re: How to tell if Emacs's built with GTK? [was: Using defcustom to set width and height for set-window-scroll-bars]
  2024-05-14 19:25                         ` Eli Zaretskii
@ 2024-05-14 20:01                           ` Pierre Rouleau
  2024-05-15  2:34                             ` Eli Zaretskii
  0 siblings, 1 reply; 30+ messages in thread
From: Pierre Rouleau @ 2024-05-14 20:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Tue, May 14, 2024 at 3:26 PM Eli Zaretskii <eliz@gnu.org> wrote:

>
> May I ask why you are asking these questions?
>
> Sure.

Sometime ago, (can't remember why at the moment), I needed to
determine if the Emacs instance was built with --with-modules
configure switch.
At that time I looked for ways to determine that and did not really
find anything I could rely on.

When I saw your previous message to Heime I asked the question
on GTK because it's another aspect of the build and assumed that
the information for modules might also be there.
I saw the "--with-modules" inside the system-configuration-options string
variable
I just learned about and checked in several environments I use.

Overall it's to learn and allow me to improve my environment and
Emacs-based project (PEL).
I want to learn more about the Emacs build process and
the various aspects; gccemacs, treesitter, LSP, etc...

-- 
/Pierre


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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 17:04                 ` Eli Zaretskii
@ 2024-05-14 20:13                   ` Heime
  2024-05-15  2:35                     ` Eli Zaretskii
  0 siblings, 1 reply; 30+ messages in thread
From: Heime @ 2024-05-14 20:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Wednesday, May 15th, 2024 at 5:04 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 14 May 2024 14:19:57 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > What do default-font-height and default-font-width return in your
> > > case?
> > 
> > (face-attribute 'default :height nil 'default)
> > 
> > gives me
> > 
> > 58 (#o236, #x9e)
> 
> 
> That's not what I asked you to do. It doesn't answer the question of
> how many pixels does each column and each screen line take. If you do
> what I asked, we will have our answers in hand in no time.

What commands do I have to rum to get the information you asked ?



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 13:33         ` Po Lu
  2024-05-14 13:54           ` Heime
@ 2024-05-14 21:33           ` Heime
  1 sibling, 0 replies; 30+ messages in thread
From: Heime @ 2024-05-14 21:33 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, help-gnu-emacs

On Wednesday, May 15th, 2024 at 1:33 AM, Po Lu <luangruo@yahoo.com> wrote:

> Eli Zaretskii eliz@gnu.org writes:
> 
> > > Date: Tue, 14 May 2024 11:14:59 +0000
> > > From: Heime heimeborgia@protonmail.com
> > > Cc: Eli Zaretskii eliz@gnu.org, help-gnu-emacs@gnu.org
> > > 
> > > Is defcustom with ":type 'integer", the right thing to do in order to allow
> > > users to customise width and height ?
> > 
> > If you want them to be able to specify values that are not numbers,
> > then no.
> 
> 
> GTK builds don't implement the scroll-bar-width or scroll-bar-height
> parameters, and as usual, through no fault of our own.

I can see change in sizes though with smaller values.  Could you put brief 
comments about the width and height limitations emanating from GTK builds.

Users get the impression that one can change the values to their choice.

One could say that set-window-scroll-bars includes features introduced 
without looking deeper in GTK implementations.




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

* Re: How to tell if Emacs's built with GTK? [was: Using defcustom to set width and height for set-window-scroll-bars]
  2024-05-14 20:01                           ` Pierre Rouleau
@ 2024-05-15  2:34                             ` Eli Zaretskii
  0 siblings, 0 replies; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-15  2:34 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Pierre Rouleau <prouleau001@gmail.com>
> Date: Tue, 14 May 2024 16:01:28 -0400
> Cc: help-gnu-emacs@gnu.org
> 
> On Tue, May 14, 2024 at 3:26 PM Eli Zaretskii <eliz@gnu.org> wrote:
> 
>  May I ask why you are asking these questions?
> 
> Sure.
> 
> Sometime ago, (can't remember why at the moment), I needed to 
> determine if the Emacs instance was built with --with-modules 
> configure switch.  
> At that time I looked for ways to determine that and did not really
> find anything I could rely on.
> 
> When I saw your previous message to Heime I asked the question
> on GTK because it's another aspect of the build and assumed that
> the information for modules might also be there.  
> I saw the "--with-modules" inside the system-configuration-options string variable  
> I just learned about and checked in several environments I use.
> 
> Overall it's to learn and allow me to improve my environment and 
> Emacs-based project (PEL). 
> I want to learn more about the Emacs build process and
> the various aspects; gccemacs, treesitter, LSP, etc...  

OK, thanks.

Some features are seen via system-configuration, some via
system-configuration-options, and some via
system-configuration-features.  Some are seen in more than one of
these.



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-14 20:13                   ` Heime
@ 2024-05-15  2:35                     ` Eli Zaretskii
  2024-05-15  2:48                       ` Heime
  0 siblings, 1 reply; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-15  2:35 UTC (permalink / raw)
  To: Heime; +Cc: help-gnu-emacs

> Date: Tue, 14 May 2024 20:13:23 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> On Wednesday, May 15th, 2024 at 5:04 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > > Date: Tue, 14 May 2024 14:19:57 +0000
> > > From: Heime heimeborgia@protonmail.com
> > > Cc: help-gnu-emacs@gnu.org
> > > 
> > > > What do default-font-height and default-font-width return in your
> > > > case?
> > > 
> > > (face-attribute 'default :height nil 'default)
> > > 
> > > gives me
> > > 
> > > 58 (#o236, #x9e)
> > 
> > 
> > That's not what I asked you to do. It doesn't answer the question of
> > how many pixels does each column and each screen line take. If you do
> > what I asked, we will have our answers in hand in no time.
> 
> What commands do I have to rum to get the information you asked ?

The ones I mentioned above, default-font-width and
default-font-height.

But those are not commands, they are functions, so you invoke them via
M-:



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-15  2:35                     ` Eli Zaretskii
@ 2024-05-15  2:48                       ` Heime
  2024-05-15 11:24                         ` Eli Zaretskii
  0 siblings, 1 reply; 30+ messages in thread
From: Heime @ 2024-05-15  2:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs






Sent with Proton Mail secure email.

On Wednesday, May 15th, 2024 at 2:35 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 14 May 2024 20:13:23 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: help-gnu-emacs@gnu.org
> > 
> > On Wednesday, May 15th, 2024 at 5:04 AM, Eli Zaretskii eliz@gnu.org wrote:
> > 
> > > > Date: Tue, 14 May 2024 14:19:57 +0000
> > > > From: Heime heimeborgia@protonmail.com
> > > > Cc: help-gnu-emacs@gnu.org
> > > > 
> > > > > What do default-font-height and default-font-width return in your
> > > > > case?
> > > > 
> > > > (face-attribute 'default :height nil 'default)
> > > > 
> > > > gives me
> > > > 
> > > > 58 (#o236, #x9e)
> > > 
> > > That's not what I asked you to do. It doesn't answer the question of
> > > how many pixels does each column and each screen line take. If you do
> > > what I asked, we will have our answers in hand in no time.
> > 
> > What commands do I have to rum to get the information you asked ?
> 
> 
> The ones I mentioned above, default-font-width and
> default-font-height.
> 
> But those are not commands, they are functions, so you invoke them via
> M-:

I get

13 (#o15, #xd, ?\C-m)
25 (#o31, #x19, ?\C-y)



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

* Re: Using defcustom to set width and height for set-window-scroll-bars
  2024-05-15  2:48                       ` Heime
@ 2024-05-15 11:24                         ` Eli Zaretskii
  0 siblings, 0 replies; 30+ messages in thread
From: Eli Zaretskii @ 2024-05-15 11:24 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 15 May 2024 02:48:05 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> > > > > > What do default-font-height and default-font-width return in your
> > > > > > case?
> > > > > 
> > > > > (face-attribute 'default :height nil 'default)
> > > > > 
> > > > > gives me
> > > > > 
> > > > > 58 (#o236, #x9e)
> > > > 
> > > > That's not what I asked you to do. It doesn't answer the question of
> > > > how many pixels does each column and each screen line take. If you do
> > > > what I asked, we will have our answers in hand in no time.
> > > 
> > > What commands do I have to rum to get the information you asked ?
> > 
> > 
> > The ones I mentioned above, default-font-width and
> > default-font-height.
> > 
> > But those are not commands, they are functions, so you invoke them via
> > M-:
> 
> I get
> 
> 13 (#o15, #xd, ?\C-m)
> 25 (#o31, #x19, ?\C-y)

Then 3 and 5 you got from window-scroll-bars was not far off the
target.



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

end of thread, other threads:[~2024-05-15 11:24 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-14  0:34 Using defcustom to set width and height for set-window-scroll-bars Heime
2024-05-14  6:18 ` Eli Zaretskii
2024-05-14 11:03   ` Heime
2024-05-14 11:14     ` Heime
2024-05-14 11:37       ` Heime
2024-05-14 11:55         ` Eli Zaretskii
2024-05-14 11:38       ` Eli Zaretskii
2024-05-14 11:43         ` Heime
2024-05-14 12:00           ` Eli Zaretskii
2024-05-14 13:19             ` Heime
2024-05-14 13:33               ` Eli Zaretskii
2024-05-14 13:33         ` Po Lu
2024-05-14 13:54           ` Heime
2024-05-14 14:05             ` Eli Zaretskii
2024-05-14 14:09               ` Heime
2024-05-14 16:53                 ` Eli Zaretskii
2024-05-14 18:08                   ` How to tell if Emacs's built with GTK? [was: Using defcustom to set width and height for set-window-scroll-bars] Pierre Rouleau
2024-05-14 18:25                     ` Eli Zaretskii
2024-05-14 19:12                       ` Pierre Rouleau
2024-05-14 19:25                         ` Eli Zaretskii
2024-05-14 20:01                           ` Pierre Rouleau
2024-05-15  2:34                             ` Eli Zaretskii
2024-05-14 14:19               ` Using defcustom to set width and height for set-window-scroll-bars Heime
2024-05-14 17:04                 ` Eli Zaretskii
2024-05-14 20:13                   ` Heime
2024-05-15  2:35                     ` Eli Zaretskii
2024-05-15  2:48                       ` Heime
2024-05-15 11:24                         ` Eli Zaretskii
2024-05-14 21:33           ` Heime
2024-05-14 11:37     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.