sbbs.el  Check-in [cc71172e18]

Overview
Comment:Added sbbs-default-board option
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: cc71172e18256674b7cac883875f226b1c05528103015b03cbb9c8da561c1645
User & Date: zge on 2020-06-06 17:17:21
Other Links: branch diff | manifest | tags
Context
2020-06-08
10:26
Fix sbbs-compose-format when mark is before point check-in: a9ee28fa6d user: zge tags: master, trunk
2020-06-06
17:17
Added sbbs-default-board option check-in: cc71172e18 user: zge tags: master, trunk
16:28
Fix sbbs-compose-format on when region is active See http://textboard.org/prog/81/49 check-in: d5347562aa user: zge tags: master, trunk
Changes

Modified sbbs.el from [4c1b0d2eeb] to [fbf9317204].

40
41
42
43
44
45
46






47
48
49
50
51
52
53
...
131
132
133
134
135
136
137
138
139






140
141
142
143
144
145









146
147
148
149
150
151
152
  '(("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)
................................................................................
    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)))








>
>
>
>
>
>







 







|

>
>
>
>
>
>





|
>
>
>
>
>
>
>
>
>







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
...
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
  '(("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)
................................................................................
    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)))