From 446248ea28e5bbae4d1801a8e92d85e14f8bac43 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 11 Apr 2018 00:15:15 +0200 Subject: 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. --- w3m-session-backup.el | 19 ++++++++++++++----- 1 file 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) -- cgit v1.2.3