bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34387: 26.1; Gnus: handle empty message parts


From: Christophe Troestler
Subject: bug#34387: 26.1; Gnus: handle empty message parts
Date: Thu, 14 Feb 2019 13:30:34 +0100
User-agent: mu4e 1.1.0; emacs 26.1

On 14 February 2019 at 00:20 CET, Katsumi Yamaoka wrote:
>
> The point would be to delete only whitespace that mm-shr inserts.
> How about this?
>
> (defadvice mm-shr (around delete-leading-and-trailing-whitespace activate)
>   "Delete leading and trailing whitespace in Gnus article buffer."
>   (when (derived-mode-p 'gnus-article-mode)
>     (save-restriction
>       (narrow-to-region (point) (point))
>       ad-do-it
>       (goto-char (point-min))
>       (skip-chars-forward "\t\n ")
>       (delete-region (point-min) (point))
>       (goto-char (point-max))
>       (skip-chars-backward "\t\n ")
>       (delete-region (point) (point-max))
>       (insert "\n"))))

The point is to delete all trailing whitespace coming from the conversion of 
HTML to text.  Without this, some emails (such as the one attached) are hard to 
read because the lines end with so many whitespaces that they take several 
lines on the screen (filled with spaces).  The following does what I want (and 
does not trigger the bug, thanks to the narrowing).

(define-advice mm-shr (:around (oldfn &rest handle) delete-trailing-whitespace)
  "Delete leading and trailing whitespace in Gnus article buffer."
  (when (derived-mode-p 'gnus-article-mode)
    (save-restriction
      (narrow-to-region (point) (point))
      (apply oldfn handle)
      (delete-trailing-whitespace))))

Thanks,
C.



--- Begin Message --- Subject: Numerical Algorithms, Vol. 80, Issue 2 - New Issue Alert Date: Thu, 14 Feb 2019 11:09:05 +0100
If this email is not displayed correctly, please click here to read this table of contents online.
New Issue Alert
02/14/2019

Dear Ch. TROESTLER,

We are pleased to deliver your requested table of contents alert for Numerical Algorithms. Volume 80 Number 2 is now available online.

Important news

Celebrate 2019 Chinese New Year with Springer!

Read 2017 & 2018 top download books with open chapters. Download Highly Cited Papers, top 1% cited in the field, free online until 28 Feb.
» Learn more

SRC conf.

In this issue

Original Paper

Improved optimization methods for image registration problems

Ke Chen, Geovani Nunes Grapiglia, Jinyun Yuan & Daoping Zhang

» Abstract   » Full text PDF
Original Paper

Efficient parameterized rotated shift-splitting preconditioner for a class of complex symmetric linear systems

Cheng-Liang Li & Chang-Feng Ma

» Abstract   » Full text PDF
Original Paper

Modified Newton-MDPMHSS method for solving nonlinear systems with block two-by-two complex symmetric Jacobian matrices

Min-Hong Chen & Qing-Biao Wu

» Abstract   » Full text PDF
Original Paper

Picard iteration-based variable-order integrator with dense output employing algorithmic differentiation

Herman D. Schaumburg, Afnan Al Marzouk & Bela Erdelyi

» Abstract   » Full text PDF
Original Paper

An infeasible bundle method for nonconvex constrained optimization with application to semi-infinite programming problems

Jian Lv, Li-Ping Pang, Na Xu & Ze-Hao Xiao

» Abstract   » Full text PDF
Original Paper

A two-grid parallel partition of unity finite element scheme

Guangzhi Du & Liyun Zuo

» Abstract   » Full text PDF
Original Paper

Parallel computing investigations for the projection method applied to the interface transport scheme of a two-phase flow by the method of characteristics

Mireille Haddad, Frédéric Hecht, Toni Sayah & Pierre Henri Tournier

» Abstract   » Full text PDF
Original Paper

Convergence of discrete time waveform relaxation methods

Zhencheng Fan

» Abstract   » Full text PDF
Original Paper

Modified PHSS iterative methods for solving nonsingular and singular saddle point problems

Zheng-Ge Huang, Li-Gong Wang, Zhong Xu & Jing-Jing Cui

» Abstract   » Full text PDF
Original Paper

On the asymptotic optimality of error bounds for some linear complementarity problems

M. García-Esnaola & J. M. Peña

» Abstract   » Full text PDF
Original Paper

Some second-order 𝜃 schemes combined with finite element method for nonlinear fractional cable equation

Yang Liu, Yanwei Du, Hong Li, Fawang Liu & Yajun Wang

» Abstract   » Full text PDF
Original Paper

A new family of three-stage two-step P-stable multiderivative methods with vanished phase-lag and some of its derivatives for the numerical solution of radial Schrödinger equation and IVPs with oscillating solutions

Ali Shokri, Mohammad Mehdizadeh Khalsaraei, Mortaza Tahmourasi & Raquel Garcia-Rubio

» Abstract   » Full text PDF
Original Paper

A modified Newton iteration for finding nonnegative Z-eigenpairs of a nonnegative tensor

Chun-Hua Guo, Wen-Wei Lin & Ching-Sung Liu

» Abstract   » Full text PDF
Original Paper

Selective projection methods for solving a class of variational inequalities

Songnian He & Hanlin Tian

» Abstract   » Full text PDF
Original Paper

Look-ahead in the two-sided reduction to compact band forms for symmetric eigenvalue problems and the SVD

Rafael Rodríguez-Sánchez, Sandra Catalán, José R. Herrero, Enrique S. Quintana-Ortí & Andrés E. Tomás

» Abstract   » Full text PDF
Original Paper

Truncation dimension for linear problems on multivariate function spaces

Aicke Hinrichs, Peter Kritzer, Friedrich Pillichshammer & G. W. Wasilkowski

» Abstract   » Full text PDF

Do you want to publish your article in this journal?

Please visit the homepage of Numerical Algorithms for full details on:

  • aims and scope
  • editorial policy
  • article submission

Impact Factor: 1.536 (2017)
Journal Citation Reports®, Clarivate Analytics

Read open access articles

Click here to view all open access articles published in this journal.

Interested in publishing your article open access?
When you opt for Open Choice, you retain full copyright and
your article is permanently freely available.

Sign up for SpringerAlerts!

Register for Springer’s email services providing you with info on the latest books in your field. » Click here

Important news

Springer Nature Transfer Desk

Imagine a world where you only have to submit your article once. With our Transfer Desk, we’re working toward making that a reality. Learn more here:


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]