* Problem when org-capturing text from French email
@ 2010-07-16 14:25 Sébastien Vauban
2010-07-16 17:06 ` David Maus
0 siblings, 1 reply; 6+ messages in thread
From: Sébastien Vauban @ 2010-07-16 14:25 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello,
Here a trace of the problem that occurs when I capture some text from an
email, for archive purpose.
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (args-out-of-range 35 42)
format("%.30s" #("Re: Gestionnaire de r\x00e9visions pour \x00e9\ diteur LaTeX sous Windows" 20 29 (charset iso-8859-15) 35 42 (charset iso-8859-15)))
org-replace-escapes("Email from %f: %.30s" (("%c") ("%F" . #("Denis Bitouz\x00e9 <dbitouze.no-ANU3tsQeg1moncpfJ9Ce3Q@public.gmane.org>" 6 13 ...)) ("%f" . "Denis Bitouz\x00e9") ("%T") ("%t" . "?") ("%s" . #("Re: Gestionnaire de r\x00e9visions pour \x00e9\ diteur LaTeX sous Windows" 20 29 ... 35 42 ...)) ("%m" . "20100715150256.4f029e84@drums")))
org-email-link-description()
org-gnus-store-link()
run-hook-with-args-until-success(org-gnus-store-link)
org-store-link(nil)
org-capture(nil)
call-interactively(org-capture nil nil)
--8<---------------cut here---------------end--------------->8---
I guess it's somehow related to the accents in the mail title? Not sure I
understand the details of the trace, but the capture works in many other
cases, so the accents could be the differentiating factor (I don't have enough
history, yet, to assert this).
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem when org-capturing text from French email
2010-07-16 14:25 Problem when org-capturing text from French email Sébastien Vauban
@ 2010-07-16 17:06 ` David Maus
2010-07-16 20:13 ` Sébastien Vauban
0 siblings, 1 reply; 6+ messages in thread
From: David Maus @ 2010-07-16 17:06 UTC (permalink / raw)
To: Sébastien Vauban; +Cc: emacs-orgmode
[-- Attachment #1.1.1: Type: text/plain, Size: 1690 bytes --]
Sébastien Vauban wrote:
>Hello,
>Here a trace of the problem that occurs when I capture some text from an
>email, for archive purpose.
>--8<---------------cut here---------------start------------->8---
>Debugger entered--Lisp error: (args-out-of-range 35 42)
> format("%.30s" #("Re: Gestionnaire de r\x00e9visions pour \x00e9\ diteur LaTeX sous Windows" 20 29 (charset iso-8859-15) 35 42 (charset iso-8859-15)))
> org-replace-escapes("Email from %f: %.30s" (("%c") ("%F" . #("Denis Bitouz\x00e9 <dbitouze.no@spam.wanadoo.fr>" 6 13 ...)) ("%f" . "Denis Bitouz\x00e9") ("%T") ("%t" . "?") ("%s" . #("Re: Gestionnaire de r\x00e9visions pour \x00e9\ diteur LaTeX sous Windows" 20 29 ... 35 42 ...)) ("%m" . "20100715150256.4f029e84@drums")))
> org-email-link-description()
> org-gnus-store-link()
> run-hook-with-args-until-success(org-gnus-store-link)
> org-store-link(nil)
> org-capture(nil)
> call-interactively(org-capture nil nil)
>--8<---------------cut here---------------end--------------->8---
>I guess it's somehow related to the accents in the mail title? Not sure I
>understand the details of the trace, but the capture works in many other
>cases, so the accents could be the differentiating factor (I don't have enough
>history, yet, to assert this).
Your message's user agent tells me, that you use Emacs 23.1 -- and
this looks like Emacs bug #5306[1].
The Attached patch avoids this bug by removing all text properties from
the subject (the same is done in org-wl.el).
HTH,
-- David
[1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #1.1.2: 0001-Remove-text-properties-of-subject-to-avoid-Emacs-bug.patch --]
[-- Type: text/plain, Size: 2416 bytes --]
From 2b253d742ad584a0cf8fb5f9c4e413e2456f662b Mon Sep 17 00:00:00 2001
From: David Maus <dmaus@ictsoc.de>
Date: Fri, 16 Jul 2010 19:02:38 +0200
Subject: [PATCH] Remove text properties of subject to avoid Emacs bug #3506
* org-gnus.el (org-gnus-store-link): Remove text properties of subject
to avoid Emacs bug #3506.
---
lisp/org-gnus.el | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index a41de2e..e135563 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -120,22 +120,26 @@ If `org-store-link' was called with a prefix arg the meaning of
((memq major-mode '(gnus-summary-mode gnus-article-mode))
(let* ((group gnus-newsgroup-name)
- (header (with-current-buffer gnus-summary-buffer
+ (header (with-current-buffer gnus-summary-buffer
(gnus-summary-article-header)))
(from (mail-header-from header))
(message-id (org-remove-angle-brackets (mail-header-id header)))
(date (mail-header-date header))
(subject (mail-header-subject header))
- (to (cdr (assq 'To (mail-header-extra header))))
- newsgroups x-no-archive desc link)
+ (to (cdr (assq 'To (mail-header-extra header))))
+ newsgroups x-no-archive desc link)
+ ;; Remove text properties of subject string to avoid Emacs bug
+ ;; #3506
+ (set-text-properties 0 (length subject) nil subject)
+
;; Fetching an article is an expensive operation; newsgroup and
;; x-no-archive are only needed for web links.
(when (org-xor current-prefix-arg org-gnus-prefer-web-links)
- ;; Make sure the original article buffer is up-to-date
- (save-window-excursion (gnus-summary-select-article))
- (setq to (or to (gnus-fetch-original-field "To"))
- newsgroups (gnus-fetch-original-field "Newsgroups")
- x-no-archive (gnus-fetch-original-field "x-no-archive")))
+ ;; Make sure the original article buffer is up-to-date
+ (save-window-excursion (gnus-summary-select-article))
+ (setq to (or to (gnus-fetch-original-field "To"))
+ newsgroups (gnus-fetch-original-field "Newsgroups")
+ x-no-archive (gnus-fetch-original-field "x-no-archive")))
(org-store-link-props :type "gnus" :from from :subject subject
:message-id message-id :group group :to to)
(setq desc (org-email-link-description)
--
1.7.1
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Problem when org-capturing text from French email
2010-07-16 17:06 ` David Maus
@ 2010-07-16 20:13 ` Sébastien Vauban
2010-07-17 6:40 ` David Maus
0 siblings, 1 reply; 6+ messages in thread
From: Sébastien Vauban @ 2010-07-16 20:13 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi David,
David Maus wrote:
> Sébastien Vauban wrote:
>> Here a trace of the problem that occurs when I capture some text from an
>> email, for archive purpose.
>
>>--8<---------------cut here---------------start------------->8---
>>Debugger entered--Lisp error: (args-out-of-range 35 42)
>> format("%.30s" #("Re: Gestionnaire de r\x00e9visions pour \x00e9\ diteur LaTeX sous Windows" 20 29 (charset iso-8859-15) 35 42 (charset iso-8859-15)))
>> org-replace-escapes("Email from %f: %.30s" (("%c") ("%F" . #("Denis Bitouz\x00e9 <dbitouze.no-ANU3tsQeg1moncpfJ9Ce3Q@public.gmane.org>" 6 13 ...)) ("%f" . "Denis Bitouz\x00e9") ("%T") ("%t" . "?") ("%s" . #("Re: Gestionnaire de r\x00e9visions pour \x00e9\ diteur LaTeX sous Windows" 20 29 ... 35 42 ...)) ("%m" . "20100715150256.4f029e84@drums")))
>> org-email-link-description()
>> org-gnus-store-link()
>> [...]
>>--8<---------------cut here---------------end--------------->8---
>
>> I guess it's somehow related to the accents in the mail title? Not sure I
>> understand the details of the trace, but the capture works in many other
>> cases, so the accents could be the differentiating factor (I don't have
>> enough history, yet, to assert this).
>
> Your message's user agent tells me, that you use Emacs 23.1
Yep. Can't hide it ;-) Do not want either...
> -- and this looks like Emacs bug #5306[1].
> [1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=
Thanks for the link.
> The Attached patch avoids this bug by removing all text properties from the
> subject (the same is done in org-wl.el).
I've applied your patch. That hinders, indeed, the bug to occur. So, it
perfectly shows you're right about the cause.
Though, the patch you gave me causes me troubles in my Gnus buffers: the
*Group* and *Summary* buffers are now black and white only. All my colors
disappeared...
Here the results of `C-u C-x =' on a (randomly taken) character (`x') of my
*Group* buffer:
--8<---------------cut here---------------start------------->8---
character: X (88, #o130, #x58)
preferred charset: ascii (ASCII (ISO646 IRV))
code point: 0x58
syntax: w which means: word
category: .:Base, a:ASCII, l:Latin, r:Roman
buffer code: #x58
file code: #x58 (encoded by coding system utf-8)
display: by this font (glyph code)
xft:-microsoft-Consolas-normal-normal-normal-*-11-*-*-*-m-0-iso10646-1 (#x1B)
Character code properties: customize what to show
name: LATIN CAPITAL LETTER X
general-category: Lu (Letter, Uppercase)
There are text properties here:
fontified t
mouse-face highlight
point-entered gnus-tool-bar-update
point-left gnus-tool-bar-update
[back]
--8<---------------cut here---------------end--------------->8---
The normally applied faces (mostly, `gnus-group-news-3-face' and
`gnus-group-news-3-empty-face') aren't there any more...
Do you confirm such problems? Or is it related to something else in my config?
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: Problem when org-capturing text from French email
2010-07-16 20:13 ` Sébastien Vauban
@ 2010-07-17 6:40 ` David Maus
2010-07-17 20:20 ` Sébastien Vauban
2010-07-18 9:47 ` Patchwork: Patch 146 Accepted Carsten Dominik
0 siblings, 2 replies; 6+ messages in thread
From: David Maus @ 2010-07-17 6:40 UTC (permalink / raw)
To: Sébastien Vauban; +Cc: emacs-orgmode
[-- Attachment #1.1.1: Type: text/plain, Size: 808 bytes --]
Sébastien Vauban wrote:
>> The Attached patch avoids this bug by removing all text properties from the
>> subject (the same is done in org-wl.el).
>I've applied your patch. That hinders, indeed, the bug to occur. So, it
>perfectly shows you're right about the cause.
>Though, the patch you gave me causes me troubles in my Gnus buffers: the
>*Group* and *Summary* buffers are now black and white only. All my colors
>disappeared...
This is indeed the patch's fault. Something I don't completely
understand yet, is when and why this kind of side effect occurs.
Anyway, attached patch supersedes the last one and should work. It
creates and uses a copy of the subject string.
HTH
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #1.1.2: 0001-Remove-text-properties-of-subject-to-avoid-Emacs-bug.patch --]
[-- Type: text/plain, Size: 2478 bytes --]
From 43db1365040528e3245b68e422f687bd4628e5df Mon Sep 17 00:00:00 2001
From: David Maus <dmaus@ictsoc.de>
Date: Sat, 17 Jul 2010 08:37:40 +0200
Subject: [PATCH] Remove text properties of subject to avoid Emacs bug #3506
* org-gnus.el (org-gnus-store-link): Remove text properties of
subject to avoid Emacs bug #3506.
---
lisp/org-gnus.el | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index a41de2e..642e438 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -120,22 +120,26 @@ If `org-store-link' was called with a prefix arg the meaning of
((memq major-mode '(gnus-summary-mode gnus-article-mode))
(let* ((group gnus-newsgroup-name)
- (header (with-current-buffer gnus-summary-buffer
+ (header (with-current-buffer gnus-summary-buffer
(gnus-summary-article-header)))
(from (mail-header-from header))
(message-id (org-remove-angle-brackets (mail-header-id header)))
(date (mail-header-date header))
- (subject (mail-header-subject header))
- (to (cdr (assq 'To (mail-header-extra header))))
- newsgroups x-no-archive desc link)
+ (subject (copy-sequence (mail-header-subject header)))
+ (to (cdr (assq 'To (mail-header-extra header))))
+ newsgroups x-no-archive desc link)
+ ;; Remove text properties of subject string to avoid Emacs bug
+ ;; #3506
+ (set-text-properties 0 (length subject) nil subject)
+
;; Fetching an article is an expensive operation; newsgroup and
;; x-no-archive are only needed for web links.
(when (org-xor current-prefix-arg org-gnus-prefer-web-links)
- ;; Make sure the original article buffer is up-to-date
- (save-window-excursion (gnus-summary-select-article))
- (setq to (or to (gnus-fetch-original-field "To"))
- newsgroups (gnus-fetch-original-field "Newsgroups")
- x-no-archive (gnus-fetch-original-field "x-no-archive")))
+ ;; Make sure the original article buffer is up-to-date
+ (save-window-excursion (gnus-summary-select-article))
+ (setq to (or to (gnus-fetch-original-field "To"))
+ newsgroups (gnus-fetch-original-field "Newsgroups")
+ x-no-archive (gnus-fetch-original-field "x-no-archive")))
(org-store-link-props :type "gnus" :from from :subject subject
:message-id message-id :group group :to to)
(setq desc (org-email-link-description)
--
1.7.1
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Problem when org-capturing text from French email
2010-07-17 6:40 ` David Maus
@ 2010-07-17 20:20 ` Sébastien Vauban
2010-07-18 9:47 ` Patchwork: Patch 146 Accepted Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Sébastien Vauban @ 2010-07-17 20:20 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi David,
David Maus wrote:
> Sébastien Vauban wrote:
>>> The Attached patch avoids this bug by removing all text properties from
>>> the subject (the same is done in org-wl.el).
>>
>> I've applied your patch. That hinders, indeed, the bug to occur. So, it
>> perfectly shows you're right about the cause.
>>
>> Though, the patch you gave me causes me troubles in my Gnus buffers: the
>> *Group* and *Summary* buffers are now black and white only. All my colors
>> disappeared...
>
> This is indeed the patch's fault. Something I don't completely understand
> yet, is when and why this kind of side effect occurs. Anyway, attached patch
> supersedes the last one and should work. It creates and uses a copy of the
> subject string.
That does work as expected. SOLVED. Thanks a lot!
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Patchwork: Patch 146 Accepted
2010-07-17 6:40 ` David Maus
2010-07-17 20:20 ` Sébastien Vauban
@ 2010-07-18 9:47 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-07-18 9:47 UTC (permalink / raw)
To: emacs-orgmode
Patch 146 (http://patchwork.newartisans.com/patch/146/) is now Accepted.
This relates to the following submission:
http://mid.gmane.org/%3C87vd8ebohm.wl%25dmaus%40ictsoc.de%3E
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-07-19 7:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-16 14:25 Problem when org-capturing text from French email Sébastien Vauban
2010-07-16 17:06 ` David Maus
2010-07-16 20:13 ` Sébastien Vauban
2010-07-17 6:40 ` David Maus
2010-07-17 20:20 ` Sébastien Vauban
2010-07-18 9:47 ` Patchwork: Patch 146 Accepted Carsten Dominik
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).