bug#6957: url-cookie-expired-p Redux

Andreas Schwab <schwab <at> linux-m68k.org>
2010-08-31 23:39:23 GMT

shawn boles <shawn.boles <at> gmail.com> writes:
> I added a function called url-cookie-gmt-time-string that returns the
> current time adjusted to GMT. Please check this function. While I
> believe my implementation is correct, there may be a better way to
> adjust a time to GMT in Emacs.
(float-time) already gives the seconds since epoch. No need to convert
to string and back, or doing any time zone adjustments.
Andreas.
--
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."

bug#6961: Emacs hangs when scrolling using gnus-summary-next-page on pages with images

Hi,
I'm using gnus with the new gwene service to read RSS, in particular
webcomics. I've had emacs hang in a particularly bad way when scrolling
pages: consuming 100% of CPU and becoming unresponsive.
This bug should be reproducible with any large images. I tested it with
gwene.com.phdcomics and gwene.fr.lemonde.blog.vidberg.
I'm using (not 100% sure which are relevant)
(setq mm-inline-text-html-with-images t)
(setq mm-attachment-override-types '("image/.*"))
(setq w3m-default-display-inline-images t)
(setq w3m-toggle-inline-images-permanently nil)
with latest bzr emacs and CVS emacs-w3m.
Also a bug but far less major, SPC ignores images in the article buffer,
and consequently the scrolling with large images is weird. It's better
(although not perfect) using the standard emacs scrolling commands (C-v
M-v, etc)
Antoine

bug#6957: url-cookie-expired-p Redux

shawn boles <shawn.boles <at> gmail.com>
2010-09-01 00:43:53 GMT

On Tue, Aug 31, 2010 at 4:39 PM, Andreas Schwab <schwab <at> linux-m68k.org> wrote:
> (float-time) already gives the seconds since epoch. No need to convert
> to string and back, or doing any time zone adjustments.
Hi Andreas,
Thank you for your reply.
I understand that (float-time) gives the seconds since Epoch. Maybe I
am missing something here...
This does not change the issue that (url-cookie-expired-p) is taking
the time string from (current-time-string), adjusted to the user's
timezone and comparing it against a cookie expiration time string,
adjusted to GMT. (url-cookie-expired-p) is not taking into account
that the times are (most likely) in different timezones.
Once I had settled the time normalization issue, I noticed that my
hour long session cookies were still not expiring. After I added
debugging I discovered that (url-cookie-expired-p) was comparing the
current time: "16:30:00" (PST) against "23:30:00" (GMT). My solution
(arguably not the best!) is to get the current time in seconds since
the Epoch (float-time), adjust it to a time that is GMT with the value
of (car (current-timezone)) and then make the comparison. This may not
be the best solution, but! (url-cookie-expired-p) is now comparing
like times.
Please let me know if I am way off base here.
It occurs to me that the date comparison is also wrong, for the same

bug#6962: GDB hangs

GUD hangs when quitting GDBPlease describe exactly what actions triggered the bug
and the precise symptoms of the bug. If you can, give
a recipe starting from `emacs -Q':
When I run GDB (M-x gdb, etc.) the first time, all goes well, until I
type "quit" in the GUD buffer, which never actually quits GDB (the
subprocess never dies). I am able to quit GDB (and cause the message
"Debugger finished" to appear in the GUD buffer) by M-x list-processes.
The second time I run GDB, tab-completion (hitting tab in the GUD
buffer) hangs Emacs (C-g unfreezes).
The same happens when running `emacs -Q'.
I am running the development release of Emacs on Debian squeeze.
Regards,
Aidan Gauland
In GNU Emacs 24.0.50.7 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
of 2010-08-31 on dimension8
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
configured using `configure '--with-imagemagick''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil

bug#6959: [PATCH] Add Microsoft support to cc-mode

[ Please don't send to both emacs-devel and bug-gnu-emacs, otherwise
every reply in emacs-devel risks generating a new bug-number. ]
> Microsoft uses a... unique programming style (erm, typedef void
> VOID?!) that tends to trip up cc-mode.
What do you mean by "trip up"? Sounds like a plain bug to me: any
normal program may have such definitions (tho it depends on how "tripped
up" it gets; it's normal for cc-mode to behave suboptimally when
encountering unknown macros and type annotations, but it should try to
be robust in such circumstances).
> Particularly problematic are certain code annotations, as described in
> http://msdn.microsoft.com/en-us/library/aa383701(VS.85).aspx. This
> patch adds support for this bizarre programming style and allows one
> to work on idiomatic Windows sources comfortably.
Similar needs arise for large projects (e.g. DEFUN and friends in
Emacs's C code), IIUC, right?
So I think we would want to move such project/system-specific outside
cc-langs.el so users can (load "cc-microsoft") or (load "cc-linux") or
(load "cc-emacs"). Tho, loading a file is the wrong interface, so maybe
it can live in cc-langs.el but it should be inside a function so you
could activate it with (cc-enable-microsoft-keywords), or maybe a minor
mode (cc-microsoft-keywords-mode 1), tho turning it off might not be
that important.
The point is to make it modular so it's easy for people to add support
for particular projects.

bug#6958: Documentation: `posn-actual-col-row' is unclear

Eli Zaretskii <eliz <at> gnu.org>
2010-09-01 08:59:13 GMT

> Date: Tue, 31 Aug 2010 16:58:09 -0400
> From: MON KEY <monkey <at> sandpframing.com>
> Cc:
>
> ,---- (documentation 'posn-actual-col-row)
> |
> | Return the actual column and row in position, measured in characters.
> | These are the actual row number in the window and character number
> in that row.
> | Return nil if position does not contain the actual position; in that case
> | `posn-col-row' can be used to get approximate values.
> | position should be a list of the form returned by the `event-start'
> | and `event-end' functions.
> |
> `----
>
> How is a position, "measured in characters."?
Not the position, the column and row numbers. The comma after
"position" should have resolved the ambiguity; it did for me.
> What is a, "character number in that row"?
Quite simply, the ordinal number of a character. What is unclear
here?
> Is this equivalent to the return value of `char-to-string'?
No.

I wanted to use emacsclient with remember mode via
emacsclient -e "(remember-other-frame)" || emacsclient -ce "(remember-
other-frame)"
to make sure that I get a remember field as fast as possible, whether I
already have a frame or not.
I get “*ERROR*: Unknown terminal type”, but the -ce command isn’t evoked.
What I expected was to get an error code, so the second command gets called
and gives me the remember frame.
(which is darn useful, by the way!)
Best wishes and many thanks for working on emacs! It’s just great!
Arne
--
Ich hab' nichts zu verbergen – hab ich gedacht:
- http://draketo.de/licht/lieder/ich-hab-nichts-zu-verbergen

bug#6950: Invisible parts and editing - reveal them?

On Tue, Aug 31, 2010 at 10:07 AM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
>> However when you edit such parts they normally do not get visible even
>> if reveal-mode is on.
>
> reveal-mode should unhide the text, assuming that point is within it.
Eh, sorry, you are right. reveal-mode takes care of this. I thought I
had it on, but for some reason I had commented it out.
I think I got confused by the similar mechanism in isearch that is on
by default. That it is on by default seems good. What is the reason
reveal-mode is not on by default? (I have a feeling there was some
small problem, but I can't remember now.)

bug#6956: 24.0.50; pasting mouse selection in other session pastes only first word

Eli Zaretskii <eliz <at> gnu.org>
2010-09-01 14:38:31 GMT

> From: Chong Yidong <cyd <at> stupidchicken.com>
> Cc: Drew Adams <drew.adams <at> oracle.com>, 6956 <at> debbugs.gnu.org
> Date: Tue, 31 Aug 2010 14:13:30 -0400
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> Select some text (several words) with the mouse using double-click
> >> mouse-1 on one word then mouse-3 on a later word in the text.
> >
> > Does this constitute a "mouse drag"? Can someone please tell what
> > happens on X with the recipe in this bug report?
>
> Yes, this follows the rule that if the region is highlighted, the
> primary selection is set. On X, if you double-mouse-1 on a word and
> extend the region with mouse-3, you can use mouse-2 to paste the entire
> selection into another application.
The issue here is that mouse-drag-copy-region is advertised to copy to
the kill-ring regions which are highlighted by dragging the mouse.
But mouse-drag-copy-region only affects mouse-drag-region (via
mouse-drag-track), which is bound to mouse-1. Mouse-3, OTOH, is bound
to mouse-save-then-kill, which is not affected at all by
mouse-drag-copy-region.
So when Drew double-clicks mouse-1, the highlighted first word is
indeed copied into the kill ring (and winds up in the clipboard), but
extending the region with mouse-3 doesn't copy the extended region.
What I think happens on X under mouse-drag-copy-region is that the
first word is copied into the clipboard, while the extended region is