From a0660da71f9aef8909973e9fd44b5eb34db0386b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sun, 22 Dec 2024 20:40:35 +1100 Subject: Add a way to get url at point For example, luwak has 'url text property at links. --- hmm.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'hmm.el') diff --git a/hmm.el b/hmm.el index 25ca4a0..5bfabf4 100644 --- a/hmm.el +++ b/hmm.el @@ -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 . @@ -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)) -- cgit v1.2.3