Emacs

The pages where I write about Emacs. It doesn’t happen very often. I think you’re probably best off following Planet Emacsen.

2018-02-27 Emacs Packages

My Emacs setup is on GitHub but I might have to finally get rid of my special package handling code and move to something else instead.

How about using straight together with use-package?

One of these days!

Tags:

Comments on 2018-02-27 Emacs Packages

I’m having the same questions. The functional approach of straight is very appealing. Would this approach be able to increase the security ? With security, I mean the fact that the melpa is vulnerable to attacks, much more than a debian/any-other-distro repo or github for example.

– JeanMichel 2018-02-28 12:07 UTC


[of course you keep my email adress for you ;-) ]

– JeanMichel 2018-02-28 12:08 UTC


To be honest, I have never thought much about the security of MELPA and friends. I suspect it is terrible, but then again, perhaps it is not if HTTPS is enabled and certificates are checked and all that, perhaps it is good enough? Debian doesn’t have HTTPS for its repos but has signature checking. We don’t have signatures but HTTPS? Fair? 🤷 I have no idea.

– Alex Schroeder 2018-02-28 13:54 UTC


Well, I started to worry about security in emacs after this discussion : https://www.reddit.com/r/emacs/comments/63e8hu/are_emacs_package_repositories_a_security_risk/?st=jejp9fmz&sh=a7ade519

Since then, there have been other discussions, which I have not followed accurately. I’m not a specialist, but for those who use emace for everything like notes, mail etc, the possibility of an infected package should be a concern, and i’d love if there would be an approach to solve this.

But ... that is not your point in this post ! ;-)

– JeanMichel 2018-03-09 08:55 UTC


https://glyph.twistedmatrix.com/2015/11/editor-malware.html

I found this a while ago, which says you have to do extra work to get Emacs to actually verify https.

– jpkotta 2018-03-09 17:03 UTC


Thank you both! Very interesting.

– Alex Schroeder 2018-03-11 21:17 UTC


straight.el uses hashes and a lockfile

https://github.com/raxod502/straight.el#lockfile-management

– straight user 2018-04-12 23:27 UTC

Add Comment

2018-02-12 Buttery Smooth Emacs

This is the best blog post about Emacs in a long time. I’m still laughing. Buttery Smooth Emacs, Friday, October 28, 2016.

«GNU Emacs is an old-school C program emulating a 1980s Symbolics Lisp Machine emulating an old-fashioned Motif-style Xt toolkit emulating a 1970s text terminal emulating a 1960s teletype.»

«Emacs organizes its view of the outside world into frames (what the rest of the world calls “windows”), windows (which the rest of the world calls “panes”), and buffers (which the rest of the world calls “documents”).»

«Did Emacs just adapt to whatever these non-Xt toolkits did? Did Emacs adopt modern best practices? GTK+ is a modern GUI library. Emacs supports GTK+. Is Emacs a well-behaved GTK+ program now?»

«What’s particularly hilarious is that SIGIO can happen in the middle of redisplay. The REPL loop (in the Emacs case, not Read Eval Print, but Read Eval WTF) can be recursive.»

No, really. This blog post just keeps on giving.

(I don’t get why people use Facebook as their blog but whatever, this blog post is great.)

Tags:

Comments on 2018-02-12 Buttery Smooth Emacs

It’s a great write-up, but this isn’t right: “...a 1980s Symbolics Lisp Machine emulating an old-fashioned Motif-style Xt toolkit....” Symbolics certainly didn’t get its window system ideas from Xt.

Arthur A. Gleckler 2018-02-13 01:25 UTC


I’d be surprised if everything else is right! :)

– Alex Schroeder 2018-02-13 07:08 UTC


More tales from redisplay.

AlokSingh 2018-02-14 06:39 UTC


The joy of CTRL S and CTRL Q! «It is also a great tragedy that you don’t get DSR/DTR lines on these “modern” serial ports, which means you have to use inline XON/XOFF flow control. Like an animal.»

Good stuff, thanks Alok!

– Alex Schroeder 2018-02-14 13:12 UTC

Add Comment

2018-01-03 Gopher Mode

Yeah, I’ve been working on Gopher stuff over the holidays.

  1. a Gopher server wrapper around Oddmuse wiki (and this site is running it, see gopher://alexschroeder.ch)
  2. a proposal of a new item type to write to a Gopher server with examples based on netcat, i.e. nc
  3. improvements to the Emacs Gopher client with support for HTML and the new item type (see this branch on GitHub)

Isn’t that amazing.

Tags:

Add Comment

2017-12-27 Fonts

What fonts should I use on my new laptop?

On the Apple PowerBook Pro I used Fira Code. I liked those ligatures for Javascript!

But now I’m thinking perhaps Noto is better? Specially since there are packages for it: sudo apt install fonts-noto fonts-noto-color-emoji and you’re good to go. Except that Emacs doesn’t show me any orange flames when I use 🔥. Sad!

Still, in my Emacs config now: (set-face-attribute 'default nil :family "Noto Mono" :height 140).

Firefox Purebrowser renders the flame in blue and uses a lineheight of an estimated 600%. This looks very ugly.

installing fonts-symbola gives me the black flames back. Not cool, but also not bad.

Tags:

Comments on 2017-12-27 Fonts

i really <3 fantasque sans mono https://github.com/belluzj/fantasque-sans

idk abt emojis. there are melpa packages aren’t there? i gave up after trying a few tho. plain text does the trick.

– Anonymous 2017-12-28 00:34 UTC


We’ll see. :)

– Alex 2017-12-28 19:51 UTC


Hi Alex, I find Noto Mono to have issues with reading the numeral zero “0” and uppercase alpha o “O”. Not sure how you feel about that. Thats why I prefer using Hack.

– Darryl Hebbes 2017-12-28 21:48 UTC


Good point. We’ll see about that. These things haven’t been an issue for me in many years. Perhaps they will resurface with a new font, haha.

– Alex 2017-12-29 13:39 UTC

Add Comment

2017-12-13 In Memory Diff

New: In Memory Diff

in-memory-diff takes two source buffers and treats their content as a set of unordered lines, as one would expect for a file like ~/.authinfo.gpg, for example. We don’t use diff(1) to diff the buffers and thus we don’t write temporary files to disk. The result is two buffers, *A* and *B*. Each contains the lines the other buffer does not contain. These files are in a major mode with the following interesting keys bindings:

  • c – copy the current line to the other source buffer
  • k - kill the current line from this source buffer
  • RET - visit the current line in this source buffer

In theory, using c and k on all the lines should result in the two source containing the same lines a subsequent call of in-memory-diff showing two empty buffers.

Alternatively, a way to use ediff with process substitution such that ediff reads from two pipes would have been nice. Does anybody know how to do this?

Tags:

Comments on 2017-12-13 In Memory Diff

I don’t think Emacs can do the equivalent of process substitution, because Lisp code cannot see the fd numbers of process objects produced by make-pipe-process.

Hacking around this using fifos seems possible: https://github.com/kensanata/in-memory-diff/compare/master...npostavs:diff-fifo

– npostavs 2017-12-14 14:22 UTC


Wow, this is super cool! I wondered whether I’d be able to get ediff to do just that and had given up. Thanks!

– Alex Schroeder 2017-12-14 19:03 UTC


Have a look at this item on stackexchange:

https://emacs.stackexchange.com/questions/27382/diff-of-two-buffers-without-creating-temporary-files

But do note that in-memory doesn’t necessarily prevent other processes from accessing the pipes as they are file system objects (at least that’s my understanding).

– Titus von der Malsburg 2017-12-19 11:15 UTC


That’s correct. I’m mostly worrying about temp files being left behind, or deleted temp files being resurrected. Assuming that the main attack vector I’m fearing is people stealing the disk where my encrypted file and decrypted temp files are on, I think pipes are good enough.

– Alex 2017-12-19 12:47 UTC

Add Comment

2017-12-06 Emacs on Windows

Getting M-x eww to work:

  1. get libxml2-2.7.8-w32-bin.zip from https://sourceforge.net/projects/ezwinports/files/
  2. put the dll files from the bin subdirectory into the Emacs bin subdirectory
  3. add the Emacs bin directory to your PATH environment variable

That’s what they say. But it doesn’t work.

The Emacs Wiki agrees.

Suspiciously, the names differ: libiconv-2.dll, libxml2-2.dll, and zlib1.dll.

Tags:

Comments on 2017-12-06 Emacs on Windows

I suggest building them all; that’s what I did for my Emacs on Windows – and it works; that is, eww works.

For differing names, the following may prove a solution:

;; explicitrly specify names of dlls for libjpeg and gnutls
(defun krv/sublist_append (listvar sym newel)
  "Append newel to the sublist of listvar that starts with sym"
  (let ((elem (find sym listvar :key 'car)))
    (if elem
        (setcdr (last elem)
                (list newel)))))

(krv/sublist_append dynamic-library-alist 'jpeg "libjpeg-62.dll")
(krv/sublist_append dynamic-library-alist 'gnutls "libgnutls-30.dll")

Use it to redefine names of the libraries to ones you have, as needed. I do not quite remember - but probably library names are somewhat hardcoded into Emacs, which is not quite right.

kurvivor 2017-12-20 15:38 UTC


Ah, I had forgotten all about dynamic-library-alist. I’ll have to check what it says right there.

– Alex 2017-12-20 16:23 UTC

Add Comment

2017-08-10 Rcirc Menu

I use Emacs as a glorified IRC client but with Bitlbee, the number of IRC channels I’m in has exploded. So many Discord channels. And some Mastodon channels. And my Twitter accounts. It’s crazy. The Emacs modeline is no longer enough to display IRC activity. I wrote a little Rcirc Menu mode to handle it for me.

This has also revived my interest in submitting packages to ELPA. I still have write access. In order to test the waters, I submitted Rcirc Menu and Rcirc Color to emacs-devel. We’ll see how it goes!

Tags:

Comments on 2017-08-10 Rcirc Menu

Both are now available from ELPA.

– Alex 2017-08-16 07:26 UTC

Add Comment

2017-07-15 rcirc omit mode

I’m in some busy fake IRC channels. In real IRC channels, people don’t join and part like crazy. But when you join channels that are actually other networks like Discord, then there is a lot more joining and parting. And you don’t want to enable rcirc-omit-mode for each and every one of them by hand. Luckily, I found this useful snippet by Giorgos Keramidas:

(add-hook 'rcirc-mode-hook
  (lambda ()
    ;; rcirc-omit-mode always *toggles*, so we first 'disable' it
    ;; and then let the function toggle it *and* set things up.
    (setq rcirc-omit-mode nil)
    (rcirc-omit-mode)))

Why doesn’t rcirc-omit-mode take a parameter like all decent minor modes?

Tags:

Add Comment

2017-07-14 Bitlbee, Twitter, and Bold

I use Bitlbee. It acts as an IRC server and is the gateway to other services that can be understood in terms to nicks and channels. I use it for Twitter, for example. When I connect, Bitlbee fetches a bunch of older Tweets to fill my timeline. Sadly, highlighting is somehow borked as far as Twitter is concerned. What sort of highlighting you ask? Well, IRC has a convention of allowing some control codes to make stuff bold, italic or coloured. Not everybody uses it, but I installed a plugin for my IRC client, rcirc. This plugin seems to be interfering with the display of the Twitter backlog, sadly.

This screenshot shows the transition between backlog (the bold stuff above) and the “live” messages which are highlighted correctly:

Image 1

What’s wrong? What can I do to fix this?

  1. M-: (setq rcirc-debug-flag t)
  2. start bitlbee and rcirc
  3. switch to the buffer *rcirc debug*
  4. take a look at the borked messages

For example (translating the real Control-B to ˆB for you to read):

:iamdevloper!iamdevloper@twitter PRIVMSG #twitter_kensanata :^B[^B^B^B12:26:28^B]^B ^B[^B12^B]^B "Now I am become death, the destroyer of *worlds" - the project manager who promised the client early project delivery

It seems to legit, even though those three consecutive ^B characters are a pain. Well, at least now I know!

I looked at rcirc-styles and found that the Emacs Wiki page points to a different repository. Somebody has been maintaining the code. I deleted my code and installed the package, and all is well, now. Yay!

Thanks, Aaron Miller. :)

Tags:

Add Comment

2017-05-18 Emacs Wiki Down

Sadly it seems that Emacs Wiki is down. Currently Nic Ferrier is paying for the servers, so I sent him an email but haven’t heard back. So I’m thinking of resurrecting the site on my own servers.

I still remember the fiasco that started with 2014-12-18 Emacs Wiki Migration.

These are my notes. Perhaps they’re useful in case I have to restore another backup, or they might be useful to you if you want to fork Emacs Wiki.

First, restore the backups from Chile provided by zeus. Thanks, man!

rsync -az kensanata@theshire.emacs.cl:emacswiki.org .
rsync -az kensanata@theshire.emacs.cl:emacswiki .

I want to run the script from my Mojolicious Toadfarm. I added the following lines to my Toadfarm setup:

# emacswiki.org

mount "$farm/emacswiki.pl" => {
  "Host" => qr{^emacswiki\.org:8080$},
  mount_point => '/wiki',
};

And this is the Mojolicious CGI Plugin wrapper, emacswiki.pl:

#! /usr/bin/env perl

use Mojolicious::Lite;

plugin CGI => {
  support_semicolon_in_query_string => 1,
};

plugin CGI => {
  route => '/',
  script => '/home/alex/farm/wiki.pl', # not necessary
  errlog => '/home/alex/farm/emacswiki.log',
  run => \&OddMuse::DoWikiRequest,
  before => sub {
    no warnings;
    $OddMuse::RunCGI = 0;
    $OddMuse::DataDir = '/home/alex/emacswiki';
    require '/home/alex/farm/wiki.pl';
  },
};

app->start;

In order for this to work, I need an Apache site. I created /etc/apache2/sites-available/500-emacswiki.org.conf with the following:

<VirtualHost *:80>
    ServerName emacswiki.org
    ServerAlias www.emacswiki.org
    Redirect permanent / https://emacswiki.org/
</VirtualHost>
<VirtualHost *:443>
    ServerAdmin alex@emacswiki.org
    ServerName emacswiki.org
    ServerAlias www.emacswiki.org
    DocumentRoot /home/alex/emacswiki.org
    <Directory /home/alex/emacswiki.org>
        Options ExecCGI Includes Indexes MultiViews SymLinksIfOwnerMatch
	# legacy CGI scripts like info-ref.pl                                                                                                                
        AddHandler cgi-script .pl
        AllowOverride All
        Require all granted
    </Directory>

    SSLEngine on
    SSLCertificateFile      /etc/letsencrypt.sh/certs/emacswiki.org/cert.pem
    SSLCertificateKeyFile   /etc/letsencrypt.sh/certs/emacswiki.org/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt.sh/certs/emacswiki.org/chain.pem
    SSLVerifyClient None

    ProxyPass /wiki             http://emacswiki.org:8080/wiki
    ProxyPass /mojo             http://emacswiki.org:8080/mojo

</VirtualHost>

I remove all the *.pl files except for info-ref.pl in the emacswiki.org directory.

Reloded the farm using ./farm reload. Check the log file for Mounting emacswiki with conditions.

Activating the site using sudo a2ensite 500-emacswiki.org.

Check the config using sudo apachectl configtest. Oops! This is an obvious erorr, of course: SSLCertificateFile: file '/etc/letsencrypt.sh/certs/emacswiki.org/cert.pem' does not exist or is empty.

I need to get the SSL certificates, too.

I added emacswiki.org www.emacswiki.org to /etc/letsencrypt.sh/domains.txt and ran /etc/letsencrypt.sh/letsencrypt.sh -c but that doesn’t work. I guess it doesn’t work because the name emacswiki.org still points to the old server. I guess for the moment I’ll try to do without HTTPS.

So this is what I’ll be using instead for the site:

<VirtualHost *:80>
    ServerName emacswiki.org
    ServerAlias www.emacswiki.org
    ServerAdmin alex@emacswiki.org
    DocumentRoot /home/alex/emacswiki.org
    <Directory /home/alex/emacswiki.org>
        Options ExecCGI Includes Indexes MultiViews SymLinksIfOwnerMatch
        # legacy CGI scripts like info-ref.pl                                                                                                                
        AddHandler cgi-script .pl
        AllowOverride All
        Require all granted
    </Directory>

    ProxyPass /emacs            http://emacswiki.org:8080/wiki
    ProxyPass /wiki             http://emacswiki.org:8080/wiki
    ProxyPass /mojo             http://emacswiki.org:8080/mojo

</VirtualHost>

Now sudo apachectl configtest says Syntax OK.

Reloaded Apache using sudo service apache2 reload.

Added a line to my /etc/hosts file:

192.71.233.105  emacswiki.org

Testing w3m http://emacswiki.org/wiki and w3m http://emacswiki.org/wiki seems to work!

Better make the wiki read-only: touch ~/emacswiki/noedit.

Following links doesn’t work. w3m http://www.emacswiki.org/emacs/HowToNavigate tells me: Can't load http://www.emacswiki.org/emacs/HowToNavigate. The problem is that Apache has www.emacswiki.org as a server alias, but the Toadfarm only listens for emacswiki.org.

Change that:

# emacswiki.org                                                                                                                                              

mount "$farm/emacswiki.pl" => {
  "Host" => qr{^(www\.)?emacswiki\.org:8080$},
  mount_point => '/wiki',
};

And reload: ./farm reload.

That didn’t work. Hah, of course not. I need to add www.emacswiki.org to my /etc/hosts, of course!

Now it works.

OK, next problem: Why does w3m http://www.emacswiki.org/ give me the directory listing? Surely I’m missing my .htaccess file. Is it not being read? The /var/log/apache2/error.log file has not suspicious. Well, it does mention something about the emacswiki.org/rss directory but I just deleted it. Are the permissions wrong? I did a chmod g-w .htaccess just to be sure and now it says:

-rw-r--r-- 1 alex alex 1955 May 29  2016 emacswiki.org/.htaccess

This looks correct to me.

In there, it says DirectoryIndex emacs.pl. Ah. That might be a problem because I removed that script. Changing that to DirectoryIndex emacs did the job!

OK, so anybody who has access to their own /etc/hosts file can now access a read-only copy of the site.

Here’s what I have planned:

  1. change the DNS entry ✓
  2. see how the site explodes 🔥🔥🔥
  3. add HTTPS

When I tried to add a News page, I noticed that I was unable to get the wiki back into writeable mode. I had to remove the noedit file I had created earlier using rm ~/emacswiki/noedit.

Then, when I tried to save, the wiki complained about some page that looked like spam not being readable and I figured that the page index must have been out of sync so I simply removed it using rm ~/emacswiki/pageidx.

And finally I recreated the lock using touch ~/emacswiki/noedit.

OK, now I’m waiting for the DNS change to spread and watching my Munin graphs.

Also, all the people with HTTPS bookmarks will get errors like the following: Bad cert ident from emacswiki.org: dNSName=alexschroeder.ch rpg.alexschroeder.ch www.alexschroeder.ch : accept? (y/n). That’s because emacswiki.org is currently longer listening on port 443 and the default site is alexschroeder.ch. Oh well! In a few hours I’m hoping that Let’s Encrypt will allow me to regenerate certificates for Emacs Wiki and then we’ll move to HTTPS.

Hours later, I checked again and HTTP access was working. So I ran sudo /etc/letsencrypt.sh/letsencrypt.sh -c to get the certificates and this time it worked. I reverted the changes to the site config file /etc/apache2/sites-available/500-emacswiki.org.conf and we’re no using this:

<VirtualHost *:80>
    ServerName emacswiki.org
    ServerAlias www.emacswiki.org
    Redirect permanent / https://emacswiki.org/
</VirtualHost>
<VirtualHost *:443>
    ServerAdmin alex@emacswiki.org
    ServerName emacswiki.org
    ServerAlias www.emacswiki.org
    DocumentRoot /home/alex/emacswiki.org
    <Directory /home/alex/emacswiki.org>
        Options ExecCGI Includes Indexes MultiViews SymLinksIfOwnerMatch
	# legacy CGI scripts like info-ref.pl
	AddHandler cgi-script .pl
        AllowOverride All
	Require all granted
    </Directory>

    SSLEngine on
    SSLCertificateFile      /etc/letsencrypt.sh/certs/emacswiki.org/cert.pem
    SSLCertificateKeyFile   /etc/letsencrypt.sh/certs/emacswiki.org/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt.sh/certs/emacswiki.org/chain.pem
    SSLVerifyClient None

    ProxyPass /emacs            http://emacswiki.org:8080/wiki
    ProxyPass /wiki             http://emacswiki.org:8080/wiki
    ProxyPass /mojo             http://emacswiki.org:8080/mojo

</VirtualHost>

Notice that both /emacs and /wiki will work. Is this a bad idea? sudo apachectl configtest says the changes are good and so I ran sudo service apache2 reload. Everthing seems to be working!

What about load? It’s definitely going up! :(

OK, time to read up on mod_cache. I think I want something like the following:

# Turn on caching
CacheSocache shmcb
CacheSocacheMaxSize 102400
<Location "/emacs">
    CacheEnable socache
</Location>

Well, before diving into this, I think we should just monitor how load develops over the next few hours.

A few hours later it would seem to me that there are no open issues so there is no need for extra caching.

And that also means, I can try and make the website editable again.

Let’s see, what else do we need to check?

  1. does git work?
  2. what about cronjobs?

As for git, this is simple. I created the page 2017-05-18 and I expect to see it on the emacsmirror master branch. Sadly, it isn’t there. Why not?

Let’s take a look:

alex@sibirocobombus:~/emacswiki/git$ git log
commit a08f867084896e9892d148f76a54976166cd75db
Author: Alex Schroeder <anybody@emacswiki.org>
Date:   Thu May 18 13:56:01 2017 +0200

    Backup site!

Oops! Apparently, the git repository wasn’t checked out. It makes sense, actually. But now I need to fix this. git remote -v shows no remotes. Let’s add it, and fetch data. This works because my public key is already part of the emacswirror org on GitHub.

git remote add origin git@github.com:emacsmirror/emacswiki.org.git
git fetch
git branch -m master temp
git checkout master

At this point it should tell you Branch master set up to track remote branch master from origin.

git cherry-pick a08f86
git push
git branch -D temp

OK. Time to test it! In order to be able to save, I now have to change the site URL in the config file back to HTTPS. It should read

my $root = "https://www.emacswiki.org";

I made the page edit and that seems to do the trick. git log in the git directory lists the new edit.

This brings me to the next part: cron jobs. Somebody has to push those commits, right?

  1. I added emacswiki and emacswiki.org to the shell script that uses rsync to store daily backups in Chile. Thanks again, zeus!
  2. I found an old emacs-git-update in my bin directory and added an appropriate entry to my crontab using crontab -e.
  3. I found an old maintain-emacswiki in my bin directory, fixed it, and also added it to crontab. I definitely need to check the maintenance page a few times over the next few days.
  4. I found an old update-ell in my bin directory and decided to check the XML file referenced. The timestamp says Wed 24 Dec 2014 11:36:00 GMT so I think it’s safe to say that this won’t be required anymore.
  5. I did not find a copy of the emacs-elisp-area script. I checked the code in my config file and now I remember: this job used to call the expensive Elisp Area URLs and save the result to disk, and then URL rewriting made sure that the Elisp Area URLs called from the web would read those files instead. I just tried those links (”Alphabetical list of all Elisp libraries on this Wiki” with and without context, and “Chronological list of all Elisp libraries on this Wiki”) and it seems to work just fine. It takes a few seconds, but nothing terrible. I’ll say that this won’t be required anymore.
  6. I found an old copy of emacs-rss in my bin directory. That one precomputes some resource intensive RSS feeds. I should definitely get those back into working condition. When I run it, the four files are generated, and they’re the four RSS feed advertised in the HTML of the wiki, so that’s great.

And that’s all the jobs I found in an old crontab file!

Current status, one day later:

The only suspicious thing is the spike around 2:30 in the morning. But the explanation might be simple enough, looking at my crontab:

#m   h  dom mon dow   command
 02  5  *   *   *     /home/alex/bin/maintain-campaignwiki
 47 4,16 *  *   *     /home/alex/bin/backup
 28  4  *   *   *     /home/alex/bin/subscriptions
 14  3  *   *   *     /home/alex/bin/emacs-git-update
 32  2  *   *   *     /home/alex/bin/maintain-emacswiki

At 2:32, the maintenance job runs. The curl output is available in the maintenance directory:

--2017-05-19 02:32:01--  https://www.emacswiki.org/emacs
Resolving www.emacswiki.org (www.emacswiki.org)... 192.71.233.105
Connecting to www.emacswiki.org (www.emacswiki.org)|192.71.233.105|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘/home/alex/emacswiki.org/maintenance/last.html’

     0K .......... .......... .......... .......... .......... 43.1K
    50K .......... .......... .......... .......... .......... 11.3K
   100K .......... .......... .......... .......... .......... 3.66K
   150K .......... .......... .......... .......... .......... 21.3K
   200K .......... .......... .......... .......... .......... 35.7K
   250K .......... .......... .......... .......... .......... 7.86K
   300K .......... .......... .......... .......... .......... 12.4K
   350K .......... .......... .......... .......... .......... 22.8K
   400K .......... .......... .......... .......... .......... 19.3K
   450K .......... .......... .......... .......... .......... 3.64K
   500K .......... .......... .......... .......... .......... 5.91K
   550K .......... .......... .......... .......... .......... 14.6K
   600K .......... .......... .......... .......... .......... 10.3K
   650K .......... .......... .......... .......... .......... 15.4K
   700K .......... .......... .......... .......... .......... 20.5K
   750K .......... .......... .......... .......... .......... 15.3K
   800K .......... .......... .......... .......... .......... 15.3K
   850K .......... .......... .......... .......... .......... 15.4K
   900K .......... .......... .......... ......                18.5K=86s

2017-05-19 02:34:03 (10.9 KB/s) - ‘/home/alex/emacswiki.org/maintenance/last.html’ saved [959329]

I’m guessing that these two minutes are causing the spike.

When I did some testing with the CSS, I ran into problems. If you choose a different theme via the CSS page, it gets stored in a cookie. Cookies are specific to a site, and so cookies set on http://emacswiki.org, https://emacswiki.org, http://www.emacswiki.org and https://www.emacswiki.org are separate from each other. This will not do. I’ve now changed the Apache config file to create the appropriate redirections. At the same time, I wanted to clean up the https://www.emacswiki.org/wiki vs. https://www.emacswiki.org/emacs situation.

<VirtualHost *:80>
    ServerName www.emacswiki.org
    ServerAlias emacswiki.org
    Redirect permanent / https://www.emacswiki.org/
</VirtualHost>
<VirtualHost *:443>
    ServerName emacswiki.org
    Redirect permanent / https://www.emacswiki.org/
    SSLEngine on
    SSLCertificateFile      /etc/letsencrypt.sh/certs/emacswiki.org/cert.pem
    SSLCertificateKeyFile   /etc/letsencrypt.sh/certs/emacswiki.org/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt.sh/certs/emacswiki.org/chain.pem
    SSLVerifyClient None
</VirtualHost>
<VirtualHost *:443>
    ServerAdmin alex@emacswiki.org
    ServerName www.emacswiki.org
    DocumentRoot /home/alex/emacswiki.org
    <Directory /home/alex/emacswiki.org>
        Options ExecCGI Includes Indexes MultiViews SymLinksIfOwnerMatch
        # legacy CGI scripts like info-ref.pl                                                               
        AddHandler cgi-script .pl
        AllowOverride All
        Require all granted
    </Directory>
    SSLEngine on
    SSLCertificateFile      /etc/letsencrypt.sh/certs/emacswiki.org/cert.pem
    SSLCertificateKeyFile   /etc/letsencrypt.sh/certs/emacswiki.org/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt.sh/certs/emacswiki.org/chain.pem
    SSLVerifyClient None
    Redirect permanent /wiki    https://www.emacswiki.org/emacs
    ProxyPass /emacs            http://emacswiki.org:8080/wiki
    ProxyPass /mojo             http://emacswiki.org:8080/mojo
</VirtualHost>

I wonder whether it’s important to prevent outside access to http://emacswiki.org:8080/wiki. I see no problem?

Tags:

Comments on 2017-05-18 Emacs Wiki Down

Heroic effort, and amazing notes! Thanks for Emacs Wiki!

AaronHawley 2017-05-19 01:27 UTC


Thanks!

– Alex Schroeder 2017-05-19 07:04 UTC

Add Comment

More...

Comments


Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.