Skip to content
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

don't add newline when running org-download-clipboard #217

Open
pjhfggij opened this issue Oct 4, 2024 · 0 comments
Open

don't add newline when running org-download-clipboard #217

pjhfggij opened this issue Oct 4, 2024 · 0 comments

Comments

@pjhfggij
Copy link

pjhfggij commented Oct 4, 2024

running org-download-clipboard out of the box (in doom emacs) inserts newline at cursor before placing the image link

could this be disabled? I've tried adding an advice (below), but it didn't work - I prefer to keep lines in org files compact

image

(defun my/org-download-clipboard-no-newline (&rest _)
  "Remove extra newline after `org-download-clipboard`."
  (save-excursion
    (when (looking-at "\n")
      (delete-char 1))))

(advice-add 'org-download-clipboard :after 'my/org-download-clipboard-no-newline)
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

No branches or pull requests

1 participant