emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how to sanitize org-protocol text ?
@ 2015-04-08 14:05 Sander Boer
       [not found] ` <871tjuq8p5.fsf@turing.flintfam.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Sander Boer @ 2015-04-08 14:05 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I just set up org-protocol and it works fine. However, when I have text 
selected to have it end up in the body of the new note I get presented 
with two problems:

- Every linebreak has a trailing ^M, this does not happen when I paste 
the text.
- Unicode quote symbols ? The text is speckled with \222 ("there’s" 
becomes "there\222s")  or \221  (‘quote’ becomes \221quote\222)

Is there a solution ?

gr
S

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to sanitize org-protocol text ?
       [not found] ` <871tjuq8p5.fsf@turing.flintfam.org>
@ 2015-04-10  7:29   ` Sander Boer
  2015-04-10  8:32     ` Fabrice Popineau
  0 siblings, 1 reply; 3+ messages in thread
From: Sander Boer @ 2015-04-10  7:29 UTC (permalink / raw)
  To: Samuel W. Flint, emacs-orgmode

Hi Samuel,

thank you for replying.
Yes I am on windows 7, I forgot to mention that. I have not tested this 
behavior on win 8 yet.

winhate.Add("Ah windows, a deep well of sorrow and disappointment 
(maildir on win anyone?).")

Anyway,

selection-coding-system : utf-8
current-language-environment: Dutch
file-name-coding-system: nil
default-file-name-coding-system: utf-8
w32-unicode-filenames: t

I was under the impression that setting all the file codings to unicode 
would remove conding issues, but judging from the amount of posts of Xah 
Lee on the subject I think I should know better.

gr.
S

On 9-4-2015 5:31, Samuel W. Flint wrote:
> Sander Boer <sanboer@gmail.com> writes:
>
>> Hi,
>>
>> I just set up org-protocol and it works fine. However, when I have
>> text selected to have it end up in the body of the new note I get
>> presented with two problems:
>>
>> - Every linebreak has a trailing ^M, this does not happen when I paste
>> the text.
> Are you on Windows?
>
>> - Unicode quote symbols ? The text is speckled with \222 ("there’s"
>> becomes "there\222s")  or \221  (‘quote’ becomes \221quote\222)
> Again, are you on Windows?
>
>> Is there a solution ?
> What are the values of the following?
>   - selection-coding-system
>   - current-language-environment
>   - file-name-coding-system
>
>> gr
>> S
>>
>>
> HTH,
>
> Sam
>
> --
> Samuel W. Flint
> swflint@flintfam.org                  (402) 517-8468      <XMPP>
> freenode: swflint
> http://flintfam.org/~swflint
> 4096R/266596F4
>        (9477 D23E 389E 40C5 2F10  DE19 68E5 318E 2665 96F4)
> "The most dangerous phrase in the language is, 'We've always done it
> this way'."  -- Grace Hopper

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to sanitize org-protocol text ?
  2015-04-10  7:29   ` Sander Boer
@ 2015-04-10  8:32     ` Fabrice Popineau
  0 siblings, 0 replies; 3+ messages in thread
From: Fabrice Popineau @ 2015-04-10  8:32 UTC (permalink / raw)
  To: Sander Boer; +Cc: emacs-orgmode@gnu.org, Samuel W. Flint

[-- Attachment #1: Type: text/plain, Size: 2788 bytes --]

Hi,

I don't seem to have a problem under Win8.1 (but honnestly, Win7 shouldn't
make any difference).
I'm using Chrome.
I have

;; Character encodings default to utf-8.
(set-language-environment "UTF-8")
(prefer-coding-system 'utf-8)
(set-language-environment 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
;; MS Windows clipboard is UTF-16LE
(set-clipboard-coding-system 'utf-16le-dos)

in my emacs init files.

Try with these settings, and see if it still fails (restart emacs).
If it fails only on some web pages, please post a link.

Fabrice

2015-04-10 9:29 GMT+02:00 Sander Boer <sanboer@gmail.com>:

> Hi Samuel,
>
> thank you for replying.
> Yes I am on windows 7, I forgot to mention that. I have not tested this
> behavior on win 8 yet.
>
> winhate.Add("Ah windows, a deep well of sorrow and disappointment (maildir
> on win anyone?).")
>
> Anyway,
>
> selection-coding-system : utf-8
> current-language-environment: Dutch
> file-name-coding-system: nil
> default-file-name-coding-system: utf-8
> w32-unicode-filenames: t
>
> I was under the impression that setting all the file codings to unicode
> would remove conding issues, but judging from the amount of posts of Xah
> Lee on the subject I think I should know better.
>
> gr.
> S
>
> On 9-4-2015 5:31, Samuel W. Flint wrote:
>
>> Sander Boer <sanboer@gmail.com> writes:
>>
>>  Hi,
>>>
>>> I just set up org-protocol and it works fine. However, when I have
>>> text selected to have it end up in the body of the new note I get
>>> presented with two problems:
>>>
>>> - Every linebreak has a trailing ^M, this does not happen when I paste
>>> the text.
>>>
>> Are you on Windows?
>>
>>  - Unicode quote symbols ? The text is speckled with \222 ("there’s"
>>> becomes "there\222s")  or \221  (‘quote’ becomes \221quote\222)
>>>
>> Again, are you on Windows?
>>
>>  Is there a solution ?
>>>
>> What are the values of the following?
>>   - selection-coding-system
>>   - current-language-environment
>>   - file-name-coding-system
>>
>>  gr
>>> S
>>>
>>>
>>>  HTH,
>>
>> Sam
>>
>> --
>> Samuel W. Flint
>> swflint@flintfam.org                  (402) 517-8468      <XMPP>
>> freenode: swflint
>> http://flintfam.org/~swflint
>> 4096R/266596F4
>>        (9477 D23E 389E 40C5 2F10  DE19 68E5 318E 2665 96F4)
>> "The most dangerous phrase in the language is, 'We've always done it
>> this way'."  -- Grace Hopper
>>
>
>
>


-- 
Fabrice Popineau
-----------------------------
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
------------------------------

[-- Attachment #2: Type: text/html, Size: 4537 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-10  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08 14:05 how to sanitize org-protocol text ? Sander Boer
     [not found] ` <871tjuq8p5.fsf@turing.flintfam.org>
2015-04-10  7:29   ` Sander Boer
2015-04-10  8:32     ` Fabrice Popineau

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).