Re: Conditionals in config
"Marc Wilson" <[email protected]> Mon, 30 Dec 2024 12:59:21 -0800
| Newsgroups | gmane.editors.qemacs.devel |
|---|---|
| Message-ID | <[email protected]> |
--2a8be5eb2f4141f0a98c427664056587 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable You are exactly correct. If I paste the text into the editor using the terminal emulator (=E2=8C=98= V), it appears to be keyboard input and the translation occurs. If I yank it (=E2=8C=83y), the translation does not occur, because it is= not keyboard input. I was pasting it. I know yank now works, but I have not yet got my musc= le memory working that way, when I copy text from somewhere using the sy= stem clipboard. Thanks! --=20 Marc Wilson [email protected] On Mon, Dec 23, 2024, at 4:18 PM, Charlie Gordon wrote: > Hi Marc, >=20 > The question is how to you paste the text into the buffer? >=20 > * if you use yank (C-y) with working support of the system clipboard, = TABs in the clipboard should be preserved. > * if you use the terminal pasting feature, qemacs receives the TABs as= keyboard input and depending on the current buffer mode, they will self= -insert or cause qemacs to insert spaces up to the indentation. >=20 > Which if these do you perform? >=20 > Your suggestion to make `.patch`files use TAB as a regular self-insert= character makes sense. This cannot be achieved with conditionals in th= e config file, I will look into that. Makefiles obviously need a simila= r mode. >=20 > Chqrlie. >=20 >> On 23 Dec 2024, at 22:50, Marc Wilson <[email protected]> wrote: >>=20 >> Is there a way to do conditionals in the config file based on filenam= e or extension? >>=20 >> Example... I have tab expansion turned on and set to four spaces. I = touched in a shell a new file with a .patch extension, then opened it in= qemacs and pasted a patch into it and saved it. >>=20 >> But it wouldn't apply. The code base was tabs, and qemacs had replac= ed the tabs. Perhaps there's an option to git apply that would correct = for that, but I don't know what it is. >>=20 >> So it would be useful to be able to condition things like that based = on the filename or extension (or filetype, I could do it the other way a= nd only force the expansion on python files ^_^ ).=20 >>=20 >> --=20 >> Marc Wilson >> [email protected] --2a8be5eb2f4141f0a98c427664056587 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso= Normal,p.MsoNoSpacing{margin:0}</style></head><body><div>You are exactly= correct.<br></div><div><br></div><div>If I paste the text into the edit= or using the terminal emulator (=E2=8C=98V), it appears to be keyboard i= nput and the translation occurs.<br></div><div><br></div><div>If I yank = it (=E2=8C=83y), the translation does not occur, because it is not keybo= ard input.<br></div><div><br></div><div>I was pasting it. I know y= ank now works, but I have not yet got my muscle memory working that way,= when I copy text from somewhere using the system clipboard.<br></div><d= iv><br></div><div>Thanks!</div><div><br></div><div id=3D"sig39065985"><d= iv class=3D"signature">-- <br></div><div class=3D"signature">Marc W= ilson<br></div><div class=3D"signature"><a href=3D"mailto:posguy99@gmail= .com">[email protected]</a><br></div></div><div><br></div><div>On Mon, = Dec 23, 2024, at 4:18 PM, Charlie Gordon wrote:<br></div><blockquote typ= e=3D"cite" id=3D"qt" style=3D"overflow-wrap:break-word;"><div>Hi Marc,<b= r></div><div><br></div><div><div>The question is how to you paste the te= xt into the buffer?<br></div><div><br></div><div>* if you use yank (C-y)= with working support of the system clipboard, TABs in the clipboard sho= uld be preserved.<br></div><div>* if you use the terminal pasting featur= e, qemacs receives the TABs as keyboard input and depending on the curre= nt buffer mode, they will self-insert or cause qemacs to insert spaces u= p to the indentation.<br></div><div><br></div><div>Which if these do you= perform?<br></div><div><br></div><div>Your suggestion to make `.patch`f= iles use TAB as a regular self-insert character makes sense. This = cannot be achieved with conditionals in the config file, I will look int= o that. Makefiles obviously need a similar mode.<br></div><div><br= ></div><div><div>Chqrlie.<br></div><div><div><br></div><blockquote type=3D= "cite"><div>On 23 Dec 2024, at 22:50, Marc Wilson <[email protected]= > wrote:<br></div><div><br></div><div><div style=3D"font-family:Helve= tica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weig= ht:400;letter-spacing:normal;text-align:start;text-indent:0px;text-trans= form:none;text-wrap-mode:wrap;word-spacing:0px;-webkit-text-stroke-width= :0px;text-decoration-line:none;text-decoration-thickness:initial;text-de= coration-style:initial;text-decoration-color:initial;">Is there a way to= do conditionals in the config file based on filename or extension?<br><= /div><div style=3D"font-family:Helvetica;font-size:12px;font-style:norma= l;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-al= ign:start;text-indent:0px;text-transform:none;text-wrap-mode:wrap;word-s= pacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-= decoration-thickness:initial;text-decoration-style:initial;text-decorati= on-color:initial;"><br></div><div style=3D"font-family:Helvetica;font-si= ze:12px;font-style:normal;font-variant-caps:normal;font-weight:400;lette= r-spacing:normal;text-align:start;text-indent:0px;text-transform:none;te= xt-wrap-mode:wrap;word-spacing:0px;-webkit-text-stroke-width:0px;text-de= coration-line:none;text-decoration-thickness:initial;text-decoration-sty= le:initial;text-decoration-color:initial;">Example... I have tab expansi= on turned on and set to four spaces. I touched in a shell a new fi= le with a .patch extension, then opened it in qemacs and pasted a patch = into it and saved it.<br></div><div style=3D"font-family:Helvetica;font-= size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;let= ter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;= text-wrap-mode:wrap;word-spacing:0px;-webkit-text-stroke-width:0px;text-= decoration-line:none;text-decoration-thickness:initial;text-decoration-s= tyle:initial;text-decoration-color:initial;"><br></div><div style=3D"fon= t-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:no= rmal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:= 0px;text-transform:none;text-wrap-mode:wrap;word-spacing:0px;-webkit-tex= t-stroke-width:0px;text-decoration-line:none;text-decoration-thickness:i= nitial;text-decoration-style:initial;text-decoration-color:initial;">But= it wouldn't apply. The code base was tabs, and qemacs had replace= d the tabs. Perhaps there's an option to git apply that would corr= ect for that, but I don't know what it is.<br></div><div style=3D"font-f= amily:Helvetica;font-size:12px;font-style:normal;font-variant-caps:norma= l;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px= ;text-transform:none;text-wrap-mode:wrap;word-spacing:0px;-webkit-text-s= troke-width:0px;text-decoration-line:none;text-decoration-thickness:init= ial;text-decoration-style:initial;text-decoration-color:initial;"><br></= div><div style=3D"font-family:Helvetica;font-size:12px;font-style:normal= ;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-ali= gn:start;text-indent:0px;text-transform:none;text-wrap-mode:wrap;word-sp= acing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-d= ecoration-thickness:initial;text-decoration-style:initial;text-decoratio= n-color:initial;">So it would be useful to be able to condition things l= ike that based on the filename or extension (or filetype, I could do it = the other way and only force the expansion on python files ^_^ ). <= br></div><div style=3D"font-family:Helvetica;font-size:12px;font-style:n= ormal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;tex= t-align:start;text-indent:0px;text-transform:none;text-wrap-mode:wrap;wo= rd-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;t= ext-decoration-thickness:initial;text-decoration-style:initial;text-deco= ration-color:initial;"><br></div><div id=3D"qt-sig39065985" style=3D"fon= t-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:no= rmal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:= 0px;text-transform:none;text-wrap-mode:wrap;word-spacing:0px;-webkit-tex= t-stroke-width:0px;text-decoration-line:none;text-decoration-thickness:i= nitial;text-decoration-style:initial;text-decoration-color:initial;"><di= v class=3D"qt-signature">-- <br></div><div class=3D"qt-signature">M= arc Wilson<br></div><div class=3D"qt-signature"><a href=3D"mailto:posguy= [email protected]">[email protected]</a><br></div></div></div></blockquote><= /div></div></div></blockquote><div><br></div></body></html> --2a8be5eb2f4141f0a98c427664056587--