Skip to content

dslide-make-header: info-line takes one line of space below title, even if all of dslide-header-* are nil #32

@FrankRuben

Description

@FrankRuben

Function dslide-make-header computes binding info-line as the line to be printed below the title.

This function evaluates the three variables dslide-header-{info-elem} which are supposed to be set to nil, if the respective info element should not be shown.

At least my expectation would be that no info line is shown (and one more line can be used for the slide content) if all three dslide-header-{info-elem} are set to nil.

This does currently not happen, since in that case the info line is computed as (concat nil nil nil) which will be "" and not nil.

The following small change for computing info-line would help:

(info-line (let ((info-line (concat
                                        (when (and  dslide-header-date date)
                                          (dslide--info-face (concat date "  ")))
                                        (when (and  dslide-header-author author)
                                          (dslide--info-face (concat author "  ")))
                                        (when (and  dslide-header-email email)
                                          (dslide--info-face (concat email "  "))))))
                        (cond  ((not info-line) nil)
                               ((string-empty-p info-line) nil) ; (concat nil nil nil) => ""
                               (t info-line))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions