Skip to content

Move point to the first section#387

Open
mmahmoudian wants to merge 1 commit intoemacs-dashboard:masterfrom
mmahmoudian:move-point-to-first-section
Open

Move point to the first section#387
mmahmoudian wants to merge 1 commit intoemacs-dashboard:masterfrom
mmahmoudian:move-point-to-first-section

Conversation

@mmahmoudian
Copy link
Copy Markdown
Contributor

This addresses #379

I'm very new to emacs and elisp, therefore although this change is very small, but still it needs to be checked.

If this works out and is up to your standard, I will create another PR for another issue that I have managed to solve on my end.

Thanks.

@jcs090218
Copy link
Copy Markdown
Member

I would suggest to add a defcustom variable for this behavior, WDYT?

@ppareit
Copy link
Copy Markdown

ppareit commented Oct 14, 2025

I now have this configuration:

(use-package dashboard
 ...
 :hook
    (dashboard-mode . (lambda ()
			(run-with-timer 0 nil #'dashboard-jump-to-recents))))

so having the proposed functionality would be helpful.

@ricardoricho
Copy link
Copy Markdown
Contributor

ricardoricho commented Oct 17, 2025

Hi, I think the solution in this comment is the right one:

(add-hook 'dashboard-after-initialize-hook 'dashboard-jump-to-recents)

If you want to move to the first item in the first section then:

(add-hook 'dashboard-after-initialize-hook 
  (lambda ()
      (dashboard-goto-section-by-index 1)
	  (widget-forward 1)))

Maybe we need another hooks that run before and after insert the startupify
list, because dashboard-after-initialize-hook runs inside
dashboard-initialize and we don't always use that function

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants