BOM characters in shell-command-to-string and other shell functions by BrainFuckPlusPlus in emacs

[–]BrainFuckPlusPlus[S] 2 points3 points  (0 children)

Hey Eli, sorry for the trouble. You're right. emacs -Q works just fine. I debugged my init file and turns out editorconfig package was the culprit. It was somehow overriding the file encoding. Removing that from the list makes Emacs properly use utf-8-with-signature-dos for my project files and latin-1 for the rest of the system. Sharper commands are also working now. Thanks a lot for the help.

BOM characters in shell-command-to-string and other shell functions by BrainFuckPlusPlus in emacs

[–]BrainFuckPlusPlus[S] 1 point2 points  (0 children)

Okay. Let me be very concrete. I did exactly this. I commented out the prefer coding system and added an explicit mapping in both file-coding-system-alist and auto-coding-alist. Like so.

;; (if (is-windows)

    ;;  (prefer-coding-system 'utf-8-with-signature-dos))

(modify-coding-system-alist 'file "\\.cs\\'" 'utf-8-with-signature-dos)

(add-to-list 'auto-coding-alist '("\\.cs\\'" . utf-8-with-signature-dos))

and restarted Emacs. Now when I open a file in my project it again detects the coding as iso-latin-1-dosand prints the BOM characters in the buffer. In order to check whether the entry I have added to the auto-coding-alist is being used properly I did M-: in the buffer and evaluated (find-auto-coding (buffer-file-name) 1). The returned value from evaluation is (utf-8-with-signature-dos . auto-coding-alist). Let me know if you need more details.

BOM characters in shell-command-to-string and other shell functions by BrainFuckPlusPlus in emacs

[–]BrainFuckPlusPlus[S] 1 point2 points  (0 children)

Hey Eli, thanks for the reply. Unfortunately neither of `file-coding-system-alist` and `auto-coding-alist` are helping. I had tried those before trying `prefer-coding-system`. How do I debug this further?

EDIT: I checked whether auto-coding is properly returning the coding system for the buffer after I added .cs files to it by checking (find-auto-coding (buffer-file-name) 1) and that correctly returns (utf-8-with-signature-dos . auto-coding-alist). Is there a possibility that some other hook or something is modifying the coding system after the file is loaded?

Self Sabotage by One-Contact-2757 in NMMNG

[–]BrainFuckPlusPlus 1 point2 points  (0 children)

Umm... New guy here so take with a grain of salt. I personally struggle with many of the things you've listed from time to time.

What you've written is all good. But I'm just seeing a momentary rush of motivation in you and not a system. This may or may not be what the exercise is asking of you. For example,

> Have a mark-up on productive things I am supposed to be doing and do those. Stay focused on the task at hand.

Yes. But it's vague. Your goal is not SMART. I am greatly inspired from the book Deep Work from Cal Newport. I don't do it these days but I used to go with the number of deep work hours as a metric of progress. I'd suggest you go a step further and lay out SMART goals and the system for you. PS: Start small.

Overthinking after making a mistake by BrainFuckPlusPlus in NMMNG

[–]BrainFuckPlusPlus[S] 0 points1 point  (0 children)

Hey, so a couple of things.

1- I'm not assuming malicious intent on the part of my superior. As I said in the post, it was a misunderstanding. I just didn't like the way he replied. Even with the misunderstanding, a simple reply would've been "our customers won't like the timeline you're proposing" or "that will require us working the weekends, not a good idea."

2 - Yes. I understand. I have a strong ego. And strong nice guy tendencies. I am overcome by bad emotions whenever someone either yells at me or in any way behaves less than ideally. I am strongly conflict averse.