(require 'generic-x)
(define-generic-mode schemebbs-mode
nil nil
'(("\\(\\*\\*.+\\*\\*\\)" 1 font-lock-keyword-face) ; bold
("\\(__.+__\\)" 1 font-lock-comment-face) ; italic
("\\(==.+==\\)" 1 font-lock-constant-face) ; monospaced
("\\(~~.+~~\\)" 1 font-lock-type-face) ; spoiler
("^\\(>.+\\)" 1 font-lock-doc-face) ; quotes
("^\\(```\n\\(.+\n\\)+```\\)$" 1 font-lock-reference-face)) ; code
nil nil
"Basic highlighting for composing SchemeBBS posts.")
>>1
Neat. Do you post here with emacs?
Is there an Emacs package for this site? If not there should be.
>>3 I just started writing something, and noticed that url.el is disproportionally slower on this site than on most others. Does anyone know what the reason for this could be?
Improved version. Where applicable, it now uses the same regular expressions as the board software. Highlighting for code blocks has also been updated to handle multi-line better. Although I am unsure how much schemebbs-font-lock-extend-function
actually helps. Maybe there's a better way.
(defconst schemebbs-font-lock-rules
'(;; code
("^\\(```\\(.*\n\\)*?```\\)$" 1 font-lock-reference-face)
;; bold
("\\(\\*\\*[^ ].*?[^ ]\\*\\*\\|\\*\\*[^ ]\\*\\*\\)" 1 font-lock-keyword-face)
;; italic
("\\(__[^ ].*?[^ ]__\\|__[^ ]__\\)" 1 font-lock-comment-face)
;; monospaced
("\\(==[^ ].*?[^ ]==\\|==[^ ]==\\)" 1 font-lock-constant-face)
;; spoiler
("\\(~~[^ ].*?[^ ]~~\\|~~[^ ]~~\\)" 1 font-lock-type-face)
;; quotes
("^\\(>.+\\)" 1 font-lock-doc-face))
"Highlighting for SchemeBBS posts.")
(defun schemebbs-font-lock-extend-function ()
"Try to extend the update to the nearest code blocks."
(save-excursion
(goto-char font-lock-beg)
(when (re-search-backward "^```$" nil t)
(setq font-lock-beg (point)))
(goto-char font-lock-end)
(when (re-search-forward "^```$" nil t)
(setq font-lock-end (point)))))
(define-derived-mode schemebbs-mode text-mode "SchemeBBS"
"Basic highlighting for composing SchemeBBS posts."
(set (make-local-variable 'font-lock-defaults) '(schemebbs-font-lock-rules))
(set (make-local-variable 'font-lock-multilne) t)
(add-hook 'font-lock-extend-region-functions
'schemebbs-font-lock-extend-function))
>>5 I would recommend creating new faces, instead of using font-lock. It would look more natural that way.
>>3
>>4
It took me a day, but here's a sketch of a client: https://0x0.st/iPpP.el. Eval and try M-x sbbs.
It's not that fast, but that can hopefully be fixed. There's also a bug when submitting a post. For some reason a 500 response is generated, but I'm not sure why...
You need to send the ornamentum
, which does not seem to be available through the S-EXP API.
It is very cool though. I noticed some issues:
diff --git a/iPpP.el b/iPpP.el
index 5e108e5..2f72121 100644
--- a/iPpP.el
+++ b/iPpP.el
@@ -158,7 +158,7 @@
(let ((thread (read (current-buffer)))
(buf (get-buffer-create
(format "*reading /%s/%d*"
- (sbbs-board-name board)
+ (sbbs--board-name board)
id))))
(kill-buffer)
(with-current-buffer buf
@@ -185,7 +185,7 @@
(url-retrieve url #'sbbs--thread-loader
(list sbbs--board id))))
-(defun sbbs--reload-thread ()
+(defun sbbs--reload-thread (ignore-auto noconfirm)
(sbbs-view-open sbbs--thread-id))
(defun sbbs-view-compose ()
>>9
Thanks for the hints, still had old functions in bound.
I tried setting ornamentum
, but that doesn't seem to work either... It seems the API is read-only at this point.
Hello, I am sending this from emacs
. Here's a second ``diff'' to enable posting:
diff --git a/iPpP.el b/iPpP.el
index 2f72121..c943800 100644
--- a/iPpP.el
+++ b/iPpP.el
@@ -18,6 +18,10 @@
(sbbs-make-board "textboard.org" "sol"))
"List of SchemeBBS boards.")
+(defcustom sbbs-ornamentum
+ "3b3738ae1c9295d272cec84ecf7af5c8"
+ "Form hash.")
+
(defvar-local sbbs--board nil)
(defvar-local sbbs--thread-id nil)
@@ -202,11 +206,15 @@
(url-request-extra-headers
'(("Content-Type" . "application/x-www-form-urlencoded")))
(url-request-data
- (url-build-query-string
- (if sbbs--thread-id
- `((epistula ,(buffer-string)))
- `((titulus ,(read-string "Headline: "))
- (epistula ,(buffer-string))))))
+ (url-build-query-string
+ `((epistula ,(buffer-string))
+ (ornamentum ,sbbs-ornamentum)
+ (name "")
+ (message "")
+ (frontpage ,(if sbbs--thread-id "true" "false")) .
+ ,(if sbbs--thread-id
+ nil
+ `((titulus ,(read-string "Headline: ")))))))
(url (if sbbs--thread-id
(format "http://%s/%s/%d/post"
(sbbs--board-domain sbbs--board)
@@ -220,7 +228,7 @@
(defun sbbs-read-reply (arg)
(interactive "P")
- (let ((id (get-text-property (point) 'sbbs-thread-nr))
+ (let ((id (or sbbs--thread-id (get-text-property (point) 'sbbs-thread-nr)))
(board sbbs--board))
(with-current-buffer (generate-new-buffer "*new response*")
(sbbs-compose-mode)
If you are reading this, it worked.
>>81
Welp, messed up by posting into the wrong thread (http://textboard.org/prog#t11p4) a few times...
Anyway, thanks for the patch, here's the new version: https://0x0.st/iPO6.el
>>12
In my previous patch, the change in sbbs-read-reply
was to make it reply to the correct thread. Previously, it would try to reply to the thread that shared the same id as the post the point was staying on. But my change did not consider the reply-link that is inserted. Here's a fix for that:
diff --git a/iPO6.el b/iPO6.el
index 1e6d3c3..e5cada7 100644
--- a/iPO6.el
+++ b/iPO6.el
@@ -253,12 +253,13 @@
(defun sbbs-read-reply (arg)
(interactive "P")
- (let ((id (or sbbs--thread-id (get-text-property (point) 'sbbs-thread-nr)))
+ (let ((id sbbs--thread-id)
+ (rid (get-text-property (point) 'sbbs-thread-nr))
(board sbbs--board))
(with-current-buffer (generate-new-buffer "*new response*")
(sbbs-compose-mode)
(when (and arg (= (car arg) 4))
- (insert (format ">>%d" id))
+ (insert (format ">>%d" rid))
(newline))
(setq header-line-format (format "Responding to Thread %d" id)
sbbs--thread-id id
Sorry for mixing up the spaces and tabs...
Testing random ornamentum.
>>13
Hmm, you're right, should have thought about that before applying it.
>>8
So, I got around to cleaning it up a bit, and packed it together into
a repo: https://git.sr.ht/~zge/sbbs
Thanks again to the anon in this thread who helped!
>>15
Why are there two sprunge entries in ~zge/nullpointer-emacs/0x0.el -> 0x0-services? Nice list of services by the way.
>>16
No real reason, probably because I hacked multiple-service-support in too quicky. Upon further reflection, I've actually been thinking about removing it and limiting the package to only 0x0 and forked service.
What is the recommended way to learn elisp? How did you learn it?
I just finished reading ``Writing GNU Emacs Extensions''. While I enjoyed it a lot, it is decidedly narrow in what it covers and I was left wanting more. Should I just read the reference manual cover-to-cover? Or just lazily learn whatever is needed at the moment while extending my init.el
?
>>18
Knowing Common Lisp helps a lot, but knowing when not to use cl-lib is also good. But when it comes to learning, i think "lazily learning" is the best way, but not only while you're extending your init.el, but also whenever you're curious as to how a functionality is implemented (C-h k with local emacs sources are useful). Reading the entire manual will be of little use, consider skimming it or section from time to time, so that you have an idea of the vocabulary when it need it.
>>9,10
ornamentum
was meant to be a ``revolutionary'' antispam technique but the lack of usable crypography in MIT/GNU Scheme 9.2 hindered its implementation. In effect ornamentum
is always the same hash, whatever the thread you're posting in.
It seems the API is read-only at this point.
Yep and that's unfortunate. On the TODO list, now with higher priority.
Also, I took the liberty of linking your Emacs mode under the clients section in the site preferences: http://textboard.org/prog/preferences
lazily learning
It depends. There's much out there---too much for any one to learn it all---so it's important to prioritize what to learn (whether to learn it), and to know whether, at a particular moment, it's better to learn, or to implement what you have learned.
At first, it's almost always to learn---unless your learning style is more ``hands-on'', wherefore it's better to (guided by a teacher, mentor, vel cetera, or merely a good course (be it static or dynamic, old-style media (text, video, audio,,) or hypermedia,,), or whatever; even yourself, if your intuition about it is sufficiently good) make (but for the sake of learning). (My favourite initial learning style is imagining, in full detail, making.) and:
What to learn? There are some things which are so useful, or so often used, so powerful or promising, or just so beautiful, that one tends to consider them necessary for any such specialist. Often, one hears ``a real'' or ``a true''---whatever professional designation---would/should/oughtta// know. Sometimes, this sentiment is misguided; too-generally applied. (Often, it would be true, were it about a subspecialization (of which the speaker, probably, is) of the specialization about which he is, apparently, speaking. The proper interpretation, in my experience, of such statements, tends to be, having attempted to understand to which specialization (of those that the speaker may be (reasonably considered to be) a part) that statement could truthfully apply, that that statement is about that subspecialization, which, probably, the speaker has confused with that surspecialization.) i.e. A basic ``common'' (among these specialists, that is) knowledge/skill set. But sometimes, there isn't, or it's not well known what would constitute, a basic ``common'' knowledge/skill set; wherefore one would merely start wherever, within such a sea, and progress through as might seem best. (Or, he might be wise to choose a different specialization.)
When it's time to make something, one must muster up all he has learned that may be relevant to the task at hand, to apply all applicable knowledge and skills, to make that which is to be made. Sometimes, his extant knowledge is not quite enough, or could be improved slightly; thus there is a complement to his knowledge, his skills,, which he would do well to learn prior to the actual making. Such complementary, for this learning, I suspect, is where such ``lazily learning''---learning them just before needing them---applies. (It's important to be able to know which things you'll need to learn, so that you'll be better able ``lazily learn'' that complement; this, naturally, would be part of that ``common'' knowledge/skills set.)
>>15
I think this package is pretty much complete now, and I'd gladly donate it now. Is there any interest in hosting the file on this site as opposed to an external repo?
It should be part of core emacs IMHO. Send it to Stallman directly.
>>23
Maybe not a part of core Emacs, but it could be packaged.
>>24
You mean like in ELPA? I'm not even sure they'd be interested in a client for such a fringe site...
>>22
Sure. It's a cool client. Can I just clone your repo?
>>25
There's at least 3 posters which is impressive considering the site was never really advertised really quality isn't too bad when you see threads like https://textboard.org/prog/100 And maybe I'll tell the MIT Scheme users about it when I finally migrate the boards and fix i2p (I gave up on Proxmox and installed the familiar FreeBSD)
Why would ELPA reject it? They package silly things like sweetgreen.el
for ordering salads. This is absolutely useless for the whole world minus one single weird country where they lost the technology of washing a lettuce without the help of a professional.
Sure. It's a cool client. Can I just clone your repo?
Of course.
Why would ELPA reject it? They package silly things like sweetgreen.el for ordering salads.
I can't find that package on ELPA, just on MELPA, that's a bit more liberal.
I wonder if it would be fitting to translate this mode into a backend for GNUs?
>>28
It's probably possible, but discussions here couldn't fit into a simple thread structure, because the posts are linear but thread references can cross-reference one another.
>>29
Ah, so it goes against the model of GNUs, that's too bad. I'm really a novice when it come to GNUs, so I'm not fully aware of its limitations.
>>28,30
Gnus?
>>31
Yes
ググれガス https://gnus.org
>>22
It's mirrored here: http://fossil.textboard.org/sbbs
>>34
Is it ok that I delete the old repo then, or does the mirror depend on it?
>>35
It doesn't depend on it, I thought I'll synchronize them later. But if you delete your old repo then I want you to be able to modify the fossil one.
>>36
I think it's better to have only one repo and one place to submit patches/issues/etc. Also, it's a good excuse to finally learn fossil.
>>37
Fossil is really simple and you won't unrecoverably shoot yourself in foot as easily as with g̶̢͜i̛t́͞
https://www.fossil-scm.org/fossil/doc/trunk/www/xkcd-git
https://sqlite.org/whynotgit.html
I made you a dev account to the sbbs.el
repo. Can I use the mail you once contacted me with to send your credentials?
https://www.fossil-scm.org/fossil/doc/trunk/www/xkcd-git.gif
>>38
Yes, that will work. I'm curious to see how it will work.
>>40
I sent you a mail with your logins. You've got admin rights over the repo in case you want to add users or anything.
To anyone interested in contributing, sbbs has totally transitioned over to fossil. The ticket list has all the issues listed https://fossil.textboard.org/sbbs/rptview?rn=1, and the wiki has a home, a usage and contribution page. As far as I see, anyone can contribute to the ticket list, so if there any bugs or feature requests, feel free to do so.
The only thing remaining is updating the link on the preference page.
The only thing remaining is updating the link on the preference page.
[x]
There's an Emacs mode to browse 2ch also
>>42
I apologize if this is seen as rude, but the ticket creation form unfortunately doesn't work in eww, and I don't currently have another browser installed. It would be wonderful if another user could translate the following requests into tickets. Regardless, three features that would be nice to have would be for ‘sbbs--uncover-spoiler’ to be used in ‘sbbs-compose-mode’ so that spoilered text can be edited after the application of the markup easily, for a default to be provided to ‘completing-read’ in ‘sbbs-read-board’ which is the current board if browsing a board (refresh), or user configurable otherwise to avoid many keystrokes for users who visit few boards, and lastly it may be useful for the syntax table in ‘sbbs-compose-mode’ to be extended to be aware of the markup language, this should allow for automatic syntax aware navigation, and potentially simplified font-lock. Thank you for the creation of this mode, it is truly a joy to use.
>>45
There must be a way to create tickets without that damn JavaScript! Eww handles cookies, you really cannot login as anonymous before submitting? (password is an ASCII art alphanumeric captcha) Totally open post forms are a problem with spider bots. Another solution would be to have an access to the ebbs repository and submit a ticket with the command line.
doesn't work in eww, and I don't currently have another browser installed
That's commendable. In the end, if SchemeBBS is functional in eww, you can suggest improvements or report bugs in this thread. Maybe a bot could read new posts in a certain format, recognize a ticket and submit them?
Eww handles cookies, you really cannot login as anonymous before submitting?
The login works fine but the only forms on the new ticket page are for the version and email, with buttons for previewing and canceling. Looking at the source I'm not sure why it doesn't work, it's only ```<select>``` and ```<textarea>```. It might be something funky about eww.
Another solution would be to have an access to the ebbs repository and submit a ticket with the command line.
I'm not sure this is possible without giving check-in access to the whole repository, which wouldn't work out. I know it's possible to clone the repo, create the ticket, create a bundle including the ticket, and then email the bundle to someone with check-in access who could examine and commit the changes. This isn't as unreasonable as it might sound, the emailing is the only thing that might discourage some. Would it be preferred if I (and others) submitted tickets this way? Also, there is some talk of improving this workflow: https://fossil-scm.org/forum/forumpost/195da45e5f I don't know if this will materialize or not though.
In the end, if SchemeBBS is functional in eww, you can suggest improvements or report bugs in this thread.
I certainly don't mind posting here in the least, and I do appreciate the time taken to use well worn standards.
Maybe a bot could read new posts in a certain format, recognize a ticket and submit them?
This seems kinda janky, won't lie. Considering how obscure this problem might be I'll consider trying emacs-w3m this evening to see if I can submit with that. If I can I see no reason to fix anything.
There must be a way to create tickets without that damn JavaScript!
Isn't it possible to clone the repo, and then sync it with the new tickets?
>>47
Unfortunately it seems to not work in w3m either, although it was much closer so I assumed it did work and wrote the following ticket:
In the present version ‘sbbs-compose-format’ inserts the literal string “style” rather than the value of the argument ‘style’. Furthermore, ‘insert’ resets the region and makes it when setting the mark to the right of the pointer the ‘style’ is inserted directly instead of wrapping the region, to resolve this we have to save the value of the end of the region before inserting. Since the inserts at the start of the region are inserted before those at the end the ‘style’ inserted at the end are off by ‘(length style)’ this is corrected by reversing the end and start insertions. Lastly, ‘save-excursion’ saves the old position before the insertion of ‘style’ so it is ‘(length style)’ off, the ‘save-excursion’ can be pulled around the conditional to make ‘(forward-char (+ (length style)))’ common to both cases resolving this last issue.
(defun sbbs-compose-format (style)
"Insert "
(save-excursion
(if (region-active-p)
(let ((start (region-beginning))
(end (region-end)))
(goto-char end)
(insert style)
(goto-char start)
(insert style))
(insert style style)))
(forward-char (+ (length style))))
>>49
The ‘+’ is unnecessary ‘(forward-char (length style))’ is correct and the ‘save-excursion’ should have caused it to be off ‘(* 2 (length style))’, but you get the idea.
>>49
I don't fully understand why but the following lines are causing the errors with URL rendering, specifically the 'variable-pitch, even changing this to be explicitly 'fixed-pitch does not cause an error.
(insert-button (propertize text 'face 'variable-pitch)
'action func 'sbbs-ref range)))))
>>51
huh, nvm.
‘sbbs--uncover-spoiler’ to be used in ‘sbbs-compose-mode’ so that spoilered text can be edited after the application of the markup easily
That's a bit tricky, because it requires removing overlays when the spoiler markup is manipulated, but I'll add it to the ticket list.
default to be provided to ‘completing-read’ in ‘sbbs-read-board’ which is the current board if browsing a board (refresh), or user configurable otherwise to avoid many keystrokes for users who visit few boards
Will do, but just so you know, 'g' also refreshes to board.
it may be useful for the syntax table in ‘sbbs-compose-mode’ to be extended to be aware of the markup language
I'll look into this. Haven't done anything too complicated with syntax tables yet, so this will take some reading.
Done, is pushed [...] I'll add it to the ticket list [...] Will do
Awesome, thanks!
That's a bit tricky, because it requires removing overlays when the spoiler markup is manipulated[.]
In that case a cheaper solution might be to just modify the font-lock for ‘sbbs-compose-mode’ so that ‘sbbs--uncover-spoiler-face’ is the face for spoilered text.
Just so you know, 'g' also refreshes to board.
fail, that makes sense.
I'll look into this. Haven't done anything too complicated with syntax tables yet, so this will take some reading.
I haven't done anything with syntax tables either I was just looking at them briefly and it seemed like it might be useful so I thought I'd mention it.
>>53
Actually the pushed code seems to still have errors in it as it does not take into account the case starting with “Furthermore” in >>49 probably because there is a typo in my explanation. I say “when setting the mark to the right of the pointer” when I meant “when setting the mark to the left of the point” if you reverse the order of ‘region-end’ and ‘region-start’ the bug then switches to the first sentence. I believe the reversal of ‘end’ and ‘start’ is also required in order to resolve the issue starting with “Since” this bug occurs in the same case as the previously mentioned one once the ‘start’ and ‘end’ are saved, that is when the mark is to the left of the point.
>>55
I still have no idea what the problem is, the expected behaviour is to mark a region, and have the marked region surrounded in whatever markup is needed. Unless I'm blind, this is just what is happening.
I still have no idea what the problem is, the expected behaviour is to mark a region, and have the marked region surrounded in whatever markup is needed. Unless I'm blind, this is just what is happening.
It's entirely possible that something in my configuration is interacting poorly with the mode, if this is the case it will probably be safe to ignore it. (I would try with ‘emacs -q’ but I use EXWM with a login manager which makes that pretty awkward) Here are steps to reproduce, type the following string and then enter the following command sequence:
The quick brown fox jumps over the lazy dog.
C-a C-SPC C-u 10 C-f C-c C-f C-s
If these are bugs then the output should be as follows with brackets indicating the cursor location:
~~~~The quick br[o]wn fox jumps over the lazy dog.
>>57
Do you mean M-SPC
instead of C-SPC
? And you're right, that a bug.
Do you mean M-SPC instead of C-SPC? And you're right, that a bug.
That's a relief, removing bugs in configuration which don't signal errors while using EXWM is a bit painful (if only .init could be stateless!). I did mean C-SPC though or whatever you have ‘set-mark-command’ bound to (I probably should have provided command names instead of bindings, since this Emacs).
I'm still attempting to find the exact trigger, but there might be some sort of difficult to trigger memory leak.
>>60
the memory leak seems unrelated.
>>1
Looking at your first post, we can say you've come a long way from the basic markup highlighting to the fine Emacs client you've created. I can't thank you enough for the motivation you gave me back. I finallly added the usual 2ch textboard features, you can see them in /mona/. I did my best to make the new code backward compatible with the first API so sbbs.el
won't break. The new version took the old data without problem upon launching, so I don't think it will be a problem for Emacs.
If you want to add the new features (they're really optional and don't bring real improvements), there are 3 new optional dotted pairs in the threads alists. They're tagged 'name
, 'tripcode
, and 'e-mail
. For posting the new fields are agnomen (name) and inscriptio (e-mail). Tripcodes work as everywhere else with a # character in the name field between name and capcode. Sage goes in all fields, but the one in the mail field is the new VIP. /prog/ and /sol/ won't change.
>>62
A new ticket has been added: https://fossil.textboard.org/sbbs/tktview/56f5ac1cc2f5d5c98701e58ae1d316f5220c434f
And just a side note, I didn't write >>1, instead I joined the thread at >>3.
>>63
Yeah, headers hidden by default is the way to go. I'd love to contribute, maybe I'll try my hand at this low priority feature.
Is there something wrong with the Fossil system? I seem not to be able to sync the repo...
>>65
The web interface seems to be up.
https://fossil.textboard.org/sbbs/artifact/e334160be5410d57
>>66
AFAIK fossil doesn't communicate via the web interface, and that still seems to not be working.
>>66-67
My bad, it appears it was just slow. It took over two minutes to create a single commit (apparently because it automatically pushes them too...).
The link on the front page should be updated, it seems to link to a specific version of sbbs.
Attached is a diff of changes required to make sbbs.el run on GNU Emacs version 24.5.1. The text-properties-search library is not included with this version, subrx is missing cxxxxr, and cxxxr functions, and tabulated-list-print does not have the UPDATE parameter. I wouldn't be suprised if I broke sbbs--insert-sxml-par since I've removed the narrowing not knowing what it was for but it seems to be working... Instead of searching for the 'action property it should also be possible to collect the indices of these properties when they are first parsed in sbbs--process-sxml and then iterate over these applying make-button on them. I've not done this so as to modify things as little as required: https://paste.textboard.org/2fce1e47
Also I'm getting Error while submitting: (http 500)
which I don't know how to resolve, but haven't looked into yet.
>>70
Trying to compose in Emacs -Q
to see if this error has something to do with my configuration.
>>71
I currently suspect that this is something to do with 'url-privacy
settings.
>>70,71
Aye, running url-setup-privacy-info
at all results in the firewall nuking composition it seems. No big deal.
>>70-73
I don't really intend to support old versions indefinitely. But feel free to add a page on the wiki documenting how to make it work with old versions.
>>74
That's fine by me, no one should expect you to support such an old version, I just provided it here in case you or someone else was interested. Although you might want to change the Emacs version in the Package-Requires in this case. text-properties-search was apparently added in 27.1 with this commit: http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6f572972d19397d8295727a99b687fc521bd469e
>>75
You're right, good catch. I will try to see if the depenency can be avoided.
>>76
You can probably find something better but I now see what the narrowing is for. I think the following should only traverse the additional newline at the end of each paragraph a second time rather than the whole buffer, still it's not very elegant:
(defun sbbs--insert-sxml-par (sxml)
"Insert paragraph contents SXML at point."
(save-restriction
(narrow-to-region (1- (point)) (point))
(insert (sbbs--process-sxml sxml))
(let (beg)
(goto-char (point-min))
(while (setq beg (next-single-property-change (point) 'action))
;; Buttons use overlays that cannot be passed in
;; strings. Therefore whenever a `activity' property was inserted into
;; the buffer, `make-button' has to be called once more to add the
;; actual overlay.
(let ((end (or (next-single-property-change beg 'action) (point-max))))
(make-button beg end 'action (get-text-property beg 'action))
(goto-char end)))
(goto-char (point-max)))
(newline)))
>>77
My explanation here is rubbish. I did try to look for a better solution to the decrement hack so you wouldn't have to sadly everything I tried seemed even worse. The only improvement I found was that the or
can be removed by using the last parameter of next-single-property-change
.
>>76,77
We need only traverse in reverse. The terminal newline breaks the initial 'action property if it exists.
(defun sbbs--insert-sxml-par (sxml)
"Insert paragraph contents SXML at point."
(save-restriction
(narrow-to-region (point) (point))
(insert (sbbs--process-sxml sxml) "\n")
(let (end)
(while (setq end (previous-single-property-change (point) 'action))
;; Buttons use overlays that cannot be passed in
;; strings. Therefore whenever a `activity' property was inserted into
;; the buffer, `make-button' has to be called once more to add the
;; actual overlay.
(let ((beg (previous-single-property-change end 'action nil (point-min))))
(make-button beg end 'action (get-text-property beg 'action))
(goto-char beg)))
(goto-char (point-max)))))
ornamentum was meant to be a ``revolutionary'' antispam technique
What was the idea, and what crypto would it have depended on?
Will `sbbs' be added to NonGNU ELPA?
https://elpa.nongnu.org/
>>81
Maybe if someone suggests it?
Testing VIP posts with sbbs.
>>81,82
As there is really only one author (me) who has signed the CA, it would be possible to add sbbs to GNU ELPA, but I don't know if something this specific really needs to be hosted on GNU or NonGNU ELPA.
I didn't see a default binding for sbbs-browse in sbbs-view-mode or sbbs-read-mode, so in my own setup I bound it to `/` (using add-hook and keymap-local-set).
I wonder what percentage of posts are made by people using this package.