aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-04-11 00:15:15 +0200
committerTeddy Wing2018-04-11 00:15:15 +0200
commit446248ea28e5bbae4d1801a8e92d85e14f8bac43 (patch)
tree868df95c8ed4af1f4f7a112404a8ecd493090472
parent58b7a20ff17a20538e6e53278fd43c6425d18b79 (diff)
downloadw3m-session-backup-446248ea28e5bbae4d1801a8e92d85e14f8bac43.tar.bz2
Get list of URL and page title pairs
* Extract the list of crash recovery session buffers to a function to give it a name. I'll come up with a better name later. * Grab the first and last elements of each buffer sub-list and create tuples from them. This gives us a list of two-element lists containing the URL and title of the pages.
-rw-r--r--w3m-session-backup.el19
1 files changed, 14 insertions, 5 deletions
diff --git a/w3m-session-backup.el b/w3m-session-backup.el
index 60d88d7..ef0f272 100644
--- a/w3m-session-backup.el
+++ b/w3m-session-backup.el
@@ -1,14 +1,23 @@
+(defun buffers ()
+ "TODO"
+ (nth 2
+ (first
+ (w3m-load-list w3m-session-file))))
+
(defun my-w3m-session-backup ()
"TODO"
(mapcar
(lambda (buffer)
- buffer)
- (nth 2
- (first
- (w3m-load-list w3m-session-file)))))
+ (cons
+ ;; URL
+ (first buffer)
+
+ ;; Page title
+ (last buffer)))
+ (buffers)))
;; (first (nth 2
;; (first
;; (w3m-load-list w3m-session-file))))
-(first (my-w3m-session-backup))
+(my-w3m-session-backup)