diff options
author | Yuchen Pei <id@ypei.org> | 2024-12-22 20:40:35 +1100 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2024-12-22 20:40:35 +1100 |
commit | a0660da71f9aef8909973e9fd44b5eb34db0386b (patch) | |
tree | 39edd93a28ebfabd1e47759fbb6f5433ecd0e106 | |
parent | 2157ead39273691013c38529b14953ea839c2a58 (diff) |
Add a way to get url at point
For example, luwak has 'url text property at links.
-rw-r--r-- | hmm.el | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,19 +1,19 @@ ;; -*- lexical-binding: t; -*- ;; Copyright (C) 2022 Yuchen Pei. -;; +;; ;; This file is part of hmm.el. -;; +;; ;; hmm.el is free software: you can redistribute it and/or modify it under ;; the terms of the GNU Affero General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; +;; ;; hmm.el is distributed in the hope that it will be useful, but WITHOUT ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General ;; Public License for more details. -;; +;; ;; You should have received a copy of the GNU Affero General Public ;; License along with hmm.el. If not, see <https://www.gnu.org/licenses/>. @@ -91,6 +91,7 @@ Transforms from one type to another type.") . hmm-file) ((and (derived-mode-p 'org-mode) (my-org-link-at-point)) . hmm-url) ((get-text-property (point) 'shr-url) . hmm-url) + ((get-text-property (point) 'url) . hmm-url) ((thing-at-point 'symbol) . hmm-query) ((buffer-file-name) . hmm-file) ((expand-file-name default-directory) . hmm-file)) |