emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: emacs-orgmode@gnu.org
Subject: Re: Better links to usenet articles
Date: Fri, 14 Nov 2008 10:03:37 +0100	[thread overview]
Message-ID: <87wsf6he6u.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <89AB52E4-C245-4BE8-BBAC-C11EF2347CA2@uva.nl> (Carsten Dominik's message of "Fri, 14 Nov 2008 08:23:19 +0100")

Carsten Dominik <dominik@science.uva.nl> writes:

Hi Carsten,

> Does anyone know the magic spell to check for this header field in a
> gnus article?

That works for me:

--8<---------------cut here---------------start------------->8---
(with-current-buffer gnus-article-buffer
  (save-excursion
    (gnus-summary-toggle-header)
    (goto-char (point-min))
    (let ((str (mail-header 'x-no-archive (mail-header-extract))))
      (when str
	(with-temp-buffer
	  (insert str)
	  (buffer-substring-no-properties (point-min) (point-max)))))))
--8<---------------cut here---------------end--------------->8---

It returns the value of that header as string or nil if there's no such
header at all.

Bye,
Tassilo
-- 
The glass is neither half-full nor half-empty: it's twice as big as it
needs to be.

  reply	other threads:[~2008-11-14  9:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13 19:51 Better links to usenet articles Tassilo Horn
2008-11-14  7:23 ` Carsten Dominik
2008-11-14  9:03   ` Tassilo Horn [this message]
2008-11-14  9:09     ` Tassilo Horn
2008-11-16 21:30       ` Carsten Dominik
2008-11-16 21:41         ` Tassilo Horn
2008-11-17  7:08           ` Carsten Dominik

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87wsf6he6u.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).