<commit_before>(server-start)

;; make C-x k work for emacsclient sessions too.
(add-hook 'server-switch-hook
  (lambda ()
    (when server-buffer-clients
      (local-set-key (kbd "C-x k") 'server-edit)
     )
   )
 )<commit_msg>Fix handling of C-x k.<commit_after>(server-start)

(defun my/kill-buffer-or-server-edit ()
  (interactive)
  (if server-buffer-clients
      (server-edit)
    (kill-buffer)
   )
 )

;; make C-x k work for emacsclient sessions too.
(add-hook 'server-switch-hook
  (lambda ()
    (local-set-key (kbd "C-x k") 'my/kill-buffer-or-server-edit)
   )
 )
{'fraction_non_alphanumeric': 0.1611785095320624, 'fraction_numerical': 0.0, 'mean_word_length': 2.931972789115646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4715600', 'n_tokens_mistral': 222, 'n_tokens_neox': 221, 'n_words': 47}