なんだこれは

はてなダイアリーから移転しました。

emacs for Emacs.app on macOS

emacs for Emacs.app on macOS

~/bin/emacs for Emacs.app on macOS

ほかにこんなことでひっかかる人はいないと思うがメモ。

macOSEmacsEmacs.app である。Emacs.app/Contents/MacOS/Emacs が実体の bundle 構造というフォルダ構成になっている。macOS では open -a Emacsで起動することができるが、emacsでは起動できない。

これが問題になることは非常に少ないのだけど、たまにある。例として OCamlEmacsの開発環境を構築するときがある。このようなコマンドを実行すると失敗する。

opam install user-setup tuareg ocamlformat merlin

これを実行するとどうなるか emacs --version で失敗してしまう。

The following actions will be performed:
  ∗ install conf-emacs 1     [required by tuareg]
  ∗ install tuareg     3.0.1
  ∗ install user-setup 0.7
===== ∗ 3 =====
Do you want to continue? [Y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
⬇ retrieved user-setup.0.7  (cached)
[ERROR] The compilation of conf-emacs.1 failed at "emacs --version".
⬇ retrieved tuareg.3.0.1  (https://opam.ocaml.org/cache)

#=== ERROR while compiling conf-emacs.1 =======================================#
# context     2.1.3 | macos/x86_64 | ocaml-base-compiler.4.13.1 | https://opam.ocaml.org#685eb4ef
# path        ~/.opam/4.13.1/.opam-switch/build/conf-emacs.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build emacs --version
# exit-code   71
# env-file    ~/.opam/log/conf-emacs-98834-41a416.env
# output-file ~/.opam/log/conf-emacs-98834-41a416.out
### output ###
# sandbox-exec: execvp() of 'emacs' failed: No such file or directory



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
┌─ The following actions failed
│ λ build conf-emacs 1
└─

仕方がないので ~/bin/emacs を仕込むことにした。

#!/bin/bash
if [ -r /Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs ] ; then
    /Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs $@
elif [ -r /Applications/Emacs.app/Contents/MacOS/Emacs ] ; then
    /Applications/Emacs.app/Contents/MacOS/Emacs $@
elif [ -r /Applications/Emacs27.app/Contents/MacOS/Emacs ] ; then
    /Applications/Emacs27.app/Contents/MacOS/Emacs $@
else
    vim $@
fi

Emacs with nativecomp emits an error on macOS 13.0.0

Emacs with nativecomp emits an error on macOS 13.0.0

Emacs with native comp emits an error on macOS 13.0.0

macOS 13.0.0 に無事アップグレードできたので、Emacs 29.0.50 を起動したらエラーがでて困ってしまった。こういったエラーがでるのだ。

ld: warning: -undefined dynamic_lookup may not work with chained fixups

ググってみたら、コンパイラがかわったためらしい。これが正式な対策らしい。

https://github.com/emacs-mirror/emacs/commit/97b928ce09d6034ebcb541fb548e5d4862302add

一番安易な方法として、Emacs 29.0.50 のネィティブコンパイルを落したバージョンを使うことにした。

possibly maybel...

possibly maybel...

ClamAV 1.0.0 Release candiate available

https://blog.clamav.net/2022/10/clamav-100-release-candidate-now.html

ClamAV というフリーのアンチウィルスソフトがついに バージョン 1.0.0 RC に到達したとのこと。それまでは 0.100.x のようなバージョンになっていたのでもう1.0.0 にはいかないのかなと個人的には考えていた。

Linux intel 486 プロセッサのサポートを止めるって

https://www.phoronix.com/news/Intel-i486-Linux-Possible-Drop

Linus が 486 プロセッサのサポートをとめるといいだしたとのこと。まだサポートされていたんだ。すごいな。

Is LibreOffice_7.4.2_MacOS_x86-64_langpack_ja.dmg broken ?

Is LibreOffice_7.4.2_MacOS_x86-64_langpack_ja.dmg broken ?

  • LibreOffice の 7.4.2 がリリースされたときいて intel macOS でやってみた。

LibreOffice の 7.4.2 がリリースされたときいたので intel macOS でインストールしてみたらうまくいかなかった。

正確には、 LibreOffice 7.4.2 を intel Macにインストールすることはできた。問題は翻訳されたユーザーインターフェースの日本語の dmg ファイルがうまくいかない。

LibreOffice_7.4.2_MacOS_x86-64_langpack_ja.dmg をダウンロードしてみるもののダブルクリックするとmacOSが「接続したディスクは、このコンピュータで読み取れないディスクでした。」と表示してしまう。

このときの選択肢は3つ。

  1. 取り出す
  2. 無視
  3. 初期化...

どれを得らんでもマウントされないので、インターフェースを日本語にできない。

以前の 7.3 系の翻訳されたユーザーインターフェースの日本語のdmgファイルは開くことができたので、7.4.2 の方が間違っているんじゃないのかなと思っている。

とりあえずバグ報告した。そして英語インターフェースの LibreOffice が残された。

iOS16 and macOS Monterey 12.6

iOS 16 and macOS Monterey 12.6

macOS 12.6 へ更新

intel macmac Book には更新が来ていたので、適用して、macOS 12.6 に更新してみた。

macOS に更新した。そうすると、なぜか Emacs 29.50.0 が起動時にエラーがでてしまうようになった。

エラーを見て、それから

  • Xcode を更新して、
  • Xcode のライセンスをOKしてそれから、
  • Command Line Tools を更新した。

それでもEmacs 29.50.0 でエラーがでるので別のバージョンのEmacsを起動してみた。だめだった。

しかたがないので、

sudo port install emacs-app-devel -nativecomp

してみた。ワーニングがでるので、ダメかなと思ったんだけど無事に起動した。

Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled:
  re_search: found in emacs-20220907/config.log
  re_compile_pattern: found in emacs-20220907/config.log
  re_set_syntax: found in emacs-20220907/config.log
  MIN: found in emacs-20220907/config.log
  malloc: found in emacs-20220907/config.log
  __fpending: found in emacs-20220907/config.log

というわけで、Emacs の hatena-blog-writer でブログを更新した。

ジャンプの紙質

週刊少年ジャンプの紙変ったのかやけにつるつるしている気がするけどなんなんだろう。前からなんだろうか。

Cookie Clickerで Hand-made coockies: 1.16e+55 に到達した

777倍のときに666倍が出たので、一気に増えた。 マジでこれ以上あがるの?という気がした。

開始11日でCookies baked(this ascension): 2.42e+55 は何かがおかしいとしか思えない。

merge --allow-unrelated-histories

merge --allow-unrelated-histories

自分たちの local の git に OSSソースコードだけをtarball だけ持ちこんで開発しておいてあとから、やっぱり、オリジナルのgitの履歴も見たいっていいだすのってあるあるですよね

ないよそんなこと、あったらこんな記事書かないよ

git ってあとからそんな 馬鹿な ことできるんですよ、そう merge --allow-unreleated-historiesを使えばね

TLDR;

git checkout -b remote-xxxx-yyy $(git log --pretty=%H | tail -1)
git merge --allow-unrelated-histories remotes/xxxx/yyyy

やり方

まず最初に、ローカル環境にある開発中のリポジトリに オリジナルの git を登録します <original-oss-url> は オリジナルのgitリポジトリのURLで、xxxx は適当な名前、例えば base でもいいです

git remote add xxxx <original-oss-url>

それから、xxxx の情報をfetchで取得してからリモートも含めてブランチを全部表示させます。そこで git のログを取得したいブランチを探します。例えば、remotes/xxxx/main のような名前のはずです。

git fetch xxxx
git branch -a

そこで、安全のために今の開発リポジトリの一番古い HASH $(git log --pretty=%H | tail -1) から適当な名前のブランチを追加させてそこに 先程選んだ ブランチをマージしましょう。ここで --allow-unrelated-histories は履歴関係のないもののマージを許可させるという意味です。

git checkout -b remote-xxxx-yyy $(git log --pretty=%H | tail -1)
git merge --allow-unrelated-histories remotes/xxxx/yyyy

あとは、git log --graph でも行なって確認してみましょう。

そう、あとはこんなことをしなくて済むように最初からltarball でソースコードを持ち込むなんてことはしないようにお願いします。