* Bug in emacsbug.el
@ 2006-12-05 16:01 Lennart Borgman
2006-12-05 16:32 ` Michaël Cadilhac
0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2006-12-05 16:01 UTC (permalink / raw)
I think this test in `report-emacs-bug' tests the wrong mail address:
;; Insert warnings for novice users.
(when (string-match "@gnu\\.org^" reporting-address)
(insert "This bug report will be sent to the Free Software Foundation,\n")
(let ((pos (point)))
(insert "not to your local site managers!")
(put-text-property pos (point) 'face 'highlight)))
Should it not test `user-mail-address' instead?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug in emacsbug.el
2006-12-05 16:01 Bug in emacsbug.el Lennart Borgman
@ 2006-12-05 16:32 ` Michaël Cadilhac
2006-12-05 23:06 ` Lennart Borgman
0 siblings, 1 reply; 10+ messages in thread
From: Michaël Cadilhac @ 2006-12-05 16:32 UTC (permalink / raw)
Cc: Emacs Devel
[-- Attachment #1.1: Type: text/plain, Size: 1171 bytes --]
Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
> I think this test in `report-emacs-bug' tests the wrong mail address:
>
> ;; Insert warnings for novice users.
> (when (string-match "@gnu\\.org^" reporting-address)
> (insert "This bug report will be sent to the Free Software Foundation,\n")
> (let ((pos (point)))
> (insert "not to your local site managers!")
> (put-text-property pos (point) 'face 'highlight)))
>
> Should it not test `user-mail-address' instead?
Don't think so. This warning is here to warn the user that the email
(s)he writes is GOING TO the FSF, not to the local sysadmin.
Why do you want to test user-mail-address? Maybe something's missing
in the warning set of emacsbug in your opinion?
--
/!\ My mail address has changed, please update your files accordingly.
| Michaël `Micha' Cadilhac | (\(\ This is the cute bunny virus, |
| Epita/LRDE Promo 2007 | (^.^) please copy this into your |
| http://michael.cadilhac.name | (")") sig so it can spread. |
`--JID: michael.cadilhac@gmail.com--' - --'
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug in emacsbug.el
2006-12-05 16:32 ` Michaël Cadilhac
@ 2006-12-05 23:06 ` Lennart Borgman
2006-12-05 23:44 ` Michaël Cadilhac
0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2006-12-05 23:06 UTC (permalink / raw)
Cc: Emacs Devel
Michaël Cadilhac wrote:
> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>> I think this test in `report-emacs-bug' tests the wrong mail address:
>>
>> ;; Insert warnings for novice users.
>> (when (string-match "@gnu\\.org^" reporting-address)
>> (insert "This bug report will be sent to the Free Software Foundation,\n")
>> (let ((pos (point)))
>> (insert "not to your local site managers!")
>> (put-text-property pos (point) 'face 'highlight)))
>>
>> Should it not test `user-mail-address' instead?
>
> Don't think so. This warning is here to warn the user that the email
> (s)he writes is GOING TO the FSF, not to the local sysadmin.
>
> Why do you want to test user-mail-address? Maybe something's missing
> in the warning set of emacsbug in your opinion?
Oh, sorry. It is the regexp that is bad I think. It should probably be
"@gnu\\.org$".
But I noted more strange things in `report-emacs-bug'. There are a lot
of statements like
(put-text-property pos (point) 'face 'highlight)
They does not seem to work. If the OBJECT parameter to put-text-property
is a string it works, but it does not work with (current-buffer) as far
as I can see.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug in emacsbug.el
2006-12-05 23:06 ` Lennart Borgman
@ 2006-12-05 23:44 ` Michaël Cadilhac
2006-12-06 0:05 ` Lennart Borgman
2006-12-06 0:22 ` Miles Bader
0 siblings, 2 replies; 10+ messages in thread
From: Michaël Cadilhac @ 2006-12-05 23:44 UTC (permalink / raw)
Cc: Emacs Devel
[-- Attachment #1.1: Type: text/plain, Size: 1234 bytes --]
Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>>
>>> I think this test in `report-emacs-bug' tests the wrong mail address:
>>>
>>> ;; Insert warnings for novice users.
>>> (when (string-match "@gnu\\.org^" reporting-address)
> It is the regexp that is bad I think. It should probably be
> "@gnu\\.org$".
Of course you are right! :-)
> But I noted more strange things in `report-emacs-bug'. There are a lot
> of statements like
>
> (put-text-property pos (point) 'face 'highlight)
>
> They does not seem to work.
Well, AFAICT, it works but mail-mode does not seem to allow it. If you
call text-mode after (compose-mail), the highlight will be there (for
whatever reason I don't have the time to investigate).
--
/!\ My mail address has changed, please update your files accordingly.
| Michaël `Micha' Cadilhac | Je veut dire que la loi francaise |
| Epita/LRDE Promo 2007 | est overwritable par le |
| http://michael.cadilhac.name | reglement interieur il me semble. |
`--JID: michael.cadilhac@gmail.com--' -- ElBarto - --'
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug in emacsbug.el
2006-12-05 23:44 ` Michaël Cadilhac
@ 2006-12-06 0:05 ` Lennart Borgman
2006-12-06 0:22 ` Miles Bader
1 sibling, 0 replies; 10+ messages in thread
From: Lennart Borgman @ 2006-12-06 0:05 UTC (permalink / raw)
Cc: Emacs Devel
Michaël Cadilhac wrote:
> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>>> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>>>
>>>> I think this test in `report-emacs-bug' tests the wrong mail address:
>>>>
>>>> ;; Insert warnings for novice users.
>>>> (when (string-match "@gnu\\.org^" reporting-address)
>
>> It is the regexp that is bad I think. It should probably be
>> "@gnu\\.org$".
>
> Of course you are right! :-)
Could someone with CVS knowledge please fix that little problem?
>> But I noted more strange things in `report-emacs-bug'. There are a lot
>> of statements like
>>
>> (put-text-property pos (point) 'face 'highlight)
>>
>> They does not seem to work.
>
> Well, AFAICT, it works but mail-mode does not seem to allow it. If you
> call text-mode after (compose-mail), the highlight will be there (for
> whatever reason I don't have the time to investigate).
I tested in the scratch buffer and got the same result. However after I
changed the mode to fundamental-mode the above statement worked.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug in emacsbug.el
2006-12-05 23:44 ` Michaël Cadilhac
2006-12-06 0:05 ` Lennart Borgman
@ 2006-12-06 0:22 ` Miles Bader
2006-12-06 0:54 ` Lennart Borgman
1 sibling, 1 reply; 10+ messages in thread
From: Miles Bader @ 2006-12-06 0:22 UTC (permalink / raw)
Cc: Lennart Borgman, Emacs Devel
michael@cadilhac.name (Michaël Cadilhac) writes:
>> (put-text-property pos (point) 'face 'highlight)
>>
>> They does not seem to work.
>
> Well, AFAICT, it works but mail-mode does not seem to allow it. If you
> call text-mode after (compose-mail), the highlight will be there (for
> whatever reason I don't have the time to investigate).
They work, but font-lock (used by mail-mode/message-mode) overrides
such manually-added face properties.
I think the right fix is to change 'face to 'font-lock-face. That will
make the highlighting work iff font-lock is enabled -- which it is by
default. [If those highlights are deemed so important that they must be
seen regardless of whether font-lcok is enabled, one could add _both_
'face and 'font-lock-face properties.]
-Miles
--
`Cars give people wonderful freedom and increase their opportunities.
But they also destroy the environment, to an extent so drastic that
they kill all social life' (from _A Pattern Language_)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug in emacsbug.el
2006-12-06 0:22 ` Miles Bader
@ 2006-12-06 0:54 ` Lennart Borgman
2006-12-06 1:07 ` Miles Bader
0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2006-12-06 0:54 UTC (permalink / raw)
Cc: Michaël Cadilhac, Emacs Devel
Miles Bader wrote:
> michael@cadilhac.name (Michaël Cadilhac) writes:
>>> (put-text-property pos (point) 'face 'highlight)
>>>
>>> They does not seem to work.
>> Well, AFAICT, it works but mail-mode does not seem to allow it. If you
>> call text-mode after (compose-mail), the highlight will be there (for
>> whatever reason I don't have the time to investigate).
>
> They work, but font-lock (used by mail-mode/message-mode) overrides
> such manually-added face properties.
>
> I think the right fix is to change 'face to 'font-lock-face. That will
> make the highlighting work iff font-lock is enabled -- which it is by
> default. [If those highlights are deemed so important that they must be
> seen regardless of whether font-lcok is enabled, one could add _both_
> 'face and 'font-lock-face properties.]
>
> -Miles
Would not an overlay be better? I guess that would not conflict with
font-lock-mode?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug in emacsbug.el
2006-12-06 0:54 ` Lennart Borgman
@ 2006-12-06 1:07 ` Miles Bader
2006-12-06 1:19 ` Lennart Borgman
0 siblings, 1 reply; 10+ messages in thread
From: Miles Bader @ 2006-12-06 1:07 UTC (permalink / raw)
Cc: Michaël Cadilhac, Emacs Devel
Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
> Would not an overlay be better? I guess that would not conflict with
> font-lock-mode?
Why would an overlay be better? I think conceptually, it's clearly a
text property, and there's an established mechanism for dealing with
this particular case (overlays are also less efficient in general, but
that's proably not an issue in this case). Indeed, it's arguably a
_feature_ that switching to font-lock-face would make the highlighting
respect font-lock mode, especially now that the latter is on by default.
-Miles
--
`Cars give people wonderful freedom and increase their opportunities.
But they also destroy the environment, to an extent so drastic that
they kill all social life' (from _A Pattern Language_)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug in emacsbug.el
2006-12-06 1:07 ` Miles Bader
@ 2006-12-06 1:19 ` Lennart Borgman
2006-12-06 2:18 ` Miles Bader
0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2006-12-06 1:19 UTC (permalink / raw)
Cc: Michaël Cadilhac, Emacs Devel
Miles Bader wrote:
> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>> Would not an overlay be better? I guess that would not conflict with
>> font-lock-mode?
>
> Why would an overlay be better? I think conceptually, it's clearly a
> text property, and there's an established mechanism for dealing with
> this particular case (overlays are also less efficient in general, but
> that's proably not an issue in this case). Indeed, it's arguably a
> _feature_ that switching to font-lock-face would make the highlighting
> respect font-lock mode, especially now that the latter is on by default.
>
> -Miles
Ok, seems like I misread the node "(elisp) Precalculated Fontification".
I thought that explicit use of font-lock-face was something that the
mode fontification could do.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug in emacsbug.el
2006-12-06 1:19 ` Lennart Borgman
@ 2006-12-06 2:18 ` Miles Bader
0 siblings, 0 replies; 10+ messages in thread
From: Miles Bader @ 2006-12-06 2:18 UTC (permalink / raw)
Cc: Michaël Cadilhac, Emacs Devel
Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
> Ok, seems like I misread the node "(elisp) Precalculated Fontification".
> I thought that explicit use of font-lock-face was something that the
> mode fontification could do.
Well of course the mode fontification can use it too, if they wish.
mail/message-mode do not.
-Miles
--
"1971 pickup truck; will trade for guns"
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-12-06 2:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-05 16:01 Bug in emacsbug.el Lennart Borgman
2006-12-05 16:32 ` Michaël Cadilhac
2006-12-05 23:06 ` Lennart Borgman
2006-12-05 23:44 ` Michaël Cadilhac
2006-12-06 0:05 ` Lennart Borgman
2006-12-06 0:22 ` Miles Bader
2006-12-06 0:54 ` Lennart Borgman
2006-12-06 1:07 ` Miles Bader
2006-12-06 1:19 ` Lennart Borgman
2006-12-06 2:18 ` Miles Bader
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.