protesilaos / spacious-padding

Increase the padding/spacing of GNU Emacs frames and windows.
GNU General Public License v3.0
59 stars 2 forks source link

Possible bug in `spacious-padding-set-window-divider` #11

Open larsen opened 3 months ago

larsen commented 3 months ago

Hello Protesilaos,

first of all thank you for this package, I really like the aesthetic changes it allows.

While working on my configuration I found a condition that perhaps should be addressed (in the code or the documentation).

Reading the docstring for spacious-padding-widths I thought that it was not required to specify all the elements in the new plist. For example, at a certain point it says (emphasys added by me):

The more specific keys :left-fringe-width and :right-fringe-wdith can be used for finer control.

I extended this and interpreted the instructions as they were saying that all keys are optional, and somehow defaults are enforced for those not specified.

But, elsewhere in the code:

https://github.com/protesilaos/spacious-padding/blob/21be66a8293292234a7e4624c35f6645a044f7fa/spacious-padding.el#L261

Since I initially didn't specify a value for :right-divider-width, the call to plist-get returns NIL, which > does not like.

I think there should be a guard, a default value, or a note in the docstring specifying what values are mandatory.

protesilaos commented 2 months ago

Hello @larsen!

Yes, this is a good point. I think it is better to have reasonable fallback values for everything and to assume that the user opts in to them.