[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/osm 56f3c2b562 1/2: Assign list-buffers-directory to th
From: |
ELPA Syncer |
Subject: |
[elpa] externals/osm 56f3c2b562 1/2: Assign list-buffers-directory to the location (#16) |
Date: |
Fri, 25 Mar 2022 19:57:39 -0400 (EDT) |
branch: externals/osm
commit 56f3c2b56241994169361ba1148a03875ef8a749
Author: Daniel Nagy <danielnagy@posteo.de>
Commit: GitHub <noreply@github.com>
Assign list-buffers-directory to the location (#16)
This displays the location as a string in M-x list-buffers instead of
showing an
empty path column.
---
osm.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/osm.el b/osm.el
index 35e002042f..d8291a8995 100644
--- a/osm.el
+++ b/osm.el
@@ -1012,6 +1012,7 @@ xmlns='http://www.w3.org/2000/svg'
xmlns:xlink='http://www.w3.org/1999/xlink'>
"Update map display."
(osm--barf-unless-osm)
(rename-buffer (osm--buffer-name) 'unique)
+ (setq list-buffers-directory (osm--location-str))
(osm--update-sizes)
(osm--update-header)
(osm--update-buffer)
@@ -1287,6 +1288,10 @@ Optionally place transient pin with ID and NAME."
(message "Stored bookmark: %s" name))
(osm--revert)))
+(defun osm--location-str ()
+ "Returns the current location as a string."
+ (format "%.2f° %.2f° Z%s" osm--lat osm--lon osm--zoom))
+
(defun osm--location-data (id name)
"Fetch location info for ID with NAME."
(let ((lat (or (car osm--transient-pin) osm--lat))