287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
|
;; INTERACTIVE FUNCTIONS
(defun sbbs-view-open (id)
"Open thread ID in new buffer."
(interactive (list (tabulated-list-get-id)))
(let ((url (sbbs--board-url (format "/%d" id) t))
(headline (substring-no-properties
(aref (tabulated-list-get-entry ) 2)))
(board sbbs--board)
(buf (get-buffer-create
(format "*loading /%s/%d*"
(sbbs--board-name sbbs--board)
id))))
(with-current-buffer buf
(sbbs-read-mode)
(setq header-line-format (format "Thread %d: %s" id headline)
sbbs--board board
sbbs--thread-id id))
(url-retrieve url #'sbbs--thread-loader (list id buf))
(switch-to-buffer buf)))
(defun sbbs-view-compose ()
"Create buffer to start a new thread."
(interactive)
|
>
>
|
|
>
|
|
|
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
|
;; INTERACTIVE FUNCTIONS
(defun sbbs-view-open (id)
"Open thread ID in new buffer."
(interactive (list (tabulated-list-get-id)))
(let ((url (sbbs--board-url (format "/%d" id) t))
(headline (or (and (not (tabulated-list-get-entry))
header-line-format)
(substring-no-properties
(aref (tabulated-list-get-entry) 2))))
(board sbbs--board)
(buf (get-buffer-create
(format "*loading /%s/%d*"
(sbbs--board-name sbbs--board)
id))))
(with-current-buffer buf
(sbbs-read-mode)
(when headline
(setq header-line-format (format "Thread %d: %s" id headline)))
(setq sbbs--board board
sbbs--thread-id id))
(url-retrieve url #'sbbs--thread-loader (list id buf))
(switch-to-buffer buf)))
(defun sbbs-view-compose ()
"Create buffer to start a new thread."
(interactive)
|