Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add ascii option to dashboard-startup-banner #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 16, 2023
Merged

Add ascii option to dashboard-startup-banner #436

merged 4 commits into from
Feb 16, 2023

Conversation

6b6279
Copy link
Contributor

@6b6279 6b6279 commented Feb 15, 2023

Should close #404.

I have done some rudimentary testing. (put-text-property (point) (point-max) 'face 'dashboard-text-banner) seems to not format the text added through insert in line 597. Why that’s the case, I unfortunately do not know. Any tips are welcome.

Copy link
Member

@jcs090218 jcs090218 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nit.

Otherwise, LGTM. 👍

@6b6279
Copy link
Contributor Author

6b6279 commented Feb 16, 2023

Would that suffice?

Sorry, I had to change the commit message after pushing; I figured the initial message was a bit too open-ended.

Copy link
Member

@jcs090218 jcs090218 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT! Thanks for your contribution!

@jcs090218 jcs090218 merged commit ec61c1b into emacs-dashboard:master Feb 16, 2023
@andrewbanchich
Copy link

I tested this out and noticed that the ASCII dashboard now is horizontally aligned to that the start of the banner is at the center, whereas before it was that the center of the of the banner was at the center.

@6b6279
Copy link
Contributor Author

6b6279 commented Feb 20, 2023

Apparently insert moves the point to the end of the appended text (unlike insert-file-contents, which does not manipulate the point). To ensure that insert-file-contents and insert have the same point behavior, insert must be wrapped in a save-excursion block.
With (save-excursion (insert txt)), the issue is solved:
20230220_19h55m30s_grim

@6b6279 6b6279 deleted the issue-404 branch February 20, 2023 18:58
jcs090218 pushed a commit that referenced this pull request Feb 20, 2023
Ensure that insert doesn't move point in dashboard-insert-banner when using ascii banner
@andrewbanchich
Copy link

Not sure I follow @6b6279 (I'm not great with elisp). I tried adding (save-excursion (insert txt)) in the :config section of my use-package and it says the txt symbol's value as variable is void.

@6b6279
Copy link
Contributor Author

6b6279 commented Feb 20, 2023

Not sure I follow @6b6279 (I'm not great with elisp). I tried adding (save-excursion (insert txt)) in the :config section of my use-package and it says the txt symbol's value as variable is void.

I was talking about the insert call in the dashboard-insert-banner function. See the pull request that was just merged (#440).

@andrewbanchich
Copy link

Gotcha, thanks!

@jcs090218
Copy link
Member

@6b6279 Forgot to mention, would you like to open a PR for documentation?

@6b6279
Copy link
Contributor Author

6b6279 commented Feb 21, 2023

@jcs090218 Documentation? You mean like a short snippet in the README file on how to use the ASCII banner setting?

@jcs090218
Copy link
Member

@6b6279 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline logo
3 participants