diff options
author | Yuchen Pei <hi@ypei.me> | 2022-10-21 23:35:47 +1100 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2022-10-21 23:35:47 +1100 |
commit | 544187e3e7ee057b97e2048f71f4e19396884b50 (patch) | |
tree | 6022a0ed415b2ba4c0a2b7ce4240646f705d0b19 | |
parent | 2d11ff50d65b33d5438481ec2fc8ddb528d0a8ab (diff) |
fixed a bug when no title could be guessed.
-rw-r--r-- | luwak.el | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -115,9 +115,9 @@ When non-nill, swap the tor-switch in prefix-arg effect." (defun luwak-guess-title () (save-excursion (goto-char (point-min)) - (re-search-forward "^[^[:space:]]" nil t) - (buffer-substring-no-properties (1- (point)) - (progn (end-of-line 1) (point))))) + (when (re-search-forward "^[^[:space:]]" nil t) + (buffer-substring-no-properties (1- (point)) + (progn (end-of-line 1) (point)))))) (when (require 'org nil t) (defun luwak-org-store-link () |