* [PATCH] emacs: do not modify subject in search or show
@ 2012-04-15 0:08 Jameson Graef Rollins
2012-04-15 2:17 ` [PATCH v2] " Jameson Graef Rollins
0 siblings, 1 reply; 4+ messages in thread
From: Jameson Graef Rollins @ 2012-04-15 0:08 UTC (permalink / raw)
To: Notmuch Mail
A previous patch [0] replaced blank subject lines with '[No Subject]'
in search and show mode. Apparently this was needed to circumvent
some bug in the printing code, but there was no need for it search or
show, and it is definitely not desirable, so we undo it here (a revert
is no longer feasible). We should not be modifying strings in the
original message without good reason, or without a clear indication
that we are doing so, neither of which apply in this case. For
further discussion see [0].
[0] id:"1327918561-16245-3-git-send-email-dme@dme.org"
---
emacs/notmuch-print.el | 4 ++--
emacs/notmuch-show.el | 5 +----
emacs/notmuch.el | 5 ++---
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/emacs/notmuch-print.el b/emacs/notmuch-print.el
index 6653d97..81b2ef0 100644
--- a/emacs/notmuch-print.el
+++ b/emacs/notmuch-print.el
@@ -60,7 +60,7 @@ Optional OUTPUT allows passing a list of flags to muttprint."
(defun notmuch-print-ps-print (msg)
"Print a message buffer using the ps-print package."
- (let ((subject (notmuch-prettify-subject
+ (let ((subject (notmuch-print-prettify-subject
(plist-get (notmuch-show-get-prop :headers msg) :Subject))))
(rename-buffer subject t)
(ps-print-buffer)))
@@ -68,7 +68,7 @@ Optional OUTPUT allows passing a list of flags to muttprint."
(defun notmuch-print-ps-print/evince (msg)
"Preview a message buffer using ps-print and evince."
(let ((ps-file (make-temp-file "notmuch"))
- (subject (notmuch-prettify-subject
+ (subject (notmuch-print-prettify-subject
(plist-get (notmuch-show-get-prop :headers msg) :Subject))))
(rename-buffer subject t)
(ps-print-buffer ps-file)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 30b26d1..1e55099 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1075,7 +1075,7 @@ function is used."
(run-hooks 'notmuch-show-hook))
;; Set the header line to the subject of the first message.
- (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-pretty-subject)))))
+ (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))))
(defun notmuch-show-capture-state ()
"Capture the state of the current buffer.
@@ -1375,9 +1375,6 @@ current thread."
(defun notmuch-show-get-depth ()
(notmuch-show-get-prop :depth))
-(defun notmuch-show-get-pretty-subject ()
- (notmuch-prettify-subject (notmuch-show-get-subject)))
-
(defun notmuch-show-set-tags (tags)
"Set the tags of the current message."
(notmuch-show-set-prop :tags tags)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index ba833e6..326645d 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -507,7 +507,7 @@ Complete list of currently available key bindings:
"Display the currently selected thread."
(interactive)
(let ((thread-id (notmuch-search-find-thread-id))
- (subject (notmuch-prettify-subject (notmuch-search-find-subject))))
+ (subject (notmuch-search-find-subject)))
(if (> (length thread-id) 0)
(notmuch-show thread-id
(current-buffer)
@@ -877,8 +877,7 @@ non-authors is found, assume that all of the authors match."
;; We currently just throw away excluded matches.
(unless (eq (aref count 1) ?0)
(let ((beg (point)))
- (notmuch-search-show-result date count authors
- (notmuch-prettify-subject subject) tags)
+ (notmuch-search-show-result date count authors subject tags)
(notmuch-search-color-line beg (point) tag-list)
(put-text-property beg (point) 'notmuch-search-thread-id thread-id)
(put-text-property beg (point) 'notmuch-search-authors authors)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] emacs: do not modify subject in search or show
2012-04-15 0:08 [PATCH] emacs: do not modify subject in search or show Jameson Graef Rollins
@ 2012-04-15 2:17 ` Jameson Graef Rollins
2012-04-15 17:23 ` [No Subject] Tomi Ollila
2012-04-29 2:40 ` [PATCH v2] emacs: do not modify subject in search or show David Bremner
0 siblings, 2 replies; 4+ messages in thread
From: Jameson Graef Rollins @ 2012-04-15 2:17 UTC (permalink / raw)
To: Notmuch Mail
A previous patch [0] replaced blank subject lines with '[No Subject]'
in search and show mode. Apparently this was needed to circumvent
some bug in the printing code, but there was no need for it search or
show, and it is definitely not desirable, so we undo it here (a revert
is no longer feasible). We should not be modifying strings in the
original message without good reason, or without a clear indication
that we are doing so, neither of which apply in this case. For
further discussion see [0].
[0] id:"1327918561-16245-3-git-send-email-dme@dme.org"
---
Sorry, there was a small bug in the previous version (notmuch-print.el
was mistakenly modified).
emacs/notmuch-show.el | 5 +----
emacs/notmuch.el | 5 ++---
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 30b26d1..1e55099 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1075,7 +1075,7 @@ function is used."
(run-hooks 'notmuch-show-hook))
;; Set the header line to the subject of the first message.
- (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-pretty-subject)))))
+ (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))))
(defun notmuch-show-capture-state ()
"Capture the state of the current buffer.
@@ -1375,9 +1375,6 @@ current thread."
(defun notmuch-show-get-depth ()
(notmuch-show-get-prop :depth))
-(defun notmuch-show-get-pretty-subject ()
- (notmuch-prettify-subject (notmuch-show-get-subject)))
-
(defun notmuch-show-set-tags (tags)
"Set the tags of the current message."
(notmuch-show-set-prop :tags tags)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index ba833e6..326645d 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -507,7 +507,7 @@ Complete list of currently available key bindings:
"Display the currently selected thread."
(interactive)
(let ((thread-id (notmuch-search-find-thread-id))
- (subject (notmuch-prettify-subject (notmuch-search-find-subject))))
+ (subject (notmuch-search-find-subject)))
(if (> (length thread-id) 0)
(notmuch-show thread-id
(current-buffer)
@@ -877,8 +877,7 @@ non-authors is found, assume that all of the authors match."
;; We currently just throw away excluded matches.
(unless (eq (aref count 1) ?0)
(let ((beg (point)))
- (notmuch-search-show-result date count authors
- (notmuch-prettify-subject subject) tags)
+ (notmuch-search-show-result date count authors subject tags)
(notmuch-search-color-line beg (point) tag-list)
(put-text-property beg (point) 'notmuch-search-thread-id thread-id)
(put-text-property beg (point) 'notmuch-search-authors authors)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [No Subject]
2012-04-15 2:17 ` [PATCH v2] " Jameson Graef Rollins
@ 2012-04-15 17:23 ` Tomi Ollila
2012-04-29 2:40 ` [PATCH v2] emacs: do not modify subject in search or show David Bremner
1 sibling, 0 replies; 4+ messages in thread
From: Tomi Ollila @ 2012-04-15 17:23 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
On Sun, Apr 15 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> A previous patch [0] replaced blank subject lines with '[No Subject]'
> in search and show mode. Apparently this was needed to circumvent
> some bug in the printing code, but there was no need for it search or
> show, and it is definitely not desirable, so we undo it here (a revert
> is no longer feasible). We should not be modifying strings in the
> original message without good reason, or without a clear indication
> that we are doing so, neither of which apply in this case. For
> further discussion see [0].
>
> [0] id:"1327918561-16245-3-git-send-email-dme@dme.org"
> ---
I agree. LGTM.
Tomi
> Sorry, there was a small bug in the previous version (notmuch-print.el
> was mistakenly modified).
>
> emacs/notmuch-show.el | 5 +----
> emacs/notmuch.el | 5 ++---
> 2 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 30b26d1..1e55099 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1075,7 +1075,7 @@ function is used."
> (run-hooks 'notmuch-show-hook))
>
> ;; Set the header line to the subject of the first message.
> - (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-pretty-subject)))))
> + (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))))
>
> (defun notmuch-show-capture-state ()
> "Capture the state of the current buffer.
> @@ -1375,9 +1375,6 @@ current thread."
> (defun notmuch-show-get-depth ()
> (notmuch-show-get-prop :depth))
>
> -(defun notmuch-show-get-pretty-subject ()
> - (notmuch-prettify-subject (notmuch-show-get-subject)))
> -
> (defun notmuch-show-set-tags (tags)
> "Set the tags of the current message."
> (notmuch-show-set-prop :tags tags)
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index ba833e6..326645d 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -507,7 +507,7 @@ Complete list of currently available key bindings:
> "Display the currently selected thread."
> (interactive)
> (let ((thread-id (notmuch-search-find-thread-id))
> - (subject (notmuch-prettify-subject (notmuch-search-find-subject))))
> + (subject (notmuch-search-find-subject)))
> (if (> (length thread-id) 0)
> (notmuch-show thread-id
> (current-buffer)
> @@ -877,8 +877,7 @@ non-authors is found, assume that all of the authors match."
> ;; We currently just throw away excluded matches.
> (unless (eq (aref count 1) ?0)
> (let ((beg (point)))
> - (notmuch-search-show-result date count authors
> - (notmuch-prettify-subject subject) tags)
> + (notmuch-search-show-result date count authors subject tags)
> (notmuch-search-color-line beg (point) tag-list)
> (put-text-property beg (point) 'notmuch-search-thread-id thread-id)
> (put-text-property beg (point) 'notmuch-search-authors authors)
> --
> 1.7.9.5
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] emacs: do not modify subject in search or show
2012-04-15 2:17 ` [PATCH v2] " Jameson Graef Rollins
2012-04-15 17:23 ` [No Subject] Tomi Ollila
@ 2012-04-29 2:40 ` David Bremner
1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2012-04-29 2:40 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
Jameson Graef Rollins <jrollins@finestructure.net> writes:
> A previous patch [0] replaced blank subject lines with '[No Subject]'
> in search and show mode.
pushed.
d
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-29 2:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-15 0:08 [PATCH] emacs: do not modify subject in search or show Jameson Graef Rollins
2012-04-15 2:17 ` [PATCH v2] " Jameson Graef Rollins
2012-04-15 17:23 ` [No Subject] Tomi Ollila
2012-04-29 2:40 ` [PATCH v2] emacs: do not modify subject in search or show David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).