BFC Playground Mac OS
BFC Playground Mac OS
This is a short post detailing how I installed Emacs and configured an environment for maintaining multiple configurations (on my MacBook Pro).I wanted to write the post because I have been on a roller coaster getting an Emacs install that provides all of the functionality that I want (maybe even need!).
In the Finder search box, type Playground. Locate the Playground app, which will have an icon with a white note on a blue background and double click to open it. Once you've located Playground in your Finder, you'll then have the option of clicking and dragging it to your dock, creating a shortcut for accessing it. Mac OS official guide; Windows official guide; Linus official guide; Guide for Mac OS. I am on a Mac OS system, so I am writing this guide as well, more for personal information. Tap the MongoDB Homebrew Tap¶ brew tap mongodb/brew Procedure. Follow these steps to install MongoDB Community Edition using the third-party brew package manager.
Some Emacs installs (e.g. emacs from homebrew) are not recognised by the yabai tiling window manager and don't tile properly.This really started to bug me so I invested a hefty chunk of time (in classic Emacs style) to find a solution.I stumbled across Emacs-plus which solved the issue but left me with another…I use the pdf-tools package through the pdf-tools spacemacs layer for viewing all my pdfs; writing LaTeX
docs (using org-mode and/or auctex), reading books, reading papers (using org-ref) etc.Unfortunately, both of these installs don't support retina pdf quality in PDFView (pdf-tools).So I set out on a second mission to get my myself a high res pdf viewing experience within Emacs.
Many GitHub issues later and The Emacs Mac Port came to the rescue.This is an excellent blog post detailing how The Emacs Mac Port (which I installed using Homebrew from this repo) greatly improves Emacs’ functionality with MacOS.In particular, it provides a lot of native GUI support.
I personally don't like having a title bar on my beautiful editor so I choose not to install it.I think I read somewhere that it might interfere with tiling window managers as well and we can't be having that, so let's install it without,
and to make sure that we are using the right install be sure to link emacs-mac with,
Now that we are using The Emacs Mac Port we need to add the following to our config file (user-config in spacemacs) if we want to enjoy the fruits of our labour,
I also like PDFView to open with the pdf fit to the screen (show 1 page) so I also added the following,
Chemacs
Chemacs is an Emacs profile switcher that makes it easy to run multiple Emacs configs side by side.I am currently running six Emacs configurations,
- New Spacemacs Base (Develop Branch)
- This is a new config that I am setting up using just spacemacs-base instead of full spacemacs. I want to understand all of the packages I am using and install only the ones I need, thus avoiding a lot of bloat.
- New Spacemacs Base (Master Branch)
- This is the same config file but running on spacemacs master instead of the develop branch.
- Literate Org Config File
- This is the same configuration but written in an Org file with lots of documentation. I use tangle/detangle to produce emacs lisp files from the org file. I haven't decided if I want to fully invest in a literate config file so this is a nice way to experiment.
- Vanilla Emacs
- Although I love spacemacs I am eager to build a full Emacs config from scratch and this config is my attempt.
- Spacemacs Old Develop
- This is my old (full) spacemacs config running on the develop branch.
- Spacemacs Old Master
- This is my old spacemacs config running on master.
It's super easy to setup, just clone the repo and run the install script.I don't think I need to repeat the instructions that are listed in their README.Once you have it setup the main functionality comes from two files.First there is the ~/.emacs-profiles.el
file where you define all of your different configurations.This is what my ~/.emacs-profiles.el
file looks like,
- Chemacs will load the
init.el
file from theuser-emacs-directory
,- you can change the file name/path by setting the
cutom-file
variable.
- you can change the file name/path by setting the
- You can set each configuration file to use a different server name with the
server-name
variable,- this is super useful if you want to exploit emacsclient for a speedy startup, something I am currently working on!
- A set of environment variables with
env
,- I use this to set the
SPACEMACSDIR
variable which tells spacemacs where to look for extra customisation's.
- I use this to set the
The other Chemacs file is the ~/.emacs-profile
file where you set the default config to use.Mine is currently,
Another great benefit of Chemacs is that it also makes it super easy to version control all of your emacs configuration files, layers, snippets etc.I keep all of mine in my version controlled ~/.dotfiles
folder with their own dedicated folders.For example I have put all of my snippets (for use with yasnippet) inside a private folder~/.dotfiles/spacemacs-base-new/private/snippets
and all of my layers are inside ~/.dotfiles/spacemacs-base-new/layers
.To make my configs more portable I also set the layer path variable in the dotspacemacs/layers
function using,
and set any references to the private directory with something like,
Emacs Server/Client
The Emacs server is super useful if your config file takes a couple of seconds to load.I know that some of mine do and I hate waiting…
Luckily we can run an Emacs server with the first instance we open and then connect to this server using emacsclient
when “opening” subsequent instances.These new instances open almost instantaneously for me.
To get this working you first have to start the server.I have been struggling to get it setup with the spacemacs server config so I turn off all of the spacemacs server functionality,
and start my own by adding,
to my user-config
.
We now need to know if an Emacs server is running so that we can either connect to it or start a new Emacs instance if not.To get this working I use the following shell script.
You might have to change the EMACS
and EMACS_CLIENT
variables depending where brew linked your install.Let's give our shell script permissions,
and set an alias e
“emacs” by executing the following (assuming you use zsh),
If you use bash
then it will be,
but you should consider switching!We can now open new Emacs instances by typing e <file-name>
or simply e
into terminal.
I take this one step further as I use skhd
(a simple hotkey daemon for macOS) to open my default Emacs config (utilising emacsclient) with a simple keybinding.Creating an extra script was probably overkill but it works so I am happy.The only difference here is that no filename is passed to emacsclient
so we instead ask it to open a new frame.
Again let's give it permissions,
I then set CMD m
to run the shell script by placing the following in my ~/.config/skhd/skhdrc
file,
This will either connect to the server of a previously running instance and open a new frame or open a new Emacs instance and start a server.
Fantastic, we now have a super speedy Emacs setup that we can easily use with six different configurations.If anyone has any great ideas for improving anything I have shown here I am all ears 👂.Happy hacking..
Related
Space HTTP API lets you programmatically access any of the Space modules: Chats, Team Directory, Projects, Documents, Packages, and so on. For details on performing particular API requests, refer to the API Reference or use the HTTP API Playground (see below).
HTTP API Playground
HTTP API Playground lets you:
Explore the Space API endpoints.
Create HTTP API requests for various tools and languages.
Run the requests on behalf of Space accounts created by you.
Bfc Playground Mac Os X
To open HTTP API Playground
Enable the playground: On the navigation bar, click ... to expand the menu and choose HTTP API Playground.
On the navigation bar, click the HTTP API Playground icon.
Accessing the Space API
Bfc Playground Mac Os Catalina
There are two ways of accessing the Space API: through the OAuth 2.0 protocol (recommended) or by using a personal token. Learn more
Space API clients
Almost all of the modern programming languages/frameworks support running HTTP requests and handling responses. Using the API in this way – by 'manually constructing' API requests is complicated and not effective. The right way is using an API client – a set of libraries that hide the low-level complexity of making the requests.
Space provides two API clients: for Kotlin/Java and for .NET. When using a client, you work with high-level entities – classes that represent particular Space modules. The clients are a part of Space SDK. Learn more
Bfc Playground Mac Os Download
If you need a client for some other programming language, you can create it by using the OpenAPI Specification (formerly Swagger Specification). To download the Space OpenAPI specification, open HTTP API Playground and click OpenAPI in the top right corner.
BFC Playground Mac OS