Skip to content

Commit

Permalink
Change pos-bol and pos-eol to point-at-bol and point-at-eol to be com…
Browse files Browse the repository at this point in the history
…patible with older versions of Emacs
  • Loading branch information
jayemar committed Oct 19, 2024
1 parent 8000f2d commit c7d39e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Emacs front-end for [[https://obsidian.md/][Obsidian Notes]].
- [[#initel][init.el]]
- [[#obsidian-mode][obsidian-mode]]
- [[#obsidian-backlinks-mode][obsidian-backlinks-mode]]
- [[#including-hidden-dot-files][Including hidden dot files]]
- [[#additional-customization][Additional Customization]]
- [[#usage][Usage]]
- [[#creating-a-new-note][Creating a new note]]
Expand Down Expand Up @@ -100,7 +99,7 @@ Put this in your ~init.el~:
(obsidian-backlinks-mode t)
#+end_src

*Or using [[https://github.com/jwiegley/use-package][use-package]]:*
or using [[https://github.com/jwiegley/use-package][use-package]]:

#+begin_src elisp
(use-package obsidian
Expand Down Expand Up @@ -132,8 +131,6 @@ When you require obsidian.el via ~use-package~ or in other ways (see snippet abo

** obsidian-backlinks-mode

** Including hidden dot files
Obsidian does not track hidden files; obsidian.el can be configured to either track them or ignore them by setting the value of `obsidian-include-hidden-files`.

** Additional Customization

Expand All @@ -143,8 +140,8 @@ Optionally you can specify ~obsidian-inbox-directory~, it will be used by ~obsid
- obsidian-inbox-directory :: location for new notes created via ~obsidian-capture~
- obsidian-daily-notes-directory :: location for new notes created via ~obsidian-daily-note~
- obsidian-templates-directory :: location for obsidian.el to find template files
;; TODO: Why is this called out separate from other templates?
- obsidian-daily-note-template :: name of template file to use for daily notes
- obsidian-include-hidden-files :: configure obsidian.el to either track or ignore hidden files
- obsidian-create-unfound-files-in-inbox :: whether to create files for unfound link in inbox or in same directory as file
- obsidian-backlinks-panel-position :: which side of the window to host backlinks panel: 'left or 'right
- obsidian-backlinks-panel-width :: width of the backlinks panel in characters
Expand All @@ -161,9 +158,8 @@ Use ~obsidian-capture~ to create new notes.

If you specified ~obsidian-inbox-directory~, the new note will be created in this directory. Otherwise they will be placed in your Obsidian vault root directory specified by ~obsidian-directory~.

*** Inbox

*** Daily Notes
You can create a daily note using the command ~obsidian-daily-note~. If set, this note will use the template specified by ~obsidian-daily-note-template~.

** Inserting links
[[./resources/insert-link.png]]
Expand All @@ -174,8 +170,6 @@ When inserting links, two different formats can be used to specify the file: the

When inserting links for files that don't exist, an empty file will be created. The location of this new file depends upon the variable ~obsidian-create-unfound-files-in-inbox~. For a non-nil value, the files will be created in the directory specified by ~obsidian-inbox-directory~ if that value is set, or in the ~obsidian-directory~ otherwise. If ~obsidian-create-unfound-files-in-inbox~ is nil, new files will be created in the same directory into which the link is inserted.

TODO: Why do markdown links not work well for me? (toggle-wiki-links) Should they be formatted prettier?

*** Inserts a link in Markdown format
Example: ~[Link description](path/to/file.md)~
#+begin_src
Expand Down
2 changes: 1 addition & 1 deletion obsidian.el
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ replaced by the link."
(interactive)
(let* ((tags (-sort #'string< (obsidian-tags)))
(choice (completing-read "Insert tag: " tags))
(fm (s-starts-with-p "tags:" (buffer-substring (pos-bol) (pos-eol))))
(fm (s-starts-with-p "tags:" (buffer-substring (point-at-bol) (point-at-eol))))
;; Include a leading hashtag unless we're in the front matter
(tag (if (s-starts-with-p "#" choice)
(if fm
Expand Down

0 comments on commit c7d39e7

Please sign in to comment.