Commit notifications for all Sup repositories
 help / color / mirror / Atom feed
From: Dan Callaghan <dan@bl2.djc.id.au>
To: sup-commits@supmua.dev
Subject: [sup.git] 04/06: delete unused load_header method
Date: Sun, 18 Oct 2026 12:52:26 +1100	[thread overview]
Message-ID: <20261018015223.4132D29C474@bl2.djc.id.au> (raw)
In-Reply-To: <179228834279.389402.1183876010618010579@bl2.djc.id.au>

New commit on branch develop:
https://supmua.dev/git/sup/commit/d37b2c2965c5e164207e2021eee9e83ea08079d5.html

commit d37b2c2965c5e164207e2021eee9e83ea08079d5
Author: Dan Callaghan <djc@djc.id.au>
AuthorDate: Sat Oct 17 13:09:39 2026 +1100

    delete unused load_header method
---
 lib/sup/draft.rb     |  4 ----
 lib/sup/maildir.rb   |  4 ----
 lib/sup/mbox.rb      | 10 ----------
 lib/sup/message.rb   |  4 ----
 lib/sup/source.rb    |  1 -
 test/dummy_source.rb |  4 ----
 6 files changed, 27 deletions(-)

diff --git a/lib/sup/draft.rb b/lib/sup/draft.rb
index 775f796a..2428f113 100644
--- a/lib/sup/draft.rb
+++ b/lib/sup/draft.rb
@@ -70,10 +70,6 @@ class DraftLoader < Source
 
   def fn_for_offset o; File.join(@dir, o.to_s); end
 
-  def load_header offset
-    File.open(fn_for_offset(offset)) { |f| parse_raw_email_header f }
-  end
-
   def load_message offset
     raise SourceError, "Draft not found" unless File.exist? fn_for_offset(offset)
     File.open(fn_for_offset(offset)) do |f|
diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb
index 1c3aecd1..488698f1 100644
--- a/lib/sup/maildir.rb
+++ b/lib/sup/maildir.rb
@@ -84,10 +84,6 @@ class Maildir < Source
     end
   end
 
-  def load_header id
-    with_file_for(id) { |f| parse_raw_email_header f }
-  end
-
   def load_message id
     with_file_for(id) { |f| RMail::Parser.read f }
   end
diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
index 04dc47b0..471b89a6 100644
--- a/lib/sup/mbox.rb
+++ b/lib/sup/mbox.rb
@@ -69,16 +69,6 @@ class MBox < Source
     end
   end
 
-  def load_header offset
-    header = nil
-    @mutex.synchronize do
-      ensure_open
-      @f.seek offset
-      header = parse_raw_email_header @f
-    end
-    header
-  end
-
   def load_message offset
     @mutex.synchronize do
       ensure_open
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index 24e5464c..ce5e1757 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -48,8 +48,6 @@ class Message
 
   attr_accessor :locations
 
-  ## if you specify a :header, will use values from that. otherwise,
-  ## will try and load the header from the source.
   def initialize opts
     @locations = opts[:locations] or raise ArgumentError, "locations can't be nil"
     @snippet = opts[:snippet]
@@ -64,8 +62,6 @@ class Message
     ## we need to initialize this. see comments in parse_header as to
     ## why.
     @refs = []
-
-    #parse_header(opts[:header] || @source.load_header(@source_info))
   end
 
   def decode_header_field v
diff --git a/lib/sup/source.rb b/lib/sup/source.rb
index 4d672cae..29120c18 100644
--- a/lib/sup/source.rb
+++ b/lib/sup/source.rb
@@ -33,7 +33,6 @@ class Source
   ## To write a new source, subclass this class, and implement:
   ##
   ## - initialize
-  ## - load_header offset
   ## - load_message offset
   ## - raw_header offset
   ## - raw_message offset
diff --git a/test/dummy_source.rb b/test/dummy_source.rb
index 1e2492a0..0389db2c 100644
--- a/test/dummy_source.rb
+++ b/test/dummy_source.rb
@@ -32,10 +32,6 @@ class DummySource < Source
     File.open(fn, 'rb') { |f| yield f }
   end
 
-  def load_header id
-    with_file_for(id) { |f| parse_raw_email_header f }
-  end
-
   def load_message id
     with_file_for(id) { |f| RMail::Parser.read f }
   end

  parent reply	other threads:[~2026-10-18  1:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18  1:52 [sup.git] branch develop updated (cf3a2e38 -> c9f29b8d) Dan Callaghan
2026-10-18  1:52 ` [sup.git] 01/06: prepend type:mail to every search before parsing Dan Callaghan
2026-10-18  1:52 ` [sup.git] 02/06: always set MIME-Version header on outgoing mails Dan Callaghan
2026-10-18  1:52 ` [sup.git] 03/06: unfold headers before further parsing Dan Callaghan
2026-10-18  1:52 ` Dan Callaghan [this message]
2026-10-18  1:52 ` [sup.git] 05/06: move Source.parse_raw_email_header to EditMessageMode Dan Callaghan
2026-10-18  1:52 ` [sup.git] 06/06: ncursesw: 1.4.13 → 1.4.14 Dan Callaghan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261018015223.4132D29C474@bl2.djc.id.au \
    --to=dan@bl2.djc.id.au \
    --cc=djc@djc.id.au \
    --cc=sup-commits@supmua.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox