diff -r f61879daacf0 -r dc1add4ee525 genorg.pl --- a/genorg.pl Tue Jan 07 00:37:57 2025 +1000 +++ b/genorg.pl Sun Jan 12 16:14:26 2025 +1000 @@ -79,16 +79,16 @@ END my $elisp_code = <<"END" =~ s/\n\s+//gr; - (let ((ls '(LIST))) - (require 'org) - (mapc - (lambda (b) - (with-current-buffer b - (when (and (not (string-match "^ " (buffer-name b))) - (eq major-mode 'org-mode)) - (org-export-to-file 'html (pop ls))))) - (buffer-list)) - (kill-emacs)) +(let ((ls '(LIST))) + (require 'org) + (mapc + (lambda (b) + (with-current-buffer b + (when (and (not (string-match "^ " (buffer-name b))) + (eq major-mode 'org-mode)) + (org-export-to-file 'html (pop ls))))) + (buffer-list)) + (kill-emacs)) END @@ -173,21 +173,21 @@ my %config_vars = ( - 'emacs-path' => \$emacs, - acss => \$art_css, - ccss => \$cat_css, - indir => \$dir, - outdir => \$outdir, - no_name_dir => \$no_name_dir, - etc_files => \$etc_files, - cache => \$cache_file, - home => \$home, - about => \$about, - domain => \$domain, - title => \$blog_title, - rdesc => \$rdesc, - max_rss => \$max_rss, - max_cat => \$max_cat + 'emacs-path' => \$emacs, + acss => \$art_css, + ccss => \$cat_css, + indir => \$dir, + outdir => \$outdir, + no_name_dir => \$no_name_dir, + etc_files => \$etc_files, + cache => \$cache_file, + home => \$home, + about => \$about, + domain => \$domain, + title => \$blog_title, + rdesc => \$rdesc, + max_rss => \$max_rss, + max_cat => \$max_cat ); @@ -273,20 +273,13 @@ $changed_files{$file} = $to; push @modified_files, $rel_file; } - %changed_files // exit; - $elisp_code =~ s/LIST/join '', map "\"$_\" ", values %changed_files /e; - open my $fh, - '-|', - ($emacs, - '-Q', - '--eval', - "(progn $custom_code)", - keys %changed_files, - "--eval", - "$elisp_code"); - close $fh; - \%changed_files } + %changed_files // exit; + $elisp_code =~ s/LIST/join '', map "\"$_\" ", values %changed_files /e; + open my $fh, '-|', ($emacs, '-Q','--eval', "(progn $custom_code)", keys %changed_files, "--eval" , "$elisp_code"); + close $fh; + \%changed_files +} my $cdir; @@ -414,10 +407,10 @@ $str = "$str" if $file && ($file == $page); defined $file ? "