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

Change: abbreviate the file name in the created record #9

Merged
merged 3 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ You can also customize the variable =org-bookmark-jump-indirect= to make Org boo

* Changelog

** 1.4-pre

*Changes*

+ Abbreviate filenames with ~abbreviate-file-name~. ([[https://github.com/alphapapa/org-bookmark-heading/pull/9][#9]]. Thanks to [[https://github.com/akirak][Akira Komamura]].)

** 1.3.1

*Fixes*
Expand Down
4 changes: 2 additions & 2 deletions org-bookmark-heading.el
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;;; org-bookmark-heading.el --- Emacs bookmark support for Org mode -*- lexical-binding: t; -*-

;; Author: Adam Porter <adam@alphapapa.net>
;; Version: 1.3.1
;; Version: 1.4-pre
;; Url: http://github.com/alphapapa/org-bookmark-heading
;; Package-Requires: ((emacs "24.4"))
;; Keywords: hypermedia, outlines
Expand Down Expand Up @@ -120,7 +120,7 @@ Called with point on heading. Can be used to, e.g. cycle visibility."
(defun org-bookmark-heading-make-record ()
"Return bookmark record for current heading.
Sets ID property for heading if necessary."
(let* ((filename (buffer-file-name (org-base-buffer (current-buffer))))
(let* ((filename (abbreviate-file-name (buffer-file-name (org-base-buffer (current-buffer)))))
(display-filename (funcall org-bookmark-heading-filename-fn filename))
(heading (unless (org-before-first-heading-p)
(org-link-display-format (org-get-heading t t))))
Expand Down