2012-06-30

Emacs Defect. file-relative-name fail on some MS Windows Styled Path

file-relative-name doesn't work on MS Windows style path when the drive letter is capitalized.

(file-relative-name "C:/Users/web/xyz.html" "C:/Users/web/") ; returns "C:/Users/web/xyz.html"
(file-relative-name "c:/Users/web/xyz.html" "c:/Users/web/") ; returns "xyz.html"
(file-relative-name "/Users/web/xyz.html" "/Users/web/") ; returns "xyz.html"

GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN

Perm URL with updates: http://ergoemacs.org/emacs/emacs_bugs.html

2012-06-29

Emacs Commpand to Copy Rectangle to Clipboard

Here's a command to copy a column of text to clipboard.

(defun copy-rectangle-to-clipboard (p1 p2)
  "Copy region as column (rectangle) to operating system's clipboard.
This command will also put the text in register 0. (see: `copy-to-register')"
  (interactive "r")
  (let ((x-select-enable-clipboard t))
    (copy-rectangle-to-register ?0 p1 p2)
    (kill-new
     (with-temp-buffer
       (insert-register ?0)
       (buffer-string) )) ) )

See also: Emacs: Manipulate Column Text, string-rectangle, ASCII-Art

2012-06-25

Microsoft Classified FSF Donation site as Gambling

There's this piece of news going around:

How Microsoft Threat Management Gateway Classifies donate.fsf.org (self.gnu) By Rebbsitor. @ Source www.reddit.com

In summery, a Microsoft security site “Microsoft Reputation Services” classified Free Software Foundation's donation site 〔https://donate.fsf.org/〕 as in the “gambling” category. (but also {Technical Information, Shareware/Freeware})

This means, corporations using Microsoft's services will automatically block visiting such site. More about this is has been written by FSF:

  • Dear Microsoft: fsf.org is not a “gambling site” By Posted John Sullivan. @ Source www.fsf.org

I was curious about what Microsoft thought of my website.

my website xahlee.org is classified by Microsoft as {Pornography, Blogs/Wiki, Shareware/Freeware}. See: https://www.microsoft.com/security/portal/mrs/default.aspx. LOL. It appears, their service is quite off.

Here's a correction i submitted to their site:

hi, your service classified my site xahlee.org as Pornography, Blogs/Wiki, Shareware/Freeware. I think the porn and shareware/ware labels are quite inaccurate.

My site has 5 thousand pages. There are about maybe 10 pages that features explicit images of sex, and is accompanied by social commentary. There are about 20 pages featuring nudity or swimsuit, they are collections of a cultural phenomenon of wearing flags as underwear. And maybe 20 more pages about human sexuality. All in all, less that 100 page has anything to do with sex. Also, my site doesn't host any shareware/freeware. The rest 4 thousand nine hundred pages are about mathematics, computer programing, classical english literature, arts (gallery, some nudity), architecture (gallery), linguistics, as references, tutorials, or essays/blogs.

It's more correct to be: {Education/Reference, Blogs/Wiki, Nudity, Technical Information}.

Thanks for looking at this.

The complete list of their categories and definitions is: http://www.microsoft.com/security/portal/mrs/categories/MRS_Categories.en-us.htm (local mirror)