sbbs.el

Diff
Login

Differences From Artifact [4c1b0d2eeb]:

To Artifact [fbf9317204]:


40
41
42
43
44
45
46






47
48
49
50
51
52
53
  '(("textboard.org" ("sol" "prog") t)
    ("bbs.jp.net" ("mona") t))
  "List of SchemeBBS sites and boards."
  :type '(repeat (list (string :tag "Board Domain")
                       (repeat (string :tag "Board Name"))
                       (boolean :tag "Use TLS?"))))







(defcustom sbbs-jump-to-link t
  "Jump to first link after narrowing posts."
  :type 'boolean)

(defcustom sbbs-recenter-to-top t
  "Move point to top of frame when moving through posts."
  :type 'boolean)







>
>
>
>
>
>







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  '(("textboard.org" ("sol" "prog") t)
    ("bbs.jp.net" ("mona") t))
  "List of SchemeBBS sites and boards."
  :type '(repeat (list (string :tag "Board Domain")
                       (repeat (string :tag "Board Name"))
                       (boolean :tag "Use TLS?"))))

(defcustom sbbs-default-board nil
  "Jump to first link after narrowing posts."
  :type '(choice (const :tag "None" nil)
                 (cons (string :tag "Board Domain")
                       (string :tag "Board Name"))))

(defcustom sbbs-jump-to-link t
  "Jump to first link after narrowing posts."
  :type 'boolean)

(defcustom sbbs-recenter-to-top t
  "Move point to top of frame when moving through posts."
  :type 'boolean)
131
132
133
134
135
136
137
138
139






140
141
142
143
144
145









146
147
148
149
150
151
152
    boards))

(defun sbbs-read-board ()
  "Read in a board using `completing-read'.

The list will be generated using `sbbs-boards', and the result
will be a board object generated with `sbbs-make-board'."
  (let (boards)
    (dolist (b (sbbs--list-boards))






      (push (cons (format "/%s/ (%s)"
                          (sbbs--board-name b)
                          (sbbs--board-domain b))
                  b)
            boards))
    (cdr (assoc (completing-read "Board: " boards nil t) boards))))










 ;; UTILITY FUNCTIONS

(defun sbbs--reload-thread (&optional _ignore-auto _noconfirm)
  "Function to reload an opened thread."
  (when sbbs--thread-id (sbbs-view-open sbbs--thread-id)))








|

>
>
>
>
>
>





|
>
>
>
>
>
>
>
>
>







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
    boards))

(defun sbbs-read-board ()
  "Read in a board using `completing-read'.

The list will be generated using `sbbs-boards', and the result
will be a board object generated with `sbbs-make-board'."
  (let (boards def)
    (dolist (b (sbbs--list-boards))
      (when (and sbbs-default-board
                 (string= (sbbs--board-domain b)
                          (car sbbs-default-board))
                 (string= (sbbs--board-name b)
                          (cdr sbbs-default-board)))
        (setq def b))
      (push (cons (format "/%s/ (%s)"
                          (sbbs--board-name b)
                          (sbbs--board-domain b))
                  b)
            boards))
    (let ((choice (completing-read
                   (if def
                       (format "Board (default %s/%s): "
                               (sbbs--board-domain def)
                               (sbbs--board-name def))
                     "Board: ")
                   boards nil nil nil nil def)))
      (if (stringp choice)
          (cdr (assoc choice boards))
        choice))))

 ;; UTILITY FUNCTIONS

(defun sbbs--reload-thread (&optional _ignore-auto _noconfirm)
  "Function to reload an opened thread."
  (when sbbs--thread-id (sbbs-view-open sbbs--thread-id)))