2024/03/26

systemctl for emacs on Ubuntu and debian

Run systemctl --user enable --now emacs

Which should give in /usr/local/lib/systemd/user/emacs.service:

 [Unit]

Description=Emacs text editor
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/

[Service]
Type=simple
ExecStart=/usr/bin/emacs --fg-daemon
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
#Environment=SSH_AUTH_SOCK=%t/keyring/ssh
Restart=on-failure

[Install]
WantedBy=default.target


 systemctl --user stop emacs

systemctl --user daemon-reload

 systemctl --user start emacs

2023/07/28

Compiling emacs for Crostini/chromeos

0. Introduction


NB: I am in the process of adopting this : https://www.jamescherti.com/compiling-emacs/

I will update the following as I aaprogress
I read an excellent article called Using Emacs 81 Elfeed Webkit by Mike Zamansky.  The ability to see more content whilst staying within Emacs is a good idea. Spoiler alert: It turned out to be even better than I thought, in fact, it is my favourite way to consume RSS/Atom.

I also wanted to get a newer version of Emacs than is readily available from standard sources, plus I also wanted to try tree-sitter. Note the is a much fuller explanation of compiling emacs with tree-sitter here; more importantly it gives extensive insight into why you will want it!

In summary, it worked, it wasn't too difficult and I found it fun!
I have highlighted what seemed to be Chromeos specifics in red.

1. Setting up the environment

I did the following
  • setup deb-src entries in /etc/apt/sources.lst. This can easily be done in the UI of a normal Linux distribution - and it can be done on Chromeos but it seemed more trouble than it was worth!
  • sudo apt update
  • sudo apt build-dep emacs ; this should install the required dependencies

2. Get extras

In addition to tree-sitter and widgets (for reading RSS) I also wanted to have native compilation
  • tree-sitter (many full distributions have easier ways of getting this)
    • git clone git@github.com:tree-sitter/tree-sitter.git
    • make
    • sudo make install
  • get xwidgets
    • sudo apt-get install libwebkit2gtk-4.0-dev
  • sudo apt install libgccjit-13-dev
  • sudo ldconfig

3. Build emacs

This is standard stuff, with the augmented configure line, which you may wish to vary.
  • git clone -b master git://git.sv.gnu.org/emacs.git
  • OR
    git clone --single-branch --branch=emacs-30 http://git.savannah.gnu.org/r/emacs.git emacs-29
  • OR
           git pull
           git checkout refs/tags/emacs-30.2
OR
          git fetch origin tag emacs-30.2 --no-tags (to reduce download volume)
  • checkout required version ( I just went with master and so I am on version 30! It works fine for me but you could be more prudent
  • sudo apt-get build-dep emacs
  • export CC="gcc-14" for ubuntu  (or 12 on debian)
  • Install libgccjit-14-dev
  • sh autogen.sh
  • ./configure --without-compress-install --with-native-compilation --with-mailutils --with-tree-sitter 

  • make (may need to make bootstrap if there are errors)
  • sudo make install
If there is a config.h error try 'git clean -fdx' then make

systemctl stop --user emacs
systemctl --user daemon-reload
systemctl start --user emacs

4. Conclusion

The above list of commands is quite straightforward and you end up with a nice modern emacs which seemed a bit quicker to me.  In reality, the above list was obtained by a lot of trial and error, hence why I am documenting it!

Let me know if you have any questions or comments.

2022/03/18

Review of Magonomia: a FATE rpg of Renaissance Wizardry

 



Summary:

  • A large ( approx 380 pages) RPG ruleset based on FATE (Core but with Condensed additions)
  • Published by Shewstone , available as a PDF and physical book on Drivethru RPG. There is also a pay-what-you-like intro scenario and a free set of starter rules.
  • This book covers Elizabethan England and all PCs are some form of wizard.
  • I consider this to be a great introduction to FATE with many of the trickier concept of that ruleset explained clearly. As a bonus several aspects of how to play and collaborate are covered including safety tools this is all done is a pragmatic fashion
  • The layout and art are good, and I had no problem reading the text against the manuscript style background - YMMV
  • Bottomline: although I haven't played it yet, I am very glad I got this book.
  • I aim to revisit this initial review as I learn more!

Context:

A few things about me which may help you discern if this review will help you.  I love RPGs but don't get to play them that often.  I prefer story-telling RPG to crunchy ones, and as such I like FATE.  I have many FATE rulesets.

I love the Elizabethan period of history - it was a time of great changes as England emerged from the Middle Ages and started to enter a more modern era. Culture, politics, religion: all were in great flux.  John Dee (astrologer), Francis Wallsingham (spy master), Sir Francis Drake (adventurer) are just some of the larger than life characters of this period. Plus Shakespeare and what did happen to Christopher Marlowe?

Magic:

All the player characters are wizards and there are 5 styles of magic, 5 Sciences: Astrology, Alchemy, Sorcery, Theurgy and Witchcraft. Wizards specialize in just one ( though there are overlaps).

FATE has a wonderful Bronze Rule: you can treat anything as if it were a characters, with its own Aspects, Skills, Consequences etc. There are things called Extras  which are controlled by a character - well, spells are Extras  and follow the Bronze rule. I think this is wonderful; I suspect this is one reason why FATE was chosen to underpin Magonomia.

FATE RPG intoduction:

This ruleset takes the time and space to introduce role playing games, give advice on how to help the group enjoy themselves, but also how to collaborate, run a campaign and may other things which will help groups new to RPGs in general and to FATE in particular. Hence, despite being a big book it is a good introduction. 

In addition, there are chapters for the Games Master including plot hooks.

Other materials:

To round things out there are chapters on the background of the era, the country, a grimoire, and magical Lore

Around the internet:




2022/02/27

Setting up mu4e for gmail for emacs

I am doing this in crostini on my Chromebook
  • Setup your gpg certificate if you don't have one (I used the instructions here)
  • setup pass if not installed
    • pass init <userid>
  • Get an application specific password for gmail here
  • Add this password to pass
    • pass insert Mail/MyGmail
  • Then setup ~/.mbsyncrc as per this link (Thank you SystemCrafters!)
    • Change userid
    • Use pass Mail/MyGMail to retrieve the password
    • I also added MaxMessages to the local channel as the crostini container is small!
    • Check the certificates path for your distribution (it was fine for debian)
  • Initial sync
    • mbsync -a
  • Setup mu4e
    • Note that the instructions in the previous link are now out of date...
    • After installing
    • mu init -m ~/Mail --my-address=userid@gmail.com
    • mu index
  • Then follow these instructions to use mu4e-org

2018/01/26

Keybase

Hopefully this web site is now verified on keybase!

2013/07/20

Test

Test post/publish

2013/04/27

Minimalist Running

My running history

At school I was a sprinter and loathed cross-country runs.  In my low 20s (and sporadically thereafter) I tried jogging which I found a) boring and b) gave me shin splints.

To address the shin splints I went to specialist running shops and was given heavy pronation (anti-pronation?) shoes - but promptly got injured again.

Many years later I am still struggling to run any distance.

Enter minimalist shoes

I noticed the 5 fingers shoes and wondered about trying them.  I didn't find any locally and then I saw this post on G+  by Tim O'Reilly: he caught his little toe with painful results.  Down in the comments someone mentioned "Vivobarefoot"; I did a search and found a pair on amazon for a special offer.  It was obviously "a sign", so I got some:

I went off for a walk/run: 30 seconds run every 3 minutes (though it was just walk after the first 20 minutes!).  It was great - I felt really good, the birds sang in the sky......
For the second walk/run I went out with my wife, who runs 3 times a week. This was a mistake - pushed a bit too far and had terrible Achilles pains the next day. And basically that meant walking only for 4 months - every attempt to run triggered the Achilles again.

Minimalist walking

So I felt it was time to do a gentler form of exercise for a while: walking. Where do I do most walking?  At work: to, from and around the park at lunchtime.  The Airmesh above were fine but after a while I felt the need to have something less showy (and reserve the Airmesh for the gym); enter the Vivobarefoot Ra:

I now have 2 pairs of these: blue canvas and black leather.  Both very nice and usable at the office.  I had to "sugru" the inner heel of the canvas pair as they chafed a little.
So now I get to gently stretch my achilles for hours a day.

Back to running?

Right now I am going back to walk/running (60-90second run, 3 minute walk) - so far so good.  To do that over the winter I got a pair of Vivobarefoot Trails which I use when walking the dog.  Again excellent: nice broad toe box, more traction, highly waterproof (which surprised me).  I my look at some Breathos if summer ever arrives.

Summer?

Did I mention summer?  Towards the end of last summer I got a pair of Vivobarefoot Achilles:
A distinctive design! I find them comfortable but I have not used them much yet!

Vivobarefoot

I know the above will make me appear a Vivobarefoot fan boy - this would be correct!  Their shoes are great, they have varied designs, I like their efforts to be green and to provide education to help people transition to minimal footwear with less chance of injury

Xero Shoes

That said I have just got a pair of Xero Shoes  huraches (from Xero Shoes UK actually):
Again a summer shoe.  I have assembled them, and learned to tie them - which was fun.  Getting the tension right is a bit of an art but I think I am there now.  As with the Achilles I look forward to more sunshine!

Conclusion

So that was a whirlwind tour of my growing minimalist shoe collection.  Important points:
  • Transition carefully!  I have found being able to wear minimalist shoes at work and mainly walking to be a great way of training my feet.  This is especially important for the older ones, and those who do a lot of running miles in heavy-weight running shoes.
  • You don't have to have the 5 fingers! Vivobarefoot and others make relatively normal looking shoes (Achilles excepted) which are easier to fit and can cut down on one form of injury.  That said many people love VFFs.
  • The minimalist shoe community is great.
So hopefully this will be the summer where I complete my transition to minimalist running and not just walking - I'll  let you know!

2013/03/30

Emacs Conf, 30th March 2013, London

Intro

So a slightly belated write-up of my Saturday jaunt up to the Big Smoke.

Just so you know, I really use Emacs mainly for org-mode but I am also playing with Common Lisp ( is slime/swank) and Clojure (via nrepl).  I am not a power user, and have not done any elisp except twiddling with init.el.

Why did I go? I fancied a day out, hoped to learn some new stuff and to be at the first Emacs Conf so I could tell my grandchildren (for the record my children didn't care!)

Did it meet those expectations (except the last!): yes, and more!

Venue

I can claim another first - never been to Mornington Crescent tube station ( which is just north of London's Euston (main station for the North of the UK).

The venue ( 2nd Floor, Centro 3) belonged to Forward and was great: auditorium, canteen area with a plentiful supply of beverages.  A big shout out to them and @Jon_Neale in particular for supporting this conference.

There were issues with the streaming so not all talks were recorded for posterity; there is an explanation here.  As someone said on that thread - this was a free conference done by a first-time organising team, so these things happen...  That said people are pulling together with audio, video from phones, and (obviously) the side decks ( or org files!) etc.- all is not lost!

Alex Simic (+Aleksandar Simic) led the organising team and was the MC.

The weird internet life 

A couple of odd things:
  • At work I know only one other person who uses emacs - but here everyone was taking notes in it!  (except me who thought he'd be smart by just taking the Galaxy S3, when I could have completely re-engineered my init.el by the time I left!!)
  • This was the worst case for me so far of meeting people who I have seen on vimeo/you tube, read on Twitter/G+/blogs etc. but you have never spoken to before. I felt I knew them, they wondered who I was. Luckily nearly everyone was very approachable so I felt they were best buddies by the time I left.

Keynotes

Sacha Chua and John Wiegley did a joint Keynote. 

Sacha did a a fantastic "Why Emacs is so great" presentation to an emacs conference - everyone loved it and everyone around where I was seemed to learn something new from it; no mean feat to 100 emacs experts (well, 99).

Sacha is a person of boundless enthusiasm!

John did a history of Emacs and its antecedents together with personal anecdotes of his own.  Sounds as if it would be a dry topic but I learned some new stuff and he delivered it in an amusing and engaging way.

A great start to the conference!
(Audio here)

Other Highlights

Nic Ferrier talked in his usual entertaining and unique style about loads of stuff: emacswiki, elnode, the nature of lazy collaboration and more! Oh and he used org mode for his notes.

Dimitri Fontaine spoke about el-get which is the package system I tend to use as a preference - partly because I found it first, it worked on Emacs 23 and it can use other package systems as methods.  Dimitri, Nic and Steve ("Luna Sandles") Purcell also gave an interesting panel on package managers and resisted over complicating the domain!

Sam Aaron talked about emacs-live (pointer to foundation packages). As one of the oldest people there I needed to get home for an early bedtime, so I missed his emacs driven music performance (with free beer and pizza!) later on.

But really there is almost too much to mention (sorry if you didn't get an explicit mention) - a very good day!

Other information

Sacha's sketch notes: http://experivis.com/collection/emacsconf2013/




2012/12/23

Vivibarefoot and Sugru

I am a great fan of both +VIVOBAREFOOT and +sugru .

I will write more on my experiences with minimalist shoes, but I have now acquired a number of pairs of Vivobarefoot's shoes and love all of them.

The one problem pair were the Vivobarefoot Ra (Blue, canvas) - look good, can be worn to work(although the white sole is definitely "business casual"), but after a while the heel rubbed on the edge.

I am happy to report that a "smear" of blue sugru around the rear edge of the shoe seems to have done the trick; it was tested by the local Xmas disco!

2012/06/20

The future of Emacs and humanity

"But ... Emacs will still be there, waiting. It will be there when the icecaps melt and the cities drown, when humanity destroys itself in fire and zombies, when the roaches finally achieve sentience, take over, and begin using computers themselves - at which point its various Ctrl-Meta key-chords will seem not merely satisfyingly ergonomic for the typical arthropod, but also direct evidence for the universe's Intelligent Design by some six-legged, multi-jointed God." Kieran Healy

Hilarious and insightful! Personally, I think it will be some form of octopus that inherits the earth, but tellingly a mutated version of the last line will still apply.

Emacs octopus using a keyboard
Found at https://www.deviantart.com/earlcolour/art/emacs-user-at-work-195326745
Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License

2012/04/04

Terry Pratchett Going Postal

Terry Pratchett Going Postal: I just bought the Blue ray of this and got round to watching it last night.  And I very much enjoyed it !

I have read and liked many of the books: The Colour of Magic had me LOL which is rare for a book.  But I only "quite enjoyed" the TV films of  Colour of Magic and The Hogfather.  Great cast, super production values, but not Really Funny(tm).  Quite Funny(tm).

Going Postal had a great cast, great production values, great timing ( except perhaps the ending was a bit rushed).  David Suchet was splendidly evil!.  I thought that Jeremy Irons could not be bettered as Lord Vetinari, but Charles Dance was great ( and had a very prominent part cf. Colour of Magic). Clare Foy ("Little Dorrit" says my wife) as Adora Belle Dearheart and  Richard Coyle as Moist Von Lipwig(!) were also superb.  Tamsin Greig, Steve Pemberton - the list goes on and on!


So I hope this met with commercial success so that other Discworld novels will be brought to our screens.

2012/02/14

Gnome 3 update

I am still enjoying Gnome 3.  However, issues ( I think with my ATI driver) on my home machine have led me to upgrade to Ubuntu 12.04 (alpha!).  This has gone very well, and seems very reliable - I hpe it stays that way.

I am making use of Gnome extensions anfd have found several useful ones - even though they are to put back some Gnome 2 items (like trash cans window bar)

One thing that I am missing is having the "hot corner" duplicated on a second screen. In fact i would like the top bas also duplicated on the 2nd screen! Any pointers welcomed.

2011/11/21

Gnome 3 - recommended

Well, this is interesting - some famous people (Linus Torvalds, Mark Shuttleworth) plus folks I respect at work have a real downer on Gnome 3. I installed it today (3.2.1) whilst trying to get something else to work, and gave it a try.

 And I think it is great. It looks good, performs well, and is highly usable.

  •  Mouse to the top left of the screen (or press Windows key) gives thumbnails of the running apps (Activities-> Windows) 
  • or you can click on Applications to get a list of apps, which are categorised (All, Accessories, Games etc.). 
  • Hit the Windows key and start typing: this searches for Apps or Contacts (I wonder if it can be made to search for files?) 
  • Also on the Activities screen is a dock which shows favourites. It looks very similar to the Unity side bar except it doesn't pop up irritatingly when you put the mouse over it whilst trying to use the windows max/min/close buttons which are on the left in Unity. 
  •  max/unmax is just double clicking on the windows top bar 

 So I was getting used to Unity, and could see where Canonical were going with it. But it seems to me that Gnome 3 is here now and working well - recommended!!

 (PS: Using Ubuntu 11.10 on Lenovo W520)

2011/10/08

Steve Jobs and the WWW

Fascinating background on Steve Jobs influence on software engineering with things such as hypercard.  What I didn't know was that Tim Berner-Lee used a NeXT machine!

2011/08/22

Thoughts on reducing delivery cycles

Mary Poppendick:LeanEssays: How Cadence Predicts Process makes some excelent points about the efficiency of delivery from requirement to delivery of thesupporting feature.  Along the way she mentions Kent Beck and the affects of reducing the release cycle on sales, support etc. Close to my own heart at present is automated testing and a mention of the book Specification by Example

2011/07/28

Android tablet

I have dipped my toe in the tablet pond. I have got an Advent Vega, a £200 Android tablet.  Cheap price but the processor and screen are great.

I have upped the rom to include Android Market,and have gradually added more Apps.

Have had a couple of glitches where the wi-fi stopped, the screen rotation was 90degrees out, and reboots gave an error.  Backup system works!

Why Android rather than Apple? USB port, SDcard, terminal.......

The Vega does not look as sexy as an iPad, but I am happy with its function!

2011/06/28

LaTeX: More Than Just Academic Papers and Theses

I have long been a fan of Latex for large complex documents. Over the years I have found that it can do more, even for small documents.


The breadth of things Latex can do is fantastic, and the quality is great.

Great presentation.

2011/06/02

weblogger.el

Just trying out another blog entry system from emacs!