Showing posts with label info. Show all posts
Showing posts with label info. Show all posts

Sunday, April 05, 2026

Some Monospace Fonts Available in Blogger

While editing my most recent post, I've been disappointed with the lone monospace font that's available in Blogger by default.  I'm referring to Courier.  The biggest problem with it is that it's very difficult (for me) to discern between l and 1.*  Here's what they look like in Courier: l and 1.

Fortunately, Google has made it easy for a user to add alternate fonts.  I listed below some of the monospace fonts you can choose.  

Based on the discernment between l/1, I like these the best (ranking in alphabetical order):

Font Name lower L vs. One
Fragment Mono l and 1
Google Sans Code l and 1
JetBrains Mono l and 1
Oxygen Mono l and 1
Reddit Mono l and 1
Source Code Pro l and 1
Ubuntu Mono l and 1
Ubuntu Sans Mono l and 1

The discernment is greatest with Reddit Mono; there's no way I'd mistake the lowercase L for the number 1.  However, I like Ubuntu Mono the best.  Not only is the discernment good, the character height is comparable to the height of the default font for this Blogger theme.  So I'll use this font for code listings from now on.


*That's lowercase L and the digit one in case you thought I pressed the same key twice. In fact I thought I pressed the same key twice, so I re-entered the characters very deliberately.

Courier the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Cousine the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Datatype the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Fragment Mono the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Google Sans Code the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

IBM Plex Mono the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Inconsolata the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

JetBrains Mono the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Overpass Mono the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Oxygen Mono the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Reddit Mono the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Roboto Mono the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Share Tech Mono the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Source Code Pro the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Ubuntu Mono the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Ubuntu Sans Mono the quick, red fox jumped over the brown, lazy dog. THE QUICK, RED FOX JUMPED OVER THE BROWN, LAZY DOG. 0123456789

Friday, March 06, 2026

The Perpetual Calendar -- All You Really Need, Perhaps

The first day of the year can fall on only one of the seven days of the week. This year, 2026, started on a Thursday. Last year, 2025, started on a Wednesday; 2027 will start on a Friday. 2025, Wednesday; 2026, Thursday; 2027 Friday. So why bother buying a new calendar every year? Some people don’t; they use a Perpetual Calendar 1 instead.

If there were only 364 days in a year, we could keep using the same calendar each year. The number 364 is evenly divisible by 7; there are exactly 52 weeks in that hypothetical year. But that one extra day in our year forces us to have a calendar for each day of the week.

What about leap years? They occur once every four years and have 366 days. We have to “skip over” a calendar every four years. For example, the calendar for 2028 (a leap year) will start on a Saturday. The following year will start not on Sunday but on a Monday.

Thus we need fourteen unique calendars; seven have 365 days; seven have 366, owing to the addition of February 29. This is what some refer to as “The Perpetual Calendar.”

Unfortunately, if you want to keep track of religious holidays, you’ll have to pencil in all those holidays whose schedules follow the lunar calendar 2. And this involves more than figuring out the date of the Lunar New Year (aka Chinese New Year). Dates of holidays in the Abrahamic religions 3 (sometimes referred to as Judeo-Christian religions 4) also are based on the lunar calendar. This includes Christianity 5.

So is the Perpetual Calendar the only calendar you’ll ever need? That’s for you to decide.


1 https://en.wikipedia.org/wiki/Perpetual_calendar
2 https://en.wikipedia.org/wiki/Lunar_calendar
3 https://en.wikipedia.org/wiki/Abrahamic_religions
4 The term “Judeo-Christian” ignores Islam, so I looked for a more appropriate term. See https://www.draslamabdullah.com/post/the-judeo-christian-tradition-history-paradox-and-political-construction
5 Yes even Easter requires reference to the lunar calendar. It falls on the date of the first full moon after the Vernal Equinox, roughly speaking. See: https://en.wikipedia.org/wiki/Date_of_Easter

Tuesday, October 28, 2025

Adding Moon Void of Course Events to Org-Agenda via Diary

In a previous post, I demonstrated how to create an Org file that has Moon Void of Course events. However, I found that the events don't show up in all Custom views of Org Agenda, such as when a Custom Command defines a single org file. So here's an alternate method for displaying the events in the Agenda, which I prefer. It involves adding the events to a special diary file, such as mvoc.

To make this work, you'll need to use fancy diary display, which means setting diary-display-function to diary-fancy-display. As well, evaluate and add these statements into your Emacs config / init file, as explained in the Emacs manual in the Fancy Diary Display node.1

(add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
(add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files)

Recall that we created a spreadsheet document in the first post on this topic.2 Then we modified it in a subsequent post3 to create the mvoc.org file. Now we'll modify it again so we end up with something like this in the mvoc diary file:

Oct 28, 2025 22:38 Moon Void of Course
Oct 28, 2025 22:55 Moon entering Aquarius after void

The date format shown above is the default. Alternatively, you can use a date format specified by calendar-date-style.

Here are the steps to create a diary file with Moon void of course events like the ones shown above. Again, we begin with the spreadsheet that was created in steps 1 through 4 of the initial post.

  1. Add a new sheet to the document; name it mvoc.
  2. Enter the following in cell A1. Please note that the tilde character represents a line continuation character. In fact the content should be entered without line breaks:
    1. =TEXT($moon_void_of_course_table_2025.A2,"MMM D, YYYY HH:MM") & ~
    2. " Moon void of course" & UNICHAR(13) & UNICHAR(10) & ~
    3. >TEXT($moon_void_of_course_table_2025.B2,"MMM D, YYYY HH:MM") & ~
    4. " Moon void of course entering " & $moon_void_of_course_table_2025.C2
  3. Set the row height to at least two times its default height so that you can see the result in its entirety.
  4. Save the spreadsheet in its native format (Excel as an XLSx file; LibreOffice Calc, ODS). A lot of work went into entering the formula in A1 -- it would be highly frustrating if that got lost!
  5. As before, we will pause and breathe for discussion.
    1. The reference to $moon_void_of_course_table_2025.A2 in 6.1 returns the date and time that the void begins. Similarly, $moon_void_of_course_table_2025.B2 in 6.3 returns the date and time that the void ends.
    2. The aforementioned dates and times are formatted with the TEXT worksheet function to ensure that the date is represented in MMM D, YYY format (Oct. 28, 2025, for example), followed by the time in 24-hour notation, where 23:45 is 11:45 pm. We omit the seconds because it won't show up properly in the Agenda. And anyway, seconds are omitted from the data; the event's timing probably isn't determined with enough accuracy to warrant it.
    3. In 6.2 we define the description of the start time; it will say simply, "Moon void of course." That text is terminated by a line ending for DOS/Windows; the two "UNICHAR" worksheet functions resolve to Carriage Return / Linefeed characters. You might need to specify this differently for non-Windows systems.
    4. Similarly in 6.4, we define the description of the end time, for example "Moon void of course entering Aquarius." Although instead of "Aquarius" it could be any Zodiac sign specified in Column C of the source sheet.
    5. The formula in cell A1 will create two lines in the diary file that define the start and end of the event.
  6. Starting at cell A1, fill down until all the data of the first sheet is included.
  7. Save the spreadsheet again.
  8. In step 8 of the initial post, I instructed to "Export the new sheet as a CSV file." We'll want to do that again. But this time it's necessary to pay attention to LibreOffice's "Export Text File" dialog box that precedes the Save dialog box (as we did when creating the mvoc.org file). Ensure that the Field Delimiter and String Delimiter dropdown boxes are blank as shown in Figure 1. Otherwise, each heading will be preceded by a double quote character, and the lines might end with a comma.
  9. Remove the extension from the newly-created CSV, and copy it to your home directory. Now there should be a file called mvoc; to verify, use Emacs to visit the file. The default keystrokes would be C-x C-f ~/.mvoc followed by ENTER.
  10. Open the diary file. By default the file is named diary and it's located in the home directory. Add the following in the first line: #include "mvoc" and save it.
  11. Press C-c a a to view the default agenda view. A screenshot of today's agenda is shown in Figure 2 below.
Figure 1: The LibreOffice Export Text File dialog box with Field delimiter and String delimiter fields blank
Figure 1: The LibreOffice Export Text File dialog box with Field delimiter and String delimiter fields blank


Figure 2: Agenda View for Tuesday, October 28.  It shows that Moon is void of course from 10:38pm to 10:55pm.

Please let me know if you found this useful or if you have suggestions for improvement.


1https://www.gnu.org/software/emacs/manual/html_node/emacs/Fancy-Diary-Display.html

2https://ludditegeek.blogspot.com/2025/10/add-moon-void-of-course-dates-to-google.html

3https://ludditegeek.blogspot.com/2025/10/an-org-file-to-report-when-moon-is-void.html

Tuesday, October 14, 2025

An Org File to Report When Moon is Void of Course (in 2025)

In my previous post I wrote about how to create a custom calendar in a spreadsheet and then add it to Google calendar. I used the dates and times when Moon is void of course in 2025 as an example. 1

In this post, I'll show how to add those events to an org-mode file so that they show up in the Agenda View. And while there are Lisp add-ons that create org files from ICal files, it's easier to create the org file directly, since we don't actually have an ICal file.

Begin with the spreadsheet that was created in steps 1 through 4 of the previous post. But note that the new sheet in step four will be in the format that Org can read.

Here are the next steps:

  1. Add the following content in the first 5 rows of column A. These define the recommended file-level settings for the Org file:
    1. #+STARTUP: content
    2. #+STARTUP: hidestars
    3. #+STARTUP: indent
    4. #+CATEGORY: MVoC
    5. #+FILETAGS: :MVoC:
  2. Leave row 6 blank and then enter the following in cell A7. Please note that the tilde character represents a line continuation character. In fact the content should be entered without line breaks:
    1. ="* Moon void of course entering " & ~
    2. $moon_void_of_course_table_2025.C2 & ~
    3. UNICHAR(13) & UNICHAR(10) & "<" & ~
    4. TEXT($moon_void_of_course_table_2025.A2,"YYYY-MM-DD NN HH:MM") ~
    5. & ">--<" & ~
    6. TEXT($moon_void_of_course_table_2025.B2,"YYYY-MM-DD NN HH:MM") ~
    7. & ">" & UNICHAR(13) & UNICHAR(10)
  3. Set the row height to at least three times its default height.
  4. Save the spreadsheet in its native format (Excel as an XLSx file; LibreOffice Calc, ODS). A lot of work went into entering the formula in A7 - it would be highly frustrating if that got lost!
  5. Then pause and breathe for discussion.
    1. In paragraphs 6.1 and 6.2, we have code for a heading that will say, "Moon void of course entering Aquarius." Although instead of " Aquarius" it could be any Zodiac sign specified in Column C of the source sheet.
    2. The "UNICHAR" worksheet functions in paragraphs 6.3 and 6.7 resolve to the Carriage Return / Linefeed characters when called with arguments of 13 and 10 as they are here. These two characters define line endings on Windows. It's your spreadsheet's way of pressing ENTER.
    3. The reference to $moon_void_of_course_table_2025.A2 in 6.4 returns the date and time that the void begins. Similarly, $moon_void_of_course_table_2025.B2 in 6.6 returns the date and time that the void ends.
    4. The aforementioned dates and times are formatted with the TEXT worksheet function to ensure that the date is represented in YYYY-MM-DD format (2025-10-14, for example), followed by an abbreviation for the name of the day of the week (Tue, which, by the way, is optional) 2, and finally followed by the time using the 24-hour notation, where 23:45 is 11:45 pm.
    5. The start date & time and the end date & time each are surrounded by angle brackets; the bracketed start and end elements are separated by two hyphens. Today the duration that the Moon is void of course is denoted this way:
      1. <2025-10-14 Tue 00:05>--<2025-10-14 Tue 05:47>
  6. Starting at cell A7, fill down until all the data of the first sheet is included.
  7. Save the spreadsheet again.
  8. In step 8 of the previous post, I instructed to "Export the new sheet as a CSV file." We'll want to do that again. But this time it's necessary to pay attention to LibreOffice's "Export Text File" dialog box that precedes the Save dialog box. Ensure that the Field Delimiter and String Delimiter dropdown boxes are blank as shown in Figure 1. Otherwise, each heading will be preceded by a double quote character, and the lines might end with a comma.
  9. Change the extension of the newly-created CSV file to org. Edit it with Emacs and press C-[ to add it to the Agenda File List.
  10. Press C-c a a to view the default agenda view. A screenshot of today's agenda is shown in Figure 2 below.
Figure 1: The LibreOffice Export Text File dialog box with Field delimiter and String delimiter fields blank

Figure 2: Agenda View for Tuesday, October 14.  It shows that Moon is void of course from 12:05am to 5:47am.

Please let me know if you found this useful or if you have suggestions for improvement.


1 https://ludditegeek.blogspot.com/2025/10/add-moon-void-of-course-dates-to-google.html
2 The reference for org-mode's date range timestamp format can be found here: https://orgmode.org/worg/org-syntax.html#Timestamps

Monday, October 13, 2025

Add Moon Void of Course Dates to Google Calendar

Google calendar can be configured to show the phases of the moon.  This view can be enabled in the settings. 1, 2  You can find other calendars in Settings, too, such as various religious holidays and sports.

But you can also create your own calendar and upload it as a ICAL file.  Or you can import it as a CSV file.  I used the import CSV method to add the dates and times that Moon is void of course.

What does it mean that Moon is void of course?  In astrology, Moon visits each of the twelve signs of the Zodiac.  As well, Her position may form Major Aspects with other celestial bodies.  When Moon transitions from one house of the Zodiac to the next, and fails to be in a Major Aspect, She is considered void of course.  It is believed to be a time to avoid important business, for example. 3  Thus, believers will want to have this on their calendars.  Here's how to add these times to your Google calendar.

  1. Locate a list of dates and times that Moon is Void of Course.
    1. I used the list at voidofcoursemoon.com 4
  2. Download or copy the data to a CSV text file.
  3. Import the CSV into a new spreadsheet.  I copied the data, so for me, the columns were tab-delimited.  As well, I defined the first two columns as Date/Time and the last column as Text.  Delete any lines that do not contain the desired data; I kept the first line as "Void begins: Void ends: Moon enters after void:."
  4. Create a second sheet that will link to the content in the first sheet.  You'll export this sheet as a CSV file in a format that Google calendar can read.
  5. Add these nine column headings in row 1 of the "Export Sheet"  5
    1. Subject
    2. Start Date
    3. Start Time
    4. End Date
    5. End Time
    6. All Day Event
    7. Description
    8. Location
    9. Private
  6. Enter the following content into the cells of the second row:
    1. Moon Void of Course (or whatever you'd like to see as the title of each event).
    2. =$moon_void_of_course_table_2025.A2 (with format code MM/DD/YYYY)
    3. =$moon_void_of_course_table_2025.A2 (with format code HH:MM:SS AM/PM)
    4. =$moon_void_of_course_table_2025.B2 (with format code MM/DD/YYYY)
    5. =$moon_void_of_course_table_2025.B2 (with format code HH:MM:SS AM/PM)
    6. FALSE
    7. ="Moon will enter " & $moon_void_of_course_table_2025.C2 & " after void" (or whatever you want to see in the event description).
    8. Eastern US & Canada (This is the time zone name, but put whatever you want to see for the event location).
    9. FALSE
    10. Select all nine occupied cells in row 2 (columns A through I) and fill down until all the data of the first sheet is included.
  7. Save the spreadsheet as XLSx (Excel) or ODS (LibreOffice Calc).
  8. Export the new sheet as a CSV file.
  9. Create a new Google calendar and import the CSV file into it. 5

Or you can skip all that and just use the calendar I created, which you can find here. 6  But note that it's limited to events in 2025.

Here's how it looks in my calendar; the Phases of the Moon calendar also is enabled...

I hope you find this useful.  Next, I'll describe how I got these events into Org-mode.


1 href="https://support.google.com/calendar/answer/13748650?hl=en&co=GENIE.Platform%3DDesktop

2 href="https://www.maketecheasier.com/display-alternate-calendar-google-calendar/

3 https://www.astrologybyjudithryan.com/void-of-course-moon-info

4 href="https://voidofcoursemoon.com/void-of-course-moon-2025-calendar/

5 href="https://support.google.com/calendar/answer/37118#advanced&zippy=%2Ccreate-or-edit-a-csv-file

6 href="https://drive.google.com/file/d/1WqS678DtfBI9J0MQzuAphMrURAC3kK8T/view?usp=sharing

Saturday, August 16, 2025

Define Emacs as Editor in Altap Salamander

I’ve been a devotee of the Servant Salamander / Altap Salamander file manager1 for decades. I migrated from Norton Commander (NC)2 soon after I started to work on a multi-tasking OS, Windows NT.

Likewise, I’ve been a fan of the (extensible) text editor Emacs3 for decades, having given up on Brief4, eventually. While on WinNT, I stayed with Brief a long time. But I seem to recall that Brief didn’t respond well to having one of its open files changed by another application. (This rarely happened in environments that it was designed for.)

Norton’s F4 key invoked a built-in text editor to open the selected file. The Salamander F4 key is configured to use Notepad.exe to open the selected file. But it can be configured to use other editors based on the selected file’s extension. I configure F4 to use Emacs for all text-like files.

Once I open Emacs, I like to keep that instance open for as long as possible. That’s because I build up a history usage, including:

  • Regular expression searches
  • Kill ring contents
  • On-the-fly macros

Switching to a new Emacs instance is a major interruption to my workflow.

Enter Emacs server. Emacs includes a server that can open a file in a running instance when invoked from an external application, such as Norton, ...er, Salamander. This allows a user to edit new files while maintaining the previous Emacs instance.

To use this active server process feature, you’d invoke Emacs with this command5 (all entered on a single line): C:\Path_to_Emacs_bin\emacsclientw.exe -a C:\Path_to_Emacs_bin\bin\runemacs.exe

But I find that configuring Salamander’s F4 to call the Emacs server to be difficult sometimes. In fact I spent an embarrassingly long time yesterday trying to figure it out. But it’s not at all difficult if you really understand two things:

  1. Only the Emacs executable should appear in the Custom Editor Target box; any switches go into the Arguments box before the $(Name) parameter.
  2. Emacs doesn’t like file names that contain quote marks. So if there’s a space in the path to the executable, you should specify the 8.3 name and not the path seen in Explorer.6 Please see the figure below.

I’ve heard Emacs gurus advise against installing Emacs in a location other than the default. The default on Windows currently is C:\Program Files\Emacs\emacs-30.1\. And I followed that advice unfortunately. But it caused me a great deal of grief, because it forced me to surround the paths in quotes and was incompatible with the server process. On my previous computers I had been installing Emacs in C:\Users\Public\Programs, which all users have access to and conforms to the DOS 8.3 file name format. That’s why this error is new to me.

So here’s advice from a wannabe guru:

  • Follow the instructions above to configure Salamander’s F4 to invoke Emacs if you already have Emacs and Altap Salamander installed.
  • When you install Emacs, change the installation location to ensure that the path is made up of only alpha-numeric characters and that all users will have Read and Execute permisions.


1 https://www.altap.cz/
2 https://en.wikipedia.org/wiki/Norton_Commander
3 https://www.gnu.org/software/emacs/
4 https://en.wikipedia.org/wiki/Brief_(text_editor)
5 https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html
6 Eli Zaretskii, https://lists.gnu.org/archive/html/help-emacs-windows/2014-04/msg00013.html

Wednesday, May 21, 2025

Invalid and Inconvenient File Name Characters in DOS

File names that include a space require special handling. Specifically, the name or path needs to be surrounded by quotation marks when they’re referred to.

For that reason I have an aversion to using space characters in my file names. Whenever I download a file, I find myself replacing them with underscore characters. It’s easy to do in Altap Salamander1. Open the Rename tool with Ctrl-Shift-R, put a space in the Search box, an underscore in the Replace box, press Alt-Y to uncheck “Only Once” and finally Alt-R to perform the action.

Since I’m learning Python, I thought it would be fun to write a script to do this. And while I’m at it, I should create the script so it also replaces any illegal characters in a string.

Thus I went down the rabbit hole of searching for a list of illegal characters.

According to Microsoft2, there are these: < > : " / \ | ? *. But I realized that I didn’t want a list of illegal characters; I wanted a list of characters whose use is a bad idea – inconvenient characters. To me, they are ( ) + & , ^ ! %.

So I looked at a popular thread on Stackoverflow3, where, to my chagrin, a Python script similar to mine4 was waiting for me. I enjoyed reading the answers, the comments, the opinions. But not once did anyone mention an inconvenient character except for space. And so I revved up my “expertise engine” and looked for the post editor in which to write my response.

Alas, I did not have enough “reputation points” to answer the question. And anyway, I thought the whitelist idea was the best.

But in case you’re curious, here are explanation of why these characters are inconvenient:


Parenthesis: They confuse the DOS FOR command. Create my(file).txt. Then enter the following at the cmd prompt:5

for /F %s in (my(file).txt) do echo %s

I’m using Windows 10 and verifying these examples with it. On older Windows (7, XP?) parenthesis caused a problem even if the file name is placed after the do, like this:

for %i in (2 4 6 8) do copy my(file).txt my(file)%i.txt


Plus sign: The DOS copy command can be used to concatenate two or more files into one. What’s the concatenation operator? You guessed it – it’s the plus sign. How would you concatenate my+1.txt with my+2.txt? This doesn’t work:

copy my+1.txt+my+2.txt ex2.bat

You can do this instead, which is just as bad as using spaces:

copy "my+1.txt"+"my+2.txt" ex2.bat


Ampersand: Two statements can be placed on one line when they’re separated by an ampersand. If you wanted to copy one file to another and then print the contents to the screen you could enter:

copy ch2.txt ch42.txt & type ch42.txt

But if instead of ch2.txt you had ch2&3.txt, it gets tricky. For example, enter:

copy ch2&3.txt ch42.txt & type ch42.txt

It gives up rather quickly, saying that ch2 and ch42.txt could not be found and that 3.txt is not a command. That’s because DOS interprets it as three separate commands, not two:

copy ch2

&3.txt ch42.txt

type ch42.txt


Comma: My only concern about commas is that I work with CSV data files frequently. If a file name needed to be included in such a file, the comma could be interpreted as a delimiter and screw up the layout.


Percent and Exclamation mark: These are used in batch files to reference variables or command line parameters. Consider what special handling you’ll need for a file named my%100.txt:

set x=2

copy my%100.txt my%100%x%.txt

The %1 is replaced by the first command line parameter, which is not what you want. When this is run with no parameters, the batch file tries to copy my00.txt to my002.txt.

When delayed environment variable expansion is enabled, the second statement could be written as shown below, which can be inconvenient when the file name includes an exclamation mark:

copy my%100.txt my%100!x!.txt

If the file is named my!100.txt, you can make this example work by escaping the ! that’s part of the file name. Use ^ as the escape character, but you’ll have to double it:

copy my^^%100.txt my^^%100%x%.txt

Unfortunately, there is no way (that I know of in DOS) to escape the percent character in %1.

And that brings us to caret. If you use it in a file name such as my^100.txt, you’ll need to escape it, as well.

copy my^^100.txt my^^100%x%.txt

Command prompt help lists even more characters that require quotes if they’re used in filenames. You can find this at the end of the output from cmd /h:

The completion code deals correctly with file names that contain spaces or other special characters by placing quotes around the matching path…. The special characters that require quotes are:

<space>

&()[]{}^=;!'+,`~

Note that % isn’t among them.

I hope I’ve convinced you to avoid any characters other than alphanumeric, hyphen, underscore and dot. If not, try to avoid the command prompt.


1 https://www.altap.cz/

2 https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file

3 https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names

4 The one in my head that I hadn’t yet written

5 Some code samples can be found at my incovenient_characters repo

Friday, May 16, 2025

Proofread With Read Text

One of the best pieces of letter-writing advice came from the CT DOL1.  The suggestion?  Get your word processor to read your content out loud.

Spell checking can’t catch misspellings where the word spells a different word correctly, such as “no” used in place of “on,” for example.  But when read aloud, the mistake is obvious.  It’s also great for catching cut and paste errors in which a word or phrase may be repeated or missing.

LibreOffice doesn’t “ship” with this feature.  But the extension “Read Text”2 can do the job.  After you install “Read Text” and restart LibreOffice, you can select the content you’d like to have read, and then select Tools | Add-Ons and then Read selection…  “Read Text” can also read from the clipboard, so you can use the feature with content from your email client or web browser.

But be careful -- the technique won’t draw attention to homophones3, witch yule all so have two bee vigilant too avoid.


1Connecticut Department of Labor
2https://extensions.libreoffice.org/en/extensions/show/read-text
3https://en.wikipedia.org/wiki/Homophone

Sunday, April 13, 2025

How to Stop a Running Urinal

Have you ever flushed a toilet or urinal and noticed that the valve refused to shut? I have.

The last time it happened the bathroom below the one I was in flooded.

When the maintenance guy came to the rescue, all he did was pop the cap off the flow control screw (indicated by the red arrow in the picture below) and use a screwdriver to turn it clockwise.

The urinal languished for weeks with an “OUT OF ORDER” sign on it. But one day I really had to pee and the other bathroom was closed for cleaning, so I used the out-of-order urinal knowing exactly why it was out of order. After peeing, I turned the screw counter-clockwise to allow a brief flow of water like a five-second flush, and then I turned it back to its clockwise state to stop the water.

Sometimes the hero is the guy with a screwdriver who knows what to screw.

 



Saturday, March 08, 2025

The Importance of Payroll Documents

Direct Deposit eliminates the need to deposit a paycheck into a bank account.  However, you don’t get the "pay stub" that the check would come with.  The pay stub shows the gross pay and lists the deductions (and additions, if you’re lucky) that explain how the net pay was determined.  Gross pay, net pay and deductions are shown on the pay stub for both the current pay period as well as year to date (YTD) totals.

Employees who participate in Direct Deposit can access a virtual pay stub on the payroll provider’s website.  It’s a good idea to download each pay stub from that website as soon as it’s available.  As well, any tax documents (such as the W2) and benefit summaries also should be downloaded.  Why?  Because if you're ever fired or laid off, you’ll have no time to get them before you exit – your employer will escort you directly to the exit.  Your access to the payroll site is through your computer account, which would be disabled.  The employer might set up special, limited-time access to the website, but there’s no guarantee they will do so.

Why do you need pay stubs?  Loan officers might ask to see them to verify employment and salary.  Your state’s department of labor might need them to determine eligibility for unemployment benefits.  I like to use the last pay stub of the year to estimate my tax refund – if I think I’ll get a large refund, I might be motivated to file early.

The W2 probably will be mailed to you.  But you might as well download the PDF so that you don’t have to scan in the paper copy for your records.  Some tax preparation software might be able to read the PDF file and enter the values for you.

The payroll site might have other useful documents.  One in particular is the Total Compensation Summary.  It would list the value of insurance (health, dental, life, etc.), cash bonuses, stock awards1 and tuition reimbursement (etc.) and then sum them up for you.  Unless you receive only a fixed salary and no other benefits, this can help you compare job offers against your current (or former) job.

It’s so easy to overlook or ignore pay stubs and other payroll documents.  But I hope you don’t.


1 Including the value of stock awards on this document is misleading because:

  • Companies usually award restricted stock, which cannot be sold immediately; it has to be vested first.
  • The amount of the stock award is based on the share price at the time of the grant, and that price could be much lower by the time it’s vested.  In fact it could be 0 if the company goes out of business.

Sunday, February 11, 2024

Cybersecurity for Teachers

A kind reader suggested I share this cybersecurity resource for teachers:
https://www.vpnmentor.com/blog/teachers-guide-to-cybersecurity/

Here’s a brief overview of the topics it covers:
  • How Students Put You in Danger
  • The Internet in Your Classroom
  • The Hazards of Cyberbullying
  • An Educational Solution
  • Tips and Lesson Plans for Teachers
Thank you, RM!


LudditeGeek is not associated with vpnMentor, nor received any compensation for this post.

Thursday, November 21, 2019

Open Org Mode Links With Default Windows Application

I've been using Org Mode for several years.

One Org Mode quirk is that the links in Org files always open in the Emacs editor, by default.  Click a link to Emacs_reference_card_v25.pdf on your hard drive and you might end up with a buffer that starts with this content...

%PDF-1.5
%    
3 0 obj
<<
/Length 4340      
/Filter /FlateDecode
>>
stream

I finally figured out a way to tell Emacs to open such "external" links with the default Windows application.  The multi-part solution involves first specifying all such links with a Special Prefix.  I chose "file:".  It's lame, I know, but it's also how you'd prefix an address for your web browser to open a local file.

So, for the PDF above, the link would look like this:
file:C:\emacs-25.2_64\doc\Emacs_reference_card_v25.pdf

The second part of the solution is to figure out which application on Windows you'd like to use to open the file "properly."  Rather than specifying multiple programs, such as a PDF reader for PDF files, a spreadsheet program for XLS/ODS, a word processor for DOC/ODT, etc., I decided that the single Windows command START already knows how to open all the programs on my computer.

If you were to enter the following in a command prompt, the program associated with the PDF extension would open the target file (assuming the file exists).

START C:\emacs-25.2_64\doc\Emacs_reference_card_v25.pdf

But there's a slight complication.  If the link contains a space or other delimiting character, you'll need to surround the file path with quotes like this: "C:\Path With Spaces\My PDF.pdf".  Unfortunately, START interprets quoted content as the title specification. Therefore, invoking the following would merely open a command prompt window with the title C:\Path With Spaces\My PDF.pdf

START "C:\Path With Spaces\My PDF.pdf"

So to get START to work as intended, you'd want to invoke it thusly:

START "DUMMY_TITLE" "C:\Path With Spaces\My PDF.pdf"

So having figured out the proper way to open file links, we create a function to implement it:

(defun ludditegeek-open-ext (path-to-media)
 (shell-command (concat "start \"ludditegeek-open-ext\" " path-to-media)))

Note that I chose to use the function name as the text for the title.  No matter, if all goes well, START will close the command prompt after it carries out the command -- most likely you'll never see the window.  For debugging, you could include the /WAIT switch, in which case you'll see the window, and the application will be listed in Task Manager with the title included.

Another thing to note here is that strings are defined in Lisp as characters enclosed in double-quotes.  But the title also requires double-quotes!  So I used a backslash character to escape the double-quote characters that are used to define the title.

The third part of the solution is to employ org-add-link-type to define the "file" link:

(org-add-link-type "file" 'ludditegeek-open-ext)

I call it with eval-after-load.  Here, finally, is what you can put in your .emacs:

(eval-after-load "org"
  '(progn
     ;; Create links in Org thusly:
     ;; [[file:/path/to/ppt.pptx][name of ppt]]
     ;; [[file:"/path with spaces/to/pdf.pdf"][name of pdf]]
     ;; [[file:/path/to/video.mkv][name of video]]
     (defun ludditegeek-open-ext (path-to-media)
       ;; Use Windows start command to open default application.
       ;; Note that first parameter to START is the command prompt window's title,
       ;; necessary for links that are enclosed in "", such as links with spaces.
       (shell-command (concat "start \"ludditegeek-open-ext\" " path-to-media)))
     (org-add-link-type "file" 'ludditegeek-open-ext)
     ))

I hope you find this useful!

Saturday, June 15, 2019

Plunging Into Celsius

“What is that in Celsius?” asked my European coworker on the other end of an international conference call.  We had started the call by saying how cold it was in the Northeast, -21°F exactly, so I was already asking Google to convert it for me.

“About -30°C,” I replied, not missing a beat.

That’s when I asked myself, “Why do I still use the Fahrenheit temperature scale?”  I decided to switch the units on my favorite weather app and take the plunge to Celsius.

“Isn’t switching to Celsius hard for an old person like you?” you might ask.  Well, I know that water freezes at about 0°C and boils at about 100°C.  Also, I was already accustomed to using Celsius at work, so I knew that room temperature is about 25°C, at least for a warm room.  (I allow my house to stay much cooler in Winter.)

Given these three F-C equivalents, it’s easy to deduce temperatures that lie between 32°F (0°C) and 77°F (25°C) by using ratios.  For example, 12°C, a temperature that is halfway between 0°C and 25°C, is also halfway between 32°F and 77°F, and that’s 55°F.  Likewise, the “quarter points” are 6°C (44°F) and 18°C (66°F), a typical room temperature in Winter.

Below 0°C, I rely on the fact that for every one degree change in Celsius, there is a 1.8° change in Fahrenheit.  As well, for every 2°C change, we experience a 3.6°F change.  So -4°C would be about 7°F below 32°F, or 25°F.

On the upper end of the weather temperature scale, you might get a 35°C forecast, which is 10°C higher than room temperature, or 18°F above 77°F, or 95°F, which (unfortunately) my European coworkers experienced recently.

Have you guessed that I dislike warm weather?

I’m not sure I’ll bother using Celsius in cooking or baking.  First, if I change the units on the oven, my wife will be very upset.  But then I’d also have to convert all the recipes we’ve accumulated.  I don’t see any point in that.

So will you also switch the units in your weather app from Fahrenheit to Celsius?

Thursday, March 30, 2017

A Better Way to Link to a Slide in PowerPoint

I've written about how to force Excel to use absolute paths in its links by specifying the Hyperlink Base  That works in PowerPoint, too.  Unfortunately, it interferes with PowerPoint's ability to follow internal links (links to other slides in the document).

Here's a workaround for that.  It allows you to link to another slide in the same PPT even if you have Hyperlink Base set to some location.  This was tested on PowerPoint 2003.

There are two parts to this.  The first part is to create a "bookmark" at the slide you want to link to.  Do this by creating a “Custom Slide Show”.  It's analogous to adding a bookmark in Word (but, regrettably much more complicated and less intuitive).
1.  In version 2003, choose Slide Show from the menu and then Custom Shows...
2.  Click the New... button.
3.  Enter a name for the Show in the uppermost textbox for the slide that you want to link to.  For example, you might enter "Detailed Analysis".
4.  In the left box, click on the slide that you want to "link to".  Then click the Add >> button.  (You can add multiple slides.)
5.  Click OK and then Close.

The second part creates the link to it.  When you click the link, it will run a mini slide show that consists of the target slide(s).
1.  Select some text that you'd like to make into a hyperlink, for example, "Please see the Detailed Analysis".
2.  Press Ctrl-K (or right-click on the selection and choose Hyperlink).
3.  Click "Place in this Document" on the left.
4.  In the scroll box that opens, scroll down to find "Detailed Analysis" (or whatever) under Custom Shows and click it.  (If you see only Custom Shows, click the plus sign to the left of it).
5.  Click the "Show and return" checkbox.
6. OK your way out.

The really neat thing is that the "link" persists even if slides are added before the target slide.  This is an awesome improvement over the conventional bookmark mechanism in which you're limited to linking to a slide number.  On the other hand, the hyperlink works only during a Slide Show.  There is no option to right click and open hyperlink.  So if you like to present in “edit mode” it won't work.

Also, navigation is a bit wonky.  When you click on the link, PPT will show the target slide, as expected.  But Alt-Left (the universal keystroke for "Back") doesn't return you to the previous slide.  In order to go back, you have to tell PPT to advance to the next slide (press PgDn, for example) to get back to the previous slide.  Pressing PgUp will cause PPT to ring the error bell at you.  Don't worry.  After a few dings, you'll get the hang of it.

Even if you don't need to set Hyperlink Base, you might prefer this method over the simpler method of linking to a slide.  Because if that slide's position changes, the simple link won't work the way you intended.

Let me know if you find this useful.  And if anyone knows this “GadiN” who reported the problem, please thank him or her for me and share this method.

Thursday, June 25, 2015

Undo the Default App Selection in Android

Here's the scenario....  Your Android device presents you with a choice of apps to complete an action with.  You're supposed to select the app and then select either "Just Once" or "Always."  Either way the app opens to complete the action.

If you selected "Just Once" you'll have to choose again the next time you need to complete that same action.  That might seem annoying.  But what if it's the wrong choice?  If you choose "Always" you won't get to choose again, at least not easily.  And if the app cannot complete the action successfully, what then?

According to many lame blog posts and webzine articles, it's "easy" to change your mind after choosing "Always."  They say to just press the app's "Clear Defaults" button.  Here's one such article on AndroidCentral.

Fortunately AndroidCentral is swarming with brilliant users who are much more sophisticated than the folks who write the articles.  I say "fortunately" because when I needed to change the option of using Photos for downloading an image file attachment, the article's advice was useless because Photos' "Clear Defaults" button was greyed out.

A user called Siddhartha Gupta suggested that to remove Photos as the default app, it's necessary to change the setting for Google+.  That didn't work, either.

A user called ChromeJob pointed out that there's "a 'reset app preferences' in the action overflow button. This appears to reset ALL default app choices at once."  If only it were that easy for me.  It didn't work.

The thing that finally worked for me was to revert to the factory version of Photos by pressing the "Uninstall Updates" button.  After doing that, I was presented with a choice of two other apps to use.  The idea to alter Photos' version came to me after reading a comment byGrillMouster who stated that "when any of those apps receive an update the ["Just Once" / "Always"] dialog will pop up again, even if you had previously set an app as the default."

If you want the very gory details of why Photos didn't work, please read on to find out what I was trying to do.

I had used Firefox to log in to an Exchange Server using an Outlook Web Access (OWA) client hosted on a web page.  I then opened an e-mail that had a JPG file attached to it.  When I attempted to download the attachment, OWA again wanted me to provide my username and password.  Photos was unable to handle that request (and neither was Firefox).  It was only by completing the action with ES File Explorer File Manager that I found out about the need to provide username and password.  I've included this detail in case there are others who are having trouble downloading attachments with OWA.

Saturday, February 01, 2014

Disable Outlook's Junk Email Filters

After upgrading to Outlook 2010 over a year ago, it became apparent that its junk email filter continued to work even after we disabled it.

It took so long for me to notice because I use Popfile to categorize the email I download from my ISP's POP3 server.  Popfile would catch the most obvious spam before the Outlook junk email would process it.

But occasionally a message that Popfile marked as valid would end up in the Deleted Items folder.  Outlook's occasional false positive would make me wonder what was going on, but it happened so rarely that it was easier just to check for these false positives than to research the issue.  Besides, the corporate bulk mail filter running on the Exchange serve would stash things into the Junk Email folder, and I needed to check for false positives from that filter.

But then there was an incident that triggered an intra-departmental1 outcry about the issue.  It was the day that several messages from our Content Management System got flagged by Junk Email and then deleted, causing folks not to notice updates on a few project files.

We all dutifully set Outlook's Junk Email filter to Disabled.  But I continued to see valid messages from my ISP placed into Deleted Items.  Recently I obtained a few spare moments2 and quickly found a solution to the issue.  It was my favorite Outlook/Exchange website that I landed on.  Here's the link:

http://www.slipstick.com/outlook/how-to-disable-outlooks-junk-email-filter/

The text says to change the value in a registry key, but in my case, the key didn't exist, so I created it, first.

Only time will tell whether this works.  I will know for sure only if it doesn't.  I suppose I can find an old message that triggered a false positive and send it to myself, but the header of that message would be different from the original header.


1 The emphasis is on the part of the word that contains "mental".

2 A good way to obtain spare moments is to schedule a meeting right after another meeting, so that if the other meeting runs late, the participants will be milling around outside the meeting room.  After a while, you get a sense of which meetings will run the longest based on the topic and especially on whether certain coworkers will be in them.  Some meetings can run so late that the folks who mill around will disperse and take an additional five minutes to reassemble, assuming they haven't gone off to lunch or embarked on an early vacation or retirement.

Friday, October 18, 2013

Excel Hyperlinks -- Relative vs. Absolute Path

I rarely insert hyperlinks into an Excel spreadsheet.  So every time I do, I get burned by Excel's predilection for turning Absolute paths into Relative paths.

Here's the scenario...

I'll use Excel to create a flat file database on my local hard drive.  I'll include links to the file server on the network using UNC paths, such as \\File-Server\Share-Name\Path2File\MyFile.ext.  (The Ctrl-k keystroke is really handy for creating hyperlinks, BTW.)

After building the table by adding fields in columns, adding formatting, and entering a few records in rows for testing, I'll consider the database to be production ready.  At this point I'll upload it to the same file server that my links point to.

The next time a user opens the network version of that spreadsheet, Excel will convert those carefully-entered absolute links to relative links.  So if the spreadsheet resides in \\File-Server\NewShare\Reports\Databases\LG.xls, the links to MyFile.ext turn into this: ..\..\..\Share-Name\Path2File\MyFile.ext.  They work just fine while the spreadsheet remains in that location.

But suppose the user saves the database and then e-mails it someone else in the organization, or copies it to his or her local hard drive.  The links are broken.  Furthermore, there's no easy way to fix them.  Search and Replace (Ctrl-h) won't find the ..\..\..\ in the hyperlinks.  You'll have to either fix them manually or write a program to do it.  And then the same thing could happen again, anyway.

But there is (thankfully) a trick to keep Excel from bastardizing your carefully designed links.  But it's a preventive measure -- you have to know about the trick before you get stuck with the link conversion.

The trick is to open the File Properties dialog.  Choose the Summary tab and enter C:\ in the text box next to the label that reads "Hyperlink base:".  Be sure to OK your way out and save.  These instructions are for Excel 2000 and 2003.  Later versions probably have the same properties dialog, but the way to open it might be different.

Really, it's best to do this before entering any hyperlinks.  Ideally, Excel would have an Option for this.  But alas, all I could find was a checkbox to enable Excel to prompt for workbook properties.

Hopefully, by writing this post, I've seared this information into my brain so that the next time I'm tempted to enter a hyperlink, I'll remember to set this property.

Hmmm, it just occurred to me to code this property using VBA....

Wednesday, October 29, 2008

Tainted Chocolate For a Scary Halloween

The melamine that was found in tainted milk could be in the chocolate that's passed out this Halloween.

Please watch this "Candy Product Review 2008 of Potentially MELAMINE Tainted Treats, A SERIOUS Warning By Mike Mozart of JeepersMedia on You Tube" and warn others.

And consider giving out stickers, yourself.

Thank you.

Sunday, May 25, 2008

Driving to Optimize Fuel Economy

In my area, gas prices have jumped beyond $4.00 per gallon over the last couple of weeks. I ranted before about how traffic lights contribute to decreased fuel economy. But I didn't mention that driving technique can dramatically influence fuel economy.

An extreme type of driving that maximizes fuel economy is called Hypermiling. Generally the idea is to minimize acceleration and braking. Unless you're going down a steep hill, acceleration requires more gasoline than just maintaining speed. And braking converts all your car's motion (which came from gasoline) into heat energy. So essentially, braking is like throwing away gasoline.

If this is the kind of topic that gives you goosebumps, you might be interested in the forums at CleanMPG, especially Wayne Gerdes' post "Beating the EPA - The Why’s and how to Hypermile".

And rather than boycotting gasoline for one day, folks should either not drive on that day, or at least drive more efficiently. With the subsequent drop in demand, gas prices would relax.

Tuesday, April 15, 2008

Autism Awareness

April is Autism Awareness Month here in USA. Would you be able to recognize the symptoms of autism if you saw them? Probably not.

The latest estimate of the prevalence of autism is that 1 in 150 people in the USA have been diagnosed with an Autism Spectrum Disorder (ASD), which is also known as Pervasive Developmental Disorder (PDD).

If you're in the fields of engineering, computer science, physics or math, the chances are even higher that you, your children, your coworkers or their children could be diagnosed with this disorder. And you should check out http://firstsigns.org/, which is dedicated to the early identification and intervention of children with developmental delays and disorders, including Autism Spectrum Disorders.

The diagnostic criteria for ASD in children concern development and ability in the areas of social interaction, communication and play. Please see "Diagnosis and Epidemiology of Autism Spectrum Disorders," by Lee Tidmarsh, MD, Fred R Volkmar, MD.

Early detection of an ASD is crucial because when interventions are tried at an early age (say at 3 to 5 years of age), they seem to be more effective than when tried later on.

Those who have an ASD and who can communicate say that they don't want to be cured; they just want to be accepted. Thus, it's not they who have the problem, it is society. Nevertheless, interventions can make things easier for children and the autistic adults they grow in to.

What kinds of interventions can reduce the symptoms of an ASD? A change in diet -- avoiding wheat and dairy productions, for example -- can help those with Leaky Gut Syndrome, which can manifest as symptoms of ASD. Another effective, diet-related approach is supplementation with mega doses of vitamin B6, or its active co-enzyme, P5P. Play therapy or Applied Behavioral Analysis (ABA) has been proven to help. In some cases, mercury detoxification may help. There are many more interventions for a parent to choose from. Then there are interventions aimed at easing the secondary symptoms that accompany ASD such as Obsessive Compulsive Disorder and Depression.

Scientists can spend entire careers looking for signs of intelligent life in the Universe. Meanwhile, medical researchers have overlooked signs of intelligence in people with autism. They assume that people who can't talk and who respond differently to stimuli must be lacking in intelligence.

If you don't believe me, consider the amazing website, Getting the Truth Out, which was originally written in response to an objectionable Autism Awareness fundraising campaign called "Getting the Word Out." Be sure to follow the presentation completely to the end.

If you suspect that you or a loved one is struggling with an ASD, visit the Online Asperger Syndrome Information & Support (OASIS). (Asperger Syndrome is an ASD, and is sometimes referred to as High-Functioning Autism.) As its name suggests, you can get a great deal of information from the site. You can find most of the support by clicking on the Message Boards menu choice and registering for the "OASIS: Asperger Syndrome Forum".