The ideal Micro Four Thirds lens setup
A few years ago, after buying my flat, I had very little money. I realised I could get some money in by selling off a few lenses. Since the lens I used the most was the 20 mm f/1.7 pancake, I sold off every other lens and got in enough money to get through the tight times. I had originally bought most of my lenses used, so I got back more or less what I invested in them in the first place.
The 20 mm served me well for the following two years as my only lens. (Matti Sulanto brags about his 9 months with only a 35 mm lens, but that is nothing compared to two yeas with my 40 equivalent.) The wide standard focal length is probably the most versatile focal length you can have if you only have one prime lens, so that was perfect. In addition, the 20 mm pancake is small enough that my "large" Panasonic Lumix GX8 (which is still a lot thinner and lighter, but not smaller in width and height than any of the small full frame cameras that are in vogue now) fits into jacket pockets which means I can bring a camera that is ergonomic enough to fit well in my hand and with good enough composition tools like the tilting EVF around as my daily carry camera. The f/1.7 aperture makes it a good lens for any lighting condition. The advantage of MFT when it comes to depth of field (since longer is almost always better) means that I can shoot at f/1.7 after sunset or indoors on low ISOs and still have the same depth of field as on a f/3.5 lens of an equivalent full frame focal length (40 mm). The disadvantage of more noise on higher ISOs on smaller sensors like APSC, MFT and 1 inch isn't real if you shoot fast enough lenses, but you get the advantage of the longer depth of field even in low light. The 20 mm has somewhat slow autofocus, so for video, I would use manual focus. I also experimented with manual focus for photography.
The 20 mm is in my opinion the most versatile and practical lens in the whole MFT system. I have used it for landscape, street, indoor events including video, close-up (with Ex.tele-conv, it becomes a 28 mm with a relatively larger reproduction ratio), environmental portraits, head shots and upper body portraits. I just wish it was weather sealed so I could confidently leave it on my camera during a blizzard. In other words, the 20 mm pancake will usually be the main lens in any lens set for me. Now that I have a bit more money again, I have felt that occasionally, it would be nice to have something wider or something longer. I still use the 20 mm for 90 % of my pictures, but since I can afford something more specialised for occasional use, I have bought a few "new" used lenses. For a confirmation ceremony in a large hall, I bought Sigma 60 f/2.8. I was very tempted by the Olympus 75 f/1.8, but it is a lot more expensive, larger and even though f/1.8 would be nice, f/2.8 is still fast enough to make decent images. The Sigma is also small enough that I could keep it in my suit pocket when I used the 20 mm before and after the ceremony and easily switch over once inside. The 20 mm has taught me the value of small and light lenses.
I also missed the Lumix G 42.5 f/1.7 which is the best portrait and close up lens in the medium telephoto range that isn't larger than it needs to be since it is actually an APSC lens (like the Sigma 56 f/1.4 which is a really great lens). The combination of stabilisation, better sharpness and close focus abilities makes it a better choice than the Olympus 45 f/1.8 in my opinion. I have used it a lot for close-up in the past and also for the occasional portrait. I also missed having something wider occasionally, so when I saw a GM1 with a Lumix G 14 mm f/2.5 and a 12-32 for a decent price, that was a no brainer. I like the idea of the GM1 and my first MFT camera was the GM5, but both of those cameras are too unergonomic and fiddly in practical use for me. The lack of stabilisation is also a major drawback. The GX8 is so much more comfortable, and again, with the 20 mm or the 14 mm, it is small enough to fit in a jacket pocket which means the GM1's only advantage is lighter weight.
I also bought the TTartisan 23 mm f/1.4 manual focus prime on a whim. My idea was that the slightly longer focal length would produce more winners for me since it would force me to think more about my composition. I owned the Panasonic Leica 25 f/1.4 in the past and even if it often felt too narrow, it also produced more winners than the zooms and primes I had owned before it. I actually came to it from the 20 mm pancake which at that time annoyed me because of it slightly slow auto-focus. This was also earlier in my photography journey. This time around, the 23 felt a bit restrictive coming from the 20 mm, but it did not actually help me produce anything I couldn't make with the 20. Even if it is rather small, it also surprised me by feeling heavy. Maybe the balance is towards the front of the lens or something, because on paper, it really isn't heavy at all. What the lens brings to the table is better manual focusing than the 20 mm, ideal for hyperfocal focusing for street or landscape.
I still haven't written anything about the ideal setup. Up to this point, I did not really think in terms of a set of lenses, more in terms of what did I feel I wanted, needed or missed. I started thinking more about a versatile set for my uses at this point. There are many lenses I am curious about, but which focal lengths, apertures and features do I actually need? I am a hobby photographer that mainly shoot landscapes, (rural) street, travel and the very occasional portrait. I live in southern Norway, close to the coast, which means wind, rain, snow, wave splashes, cold or a combination of these often occur. My GX8 camera is weather-sealed, but unfortunately, most of the small and light primes in the MFT system are not. On the other hand, most of the time, even in light rain or snow, being a bit careful and maybe keeping a hand on top of the lens is enough to keep the smaller 14 and 20 pancakes and the 42.5 safe. I have used these lenses a lot in all kinds of weather without any trouble, but I would feel more comfortable if they were weather-sealed.
When I started thinking more in terms of a set of lenses, I did a lot of thinking about what I actually need. I usually need a wide standard lens like the 20 mm. It is an ideal focal length as a walk-around lens. For travelling, maybe a medium telephoto like the Olympus or Youngnuo 17 would be better for large buildings and getting more context, but for most other things, a wide standard is better. I am not a fan of the exaggerated perspective a wider wide-angle lens produces unless it is used deliberately as part of the aesthetic, so for me something wider than 17 (35 equivalent) is too wide for everyday photography. I prefer the more natural perspective of a wide standard. I did use the Sigma 19 mm f/2.8 for a while some years ago and it was a very good lens, but I often felt that it exaggerated the perspective just a bit more than I like. That sensation disappeared when I went back to the 20 mm again. So even if the 20 mm can sometimes feel a bit narrow in very narrow streets when travelling, I think it is the main lens for me in any lens setup. When I could have only one lens, the 20 mm f/1.7 was that lens. Even when I can have more lenses, I keep the 20 on the camera and only occasionally use other lenses. It isn't perfect, but it is the best walk-around lens for me.
Occasionally, I want to exaggerate perspective or I am in a very tight place like an alley or in a small room. Then something wider would be useful. I already own the 14 mm f/2.5 which is a good lens. Robin Wong complained about auto-focus speed, but maybe that was a problem with the mark I on Olympus cameras. I have owned both the mark I and the mark II and I have never experienced slow autofocus with the GX8 (unlike the 20 mm pancake which is more like a full frame DSLR lens than a fast MFT lens in auto focus speed). It is also small and light which means it fits well into any lens set. It is sharp enough and it is faster than most zooms although the 15 f/1.7 is faster and with a bit nicer rendering, but that lens is also larger, heavier and more expensive. The 14 is much better than its reputation and extremely practical since it is the smallest and lightest autofocusing lens in the MFT system.
For landscapes, the occasional animal or bird photo or for portraits I sometimes need a longer lens. The 20 is good for portraits, but for headshots or upper body shots, you get a bit too much into the face of the subject which makes the proportions of the person seem strange in the resulting image. On the other hand, a lot of people shoot portraits on wide angle lenses these days and vlogging and video conferencing has made us used to seeing the human face with strange proportions. I usually shoot environmental portraits anyway, so for me, a longer lens is actually less about portraits and more about landscapes, birds or animals. I don't shoot any sport, but when Tour of Norway cycled by a few years ago, I made an attempt with the Sigma 56 f/1.4 that I owned at the time and got some decent shots. I don't usually shoot events either, but occasionally, I am at an outdoor concert or the Norwegian National Day celebrations or a confirmation or wedding and it is nice to have a lens that could work in such a situation.
For landscapes, weather is a factor. Ideally, I would have a lens I could use during a blizzard in -20 Celsius by the coast with a lot of humidity. Even though I own the 42.5 f/1.7, I don't use it that much because it feels a bit on the short side for landscapes, animals at a distance (or small) and events. The Sigma 60 f/2.8 is more ideal for those scenarios, except that it isn't weather sealed. I don't often shoot in low light at events or outdoors for landscapes. When I bought the Sigma 60, I also thought about the 12-60 f/2.8-4, but felt that f/4 was a bit too slow. The Olympus 75 has a better focal length and faster aperture than the other alternatives and back when I owned the Sigma 56, I frequently used it for landscapes. I don't shoot birds or animals often enough that I need a dedicated telephoto zoom like the 35-100 f/2.8 or the Olympus 40 - 150 f/2.8. It is too large and expensive for something I only occasionally do and 60 is long enough for my needs.
I am still not 100% certain about the telephoto side, but I did buy the 12-60 f/2.8-4 since it gives me weather sealing which is nice in a blizzard. Since it covers the whole focal range I need, I can confidently go out in bad weather during winter with it on my camera. I can also use it as the second lens together with the 20 mm when travelling. Especially when travelling with other people and not knowing what to expect, a superish zoom can be useful. It is not super enough to loose its optical excellence or aperture speed like the 14-140 f/3.5-5.6, but it is super enough to cover all my needs with good enough speed. Maybe I will invest in the Olympus 75 f/1.8 if I find myself shooting a lot of low light events, but as an occasional telephoto, the 12-60 at f/4 on the long end is good enough. It is larger and heavier which is the disadvantage of a zoom over primes and it is slower, but I can use it during winter without worrying. An advantage of the 12-60 is that is focuses closely and even though the spec sheet says 0.3 x magnification and the 42.5 f/1.7 spec sheet says 0.4 x, in reality, I get more magnification with the 12-60. Maybe 0.3x is at the wide end and they forgot the write the magnification at the long end?

My ideals are to have as few lenses as possible and as small and light as possible, but at the same time have all the lenses I need. I will sell the TTartisans 23 mm even if it is a good lens that is better for manual focus use than the 20 mm, but since I have the 20 mm, it doesn't make sense for me to also have the 23. I will probably also sell the 42.5 f/1.7 since I don't use it as much as I did in the past. For close-up, the 12-60 is better. If I did a lot of portraits, especially in lower light, I would keep the 42.5, but I don't. The 42.5 is smaller, lighter and faster in aperture and makes a nice three prime set with the 14 and 20, so I hesitate a bit to sell it, but I think the 12 - 60, 14 and 20 is all I really need. The 60 f/2.8 is a stop faster than the 12-60 at 60, but that usually does not matter much for me since I seldom shoot indoor events, so I will sell that lens as well.
I have been thinking about and trying out a lot of different MFT lenses over the years. In the past I was more concerned with getting the very best lenses of each type, but over time, I have come to appreciate the value of compromising on some aspects, like auto-focus speed with the 20 mm or aperture size on the long side of the 12-60 or on the 14 to gain practical advantages like small size and light weight. A camera and lens combination that you can keep in a jacket pocket like the GX8 + 20 mm pancake is more valuable than something like the OM System 20 mm f/1.4 which technically is a better lens and even brings weather sealing to the table, but is too large and heavy to be kept on the camera in a jacket pocket. Pocketability is the difference between having a camera and not having it and that is more important to me than having slightly better low light capabilities or weather sealing most days. On the days where weather sealing matters, I can bring the camera in a small camera bag with the 12-60 mounted so I don't have to mount it in bad weather. On those days, going out with a camera is a very conscious thing, but on most other days, it is better to just have it always be there with a small and light lens, even if it isn't weather sealed. The 14 mm is also not the best wide angle lens there is. The Olympus 12 mm f/2, the Panasonic Leica 15 mm f/1.7 or the Panasonic Leica 12 mm f/1.2 are all sharper lenses with faster apertures, but the 14 mm is small, light and good enough optically with a not very fast, but still quite fast aperture. The 12 - 60 isn't an f/2.8 or f/1.7 zoom, but what you loose in speed on the long end, you gain in a wider focal range. For a travel trip, it is a good allrounder at times when range might be more useful than small size. (Not that it is a large lens, but compared to the 20 mm and 14 mm it is.) In bad weather during winter, it is ideal since there is no need to change lenses. I think these three lenses will be my lens setup going forward.
Fix text encoding and line endings in Emacs on Windows
Windows uses different text encodings based on locale while POSIX-compliant OSes like GNU/Linux, MacOS or *BSD use UTF-8. Windows also uses its own line endings (CRLF). By default, Emacs on Windows uses ISO-8859-1 (ISO-Latin) and CRLF (Windows line endings). Since I push and pull files between different machines with git and most of those machines run GNU/Linux, I need files created on Windows to not use its own text encoding and line endings. Below are the settings I have found to force Emacs to use UTF-8 with Unix (LF) line endings.
(prefer-coding-system 'utf-8-unix) (set-default-coding-systems 'utf-8-unix) (set-language-environment 'utf-8) (set-selection-coding-system 'utf-8-unix) (setq-default coding-system-for-write 'utf-8-unix) (setq-default buffer-file-coding-system 'utf-8-unix)
In addition to these settings within Emacs, since I use git, I don't want it to convert line endings in files I pull down with it from LF to CRLF on Windows, which it does by default when used on Windows. To change this behaviour I also had to run git config --global core.autocrlf false
in PowerShell. I tried the per-system way first with --system
, but that did not work, not even after granting myself administrator rights. But the per-user global setting you see above worked.
Even after making these settings to Emacs, when I interact with files through Powershell in Shell mode in Emacs, file names outside the ASCII range are garbled. Even if the settings above sets Emacs to use UTF-8, PowerShell uses the UTF-16 text encoding. Since it is unavoidable for me when I make teaching materials in Norwegian Bokmål to use letters outside the ASCII range, this is rather annoying.
There is a Beta feature in Windows 11 to switch to UTF-8 as the default text encoding system for the whole OS. I did not dare to try this, especially since my machine is managed through my organisation, but I hope Microsoft will improve the lives of Windows users, especially developers, sysopers and (cloud) admins by getting this feature out of Beta in the not too distant future.
Python Mode in Emacs on Windows
Python mode in Emacs on GNU/Linux works out of the box with no setup if you have Python installed on your system. However, on Windows, Python mode does not work even if Python is installed. It does not help to add the directory Python is in to the exec-path or add it to the $PATH environment variable either. After trying those two things, I looked for a useful variable to set the path to the python executable and tried a couple of promising ones before finding the correct solution. Below you see the line you need to add to your emacs config to get it to work.
(setq python-shell-interpreter "c:/Python312/python.exe")
Another thing I discovered today is that Windows 11 has a Beta feature to switch to UTF-8 text encoding. I hope Microsoft prioritises this feature and switch to Unix line endings (LF) at the same time. UTF-8 and Unix line endings would make Windows less painful to use for developers, sysops and (cloud) admins.
PowerShell in Emacs Shell Mode on Windows
I recently decided to give native Emacs on Windows another go. Since I use Windows for some of the classes I teach, I have tried to like WSL2. Microsoft implements Wayland in a very non-standard way that does not really work, and even after applying a fix (not from Microsoft even if they have known for months that their default distro doesn't work with WSLg, but from users in the GitHub bug report), I had trouble with the Emacs window freezing after having locked my screen and unlocked it. I do this at every break during the day, and there are 7 of those every day, so this has to work. So I thought I would try to go native again with the Windows version of Emacs and just use what I need right now and gradually fix or work around the issues that needs fixing. For now, I need Shell Mode to work, so I have looked at that first.
By default, you get cmd.exe in Shell mode on Windows. I had some trouble finding good documentation of how to set it up with PowerShell. Some suggest just setting PowerShell to explicit-shell-file-name, but that only partially worked since it gave me an error that PowerShell was invoked with a wrong argument. A lot of people pointed to someone on the Microsoft blogs that set up PowerShell in Shell mode, but in a way that removed the prompt. He had made an Elisp workaround to get the prompt back, but it seemed like there should be an easier way. The trouble is that comint mode, the mode shell mode is built on, sends -i by default to the shells it interacts with as an argument. I tried a couple of things and it turns out the solution is really simple.
(use-package shell :config (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) (add-to-list 'comint-output-filter-functions 'ansi-color-process-output) (add-hook 'comint-output-filter-functions 'comint-osc-process-output) (setq explicit-shell-file-name "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe") (setq explicit-powershell.exe-args '("")) (add-hook 'shell-mode-hook (lambda() (company-mode 0))))
In the code block above, I turn on ansi-color since PowerShell can work with those. I tell Emacs to run PowerShell and give it the arguments "" (ie, nothing) which remove the default -i argument, but adds nothing else. And now I have PowerShell in Shell mode. The last line is useful to me because I have turned on company globally, but I don't want it in shell mode.
Insecure sudo settings in RaspberryPi OS
I have a RaspberryPi 5. Since Debian does not supply an image for use with the RPi5 and Ubuntu Server comes with a lot of software I do not want preinstalled, I use RaspberryPi OS Lite and run my own script to set it up with Sway and the other packages I like. It is very similar to Debian even if it adds an extra repo, some settings that are different and a few programs for changing settings, both directly related to the hardware and some that replicate standard tools like localectl, passwd, systemctl enable etc in a more convenient TUI.
For a while, I have wondered why I only needed to write my password once when using sudo and then never again. It means that if you are logged in as your user, you have all the privileges of root if you just once wrote your password. It is convenient, but it is like logging in with the root user which is not a very good idea.
I had a look at visudo, the command to change the settings for sudo and everything looked quite normal. Except that in the end, the file sources any file in the directory /etc/sudoers.d/
. So naturally, I had a look in that directory. There are some files there that cause problems. The first one is 010_pi-nopasswd
which sets up sudo to never time out the sudo password typed by the first user created on the system.
Another is that sudo isn't per shell, terminal or tty, but global. This is in the file /etc/sudoers.d/010_global_tty
. Usually, you would have to type your password to get sudo privileges in each terminal, shell or tty, but on RaspberryPi OS, sudo accepts the password I typed once in tty1 in every shell, terminal or tty.
Finally, there is a file called 010_proxy
which accepts sudo from any proxy logged in as the first user, ie since I typed a password once in tty1, any proxy logged in as me doesn't have to type a password ever again to escalate privileges with sudo. Not the best setting either.
To mitigate the problem, you should make sure you are added to the sudo group by typing sudo usermod -aG sudo username
in a terminal and press return, but replace username with your actual username. This is because we are going to delete the file that lets your users type your sudo password only once, but still want your user to be able to use sudo. The sudoers file on RaspberryPi OS is set up so users in the sudo group can use sudo.
Then you should write sudo rm /etc/sudoers.d/010_pi-nopasswd
and return to delete the file that gives your user the ability to only type your password once. Continue with sudo rm /etc/sudoers.d/010_global-tty
and return to remove the settings that doesn't ask for a new password in every tty, terminal or shell. Go on with sudo rm /etc/sudoers.d/010_proxy
and return to avoid proxies not having to write a password. Finally, write sudo visudo
and look for a line that says Defaults env_reset
. Move your cursor to the end of that line with the cursor keys and hit return to get a new line. Write Defaults timestamp_timeout=5
to get a five minute timeout for sudo. Then press ctrl-o, return when it asks for a filename to save to and then ctrl-x to quit Nano. (RaspberryPi OS does not respect your settings for $EDITOR and will use Nano.)
My installscript for Debian checks if I am on RaspberryPi OS and does the things I have listed above, except add the timeout in the sudoers file. It is supposed to be edited only with visudo, so I tell the user to do this manually in the end of my script. (It also checks if the user is on Debian or RaspberryPi OS and installs Firefox on RaspberryPi OS and Firefox-ESR (Extended Support Releas) on Debian. (I tried installing Firefox from Debian Unstable first, but there were dpendency problems with that approach.) Emacs is installed from Backports to get then newest one backported to work with Debian Stable, whether you are on RaspberryPi OS or Debian. In the past, I used the Emacs snap, but Emacs from backports is faster and I trust the Debian maintainers more than the proprietary Snap Store. Since Debian has a stricter interpretation of what Free Software is than the FSF, I also have to install the non-free repos to install Emacs documentation.)